New: AI video tools. Cut, clip, caption and dub your videos. See all video tools →
Clone

Stream cloned speech

POST
/api/v1/generation/clone/stream

Start a streaming voice clone session.

Returns a session_id immediately. Connect to GET /api/v1/streaming/{session_id}/audio to receive chunked WAV audio as it is generated. Call POST /api/v1/streaming/{session_id}/finalize when done to get the complete audio as base64.

Cancels any in-progress generation to prioritize the stream.

Request Body

application/json
  1. body
ref_audio_base64?|

Base64-encoded reference audio (WAV). Optional if voice_id is provided.

ref_text?Ref Text

Transcript of the reference audio

Default""
target_text*Target Text

Text to generate speech for

language?Language

Target language. Query GET /api/v1/models/active for supported languages per variant.

Default"Auto"
voice_id?|

Voice ID for prompt caching. If provided, saved audio is used as fallback when ref_audio_base64 is omitted.

quality?|

Quality/variant tier. Query GET /api/v1/models/active for available tiers.

generation_params?|

Advanced sampling parameters

model_family?|

TTS model to use. If omitted, uses the currently configured model. Triggers auto-load if needed.

emotion?|

Emotion to apply. If set and not 'neutral', uses emotional clone. Query GET /api/v1/models/active for supported emotions.

intensity?|

Emotion intensity (very_mild/mild/normal/strong/extreme). Defaults to 'normal' when emotion is set.

Response Body

Successful Response

application/json
  1. response
started*Started

Whether the streaming session was created

session_id*Session Id

Unique session ID for streaming endpoints

queue_position*Queue Position

Position in the generation queue

Example Request
curl -X POST 'http://127.0.0.1:8100/api/v1/generation/clone/stream' \  -H 'Content-Type: application/json' \  -d '{  "target_text": "Welcome to the voice cloning demo."}'
Example Response
{  "started": true,  "session_id": "a1b2c3d4",  "queue_position": 0}