Cartesia TTS WebSocket API
Bidirectional, multiplexed WebSocket at wss://api.cartesia.ai/tts/websocket for realtime speech generation. Clients send JSON generation requests keyed by a context_id (continuing a context preserves prosody across chunks of transcript) and receive base64-encoded audio chunks, optional word and phoneme timestamps, flush acknowledgements, and a final done message. A single connection scales to dozens of concurrent generation contexts.
Cartesia TTS WebSocket API is one of 21 APIs that Cartesia publishes on the APIs.io network, described by an AsyncAPI event-driven specification.
Tagged areas include WebSocket, Text to Speech, Realtime, and Streaming. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.
This event API exposes 4 operations across 2 channels, and defines 24 schemas. It is described by AsyncAPI 2.6.0, at version 2026-03-01.
The API connects through 2 servers: api.cartesia.ai/tts/websocket?cartesia_version=2026-03-01 (wss), api.cartesia.ai/stt/websocket?model=ink-whisper&encoding=pcm_s16le&sample_rate=16000&cartesia_version=2026-03-01 (wss).
Metadata
The identity and technical contract details declared by the specification.
Channels & Operations 4
Across 2 channels, the API surfaces 4 operations. Each is listed below with its action, channel, parameters, and response codes.
Messages & Schemas 24
The contract defines 24 schemas that model the data carried by its messages. The most detailed are TtsGenerationRequestPayload (13 properties), ErrorPayload (9 properties), TtsAudioChunkPayload (6 properties), FlushDonePayload (6 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable AsyncAPI contract behind this narrative.
Source
More from Cartesia 12
Other APIs Cartesia publishes across the network.