Skip to main content
WSS
/
tts
/
websocket

Documentation Index

Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt

Use this file to discover all available pages before exploring further.

Messages
cartesia_version
type:string
required

API version, e.g. 2026-03-01. You can specify this instead of the Cartesia-Version header. This is particularly useful in the browser, where WebSockets do not support headers. You do not need to specify this if you are passing the header.

X-API-Key
type:httpApiKey

API key passed in a header.

access_token
type:httpApiKey

A short-lived access token passed in a query param to make API requests from a client. This is particularly useful in the browser, where WebSockets do not support headers. See Authenticate client apps to generate an access token.

Generation Request
type:object

Use this to generate speech for a transcript.

Cancel Context Request
type:object

Use this to cancel a context, so that no more messages are generated for that context.

Audio Chunk Response
type:object

Audio data chunk

Flush Done Response
type:object

Acknowledgment that flush command was received

Done Response
type:object

Generation completion signal

Word Timestamps Response
type:object

Word-level timing information

Phoneme Timestamps Response
type:object

Phoneme-level timing information

Error Response
type:object

Error information for TTS WebSocket connections.