Text-to-Speech (SSE)
Stream audio with extra metadata from a complete transcript
Authorizations
Cartesia API key (sk_car_...). Get one at play.cartesia.ai/keys.
Headers
API version header.
2026-03-01 "2026-03-01"
Body
Deprecated — use locale instead on Sonic 3.6 and later. The language the voice speaks the transcript in, as a code from the languages the model supports (en, hi).
Supported languages are model-specific. See the language support section for the model you are calling — Sonic 3.6 or Sonic 3.5. Requesting a language a model does not support returns a 400 error; Odia (or), for example, is available on Sonic 3.6 but not on Sonic 3.5.
Interchangeable with locale — set one or the other, never both. Setting both returns a 400 error, even if the values match. Existing integrations using language continue to work unchanged, including on Sonic 3.5 and earlier.
"en"
The locale or language the voice speaks the transcript in, as a code from the supported locales or the languages the model supports (en-GB, hi-IN, en, hi). Accepts exactly the same values as language; set one or the other, never both. Setting both returns a 400 error, even if the values match.
Locale codes such as en-GB require Sonic 3.6 or later; passing one to an earlier model returns a 400 error. Bare language codes such as en are accepted by every model that supports the field, in either locale or language.
Supported languages and locales are model-specific. See the language support section for the model you are calling — Sonic 3.6 or Sonic 3.5.
Locale codes are case-sensitive. Values not on the supported list return a 400 error — arbitrary BCP-47 codes are rejected, not ignored. See Text Normalization.
"en-GB"
Controls how written forms (dates, times, numbers) are converted to spoken forms, independently of the voice's accent. One of auto (default), off, or a locale code from the supported locales (e.g. en-IN). Values not on the list return a 400 error.
off disables only the automatic normalizer; SSML tags, generation controls, and pronunciation dictionaries still apply, and blocked characters still return a 400 error with their positions.
Locale codes require Sonic 3.6 or later. See Text Normalization.
"auto"
Whether to return word-level timestamps. If false (default), no word timestamps will be produced at all. If true, the server will return timestamp events containing word-level timing information.
Whether to return phoneme-level timestamps. If false (default), no phoneme timestamps will be produced. If true, the server will return timestamp events containing phoneme-level timing information.
Whether to use normalized timestamps (True) or original timestamps (False).
The ID of a pronunciation dictionary to use for the generation. Pronunciation dictionaries are supported by sonic-3 models and newer.
Configure the various attributes of the generated speech. Available on sonic-3 and sonic-3.5; not available on earlier models.
See Volume, Speed, and Emotion for a guide on this option.
This property is deprecated and may not work for all voices. Use generation_config.speed instead.
Influences the speed of the generated speech.
slow, normal, fast This can be any string value you find useful. The server will echo back the same context_id in events that it sends.
Contexts on the TTS (WebSocket) endpoint are used for continuations. > The TTS (SSE) endpoint does not support continuations, so most users just ignore this property.
Response
Server-sent events stream. Each frame is data: <json>\n\n where the JSON payload matches TTSSSEEvent.
- TTSSSEChunkEvent
- TTSSSETimestampsEvent
- TTSSSEPhonemeTimestampsEvent
- TTSSSEDoneEvent
- TTSSSEErrorEvent
Audio data chunk.
Event type identifier.
chunk Whether this is the final event for the request. Always false for chunk events.
false Base64-encoded audio data.
Server-side processing time for this chunk in milliseconds.
HTTP-style status code.
The context ID echoed back from the request, if one was provided.