Vocu Developers
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
Api Docs(Current)
User GuideBack To APP
Api Docs(Current)
User GuideBack To APP
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
  1. Voice Generation
  • Overview
  • Authentication Method
  • Voice Character
    • Create a new voice character
      POST
    • Get the list of voice characters for the current user
      GET
    • Add a style to the voice character with the specified ID
      POST
    • Upload avatar for the voice character with the specified ID
      POST
    • Add a voice character to the account via a share ID
      POST
    • Get details of the voice character with the specified ID
      GET
    • Delete Voice Character with the specified ID
      DELETE
    • Get the one-time share link ID for the specified voice character ID
      GET
    • Delete Style of the specified ID for the Voice Character with the specified ID
      DELETE
    • Generate a voice-character preview clip
      POST
    • Update a voice character's name and description
      POST
    • Inspect and backfill missing voice-character fields
      POST
    • Get the transcription of a style's reference audio
      GET
    • Correct the transcription of a style's reference audio
      POST
    • Set a style as the default style
      POST
    • Update a style's name and description
      POST
    • Reset a style and reprocess its reference audio
      POST
    • Re-upload professional-cloning artifacts
      POST
    • Trigger automatic re-upload of professional-cloning artifacts
      POST
    • Migrate a voice character to v2.0
      POST
    • Migrate a voice character to v3.0
      POST
    • Start voice-character identity verification
      POST
    • Check voice-character identity-verification result
      POST
  • Voice Generation
    • Synchronous real-time voice generation
      POST
    • Create Asynchronous Voice Generation Task
      POST
    • Get the list of asynchronous generation tasks for the current user
      GET
    • Get the details of an asynchronous generation task by ID
      GET
    • Delete an asynchronous generation task by ID
      DELETE
    • Upload audio for voice conversion
      POST
    • Stream the full generated audio
      GET
    • Stream audio for a single content
      GET
    • Get the streaming playback URL for a whole generation task
      GET
    • List splitter configurations
      GET
    • Create a splitter configuration
      POST
    • Get splitter configuration details
      GET
    • Update a splitter configuration (diff mode)
      POST
    • Delete a splitter configuration
      DELETE
    • One-shot synthesis returning an MP3 stream directly
      GET
    • List synthesis parameter presets
      GET
    • Fetch a synthesized audio stream
      GET
    • Get SRT subtitles for synthesized audio
      GET
  • User Account
    • Get current user account information
  • Content Template
    • Create New Template
    • Get User's Template List
    • Update Template with Specified ID
    • Get Template Details with Specified ID
    • Delete Template with Specified ID
  • Real-time Synthesis
    • Create a Turbo real-time synthesis channel
    • List Turbo channels for the current user
    • Close a Turbo channel
  • Voice Design
    • Generate a voice preview from a text description
    • Generate a voice preview by remixing / translating existing audio
    • Confirm a voice design and create a voice character
    • Query voice-design quota
  1. Voice Generation

Stream the full generated audio

GET
https://v1.vocu.studio/api/tts/generate/{id}/stream.mp3
Stream the audio of the entire generation task as it is produced (all content concatenated in index order into one continuous MP3).
Differences among the three related endpoints
EndpointReturnsGranularity
GET /api/tts/generate/{id}/stream.mp3MP3 byte streamEntire generation task
GET /api/tts/generate/{id}/{contentIndex}/stream.mp3MP3 byte streamSingle content
GET /api/tts/generate/{id}/streamJSON containing the full URL of the first endpoint aboveEntire generation task (URL lookup only)
GET /api/tts/generate/{id}/{contentIndex}/pseudo/stream.mp3302 redirect to the finished audioSingle content (pseudo-streaming)
Response branches
1.
The generation task's metadata.audio already exists (finished audio has landed in storage) → 302 redirect to the finished audio URL; the streaming pipeline is not used.
2.
Task status is processing or generated → return an MP3 byte stream.
3.
Any other status → JSON error STREAM_NOT_READY.
Byte stability and Range
The same {id} + {i} share one stream session: the generation pipeline runs globally once, output is appended into the session cache, and every HTTP request reads from the cache.
Therefore this URL is a byte-stable, resumable resource with full support for Range / If-Range / HEAD / 206 / 416 (iOS AVPlayer depends on this semantics).
The session is reclaimed after 30 minutes of idle (sliding window); a later visit rebuilds and re-fetches upstream, transparent to the client, but the ETag changes.
When error responses can appear
Only when not a single byte has been sent yet is a failure translated into a JSON error response; once audio has started flowing, a mid-stream failure only truncates the stream and will not produce a JSON error body.
Audio output parameters (no tunable parameters)
Output container / encoding is fixed as MP3 (Content-Type: audio/mpeg); the endpoint does not accept format / bitrate / sampleRate parameters.
Regular concat path: every segment is fed into the same libmp3lame pipeline and re-encoded at a fixed bitrate of 320 kbps (routes/generate/streaming.js:220-221). That pipeline does not explicitly set a sample rate; sample rate is inherited from the upstream segments.
Passthrough path: a single-content instruct/design progressive stream skips ffmpeg entirely, bytes are forwarded as-is (routes/generate/streaming.js:861-869). That path requests 24 kHz MP3 from upstream (routes/generate/streaming.js:842), so this path's output is neither 320 kbps nor 44.1 kHz.
interval silence-fill segments are encoded separately from 44.1 kHz / stereo PCM into 320 kbps MP3 (routes/generate/streaming.js:391-394,421).
Does not return X-Reecho-Audio-Id / X-Reecho-Response-Data
These two response headers exist only on the direct_stream: true direct-return branch of POST /api/tts/generate (routes/generate/tts.js:1789-1798)
and the equivalent branch of simple-generate (routes/generate/tts.js:1321-1322). Those are the only two write sites in the whole repo; they do not exist in routes/generate/streaming.js,
so billing information (credit_used / billing / estimatedDuration) cannot be obtained from this endpoint's response headers — use the generation-task detail endpoint instead.
Auth
This path is on the regex allowlist at app.js:261; both express-jwt and API-key middleware are skipped; only the ?auth= static token is accepted.

Error responses take the shape { status, code, message, requestId? }. code is always the parent code — sub codes only change message and never appear in the body. requestId is present only on reportable-tier errors, so use the X-Vocu-App-Request-Id response header when troubleshooting (it is written unconditionally on every response). See the "Errors" document for the full code reference.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Query Params

Header Params

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://v1.vocu.studio/api/tts/generate//stream.mp3?auth=undefined&i=undefined&response-content-disposition=undefined' \
--header 'Range;' \
--header 'If-Range;' \
--header 'Authorization: Bearer <token>'

Responses

🟢200成功
audio/mpeg
返回 MP3 音频流。生成进行中为 200 + Transfer-Encoding: chunked;生成已完成为 200 + Content-Length;带合法 Range 时为 206 + Content-Range;Range 起始越界且会话已完成时为 416;成品音频已存在时为 302 跳转。HEAD 请求只回头部、不跟随流。
Headers

Bodyaudio/mpeg

Example
{}
🟠400请求有误
🟠401没有权限
🟠403禁止访问
🟠404记录不存在
🟠429
Modified at 2026-08-23 01:11:55
Previous
Upload audio for voice conversion
Next
Stream audio for a single content