{
"model_id": "<string>",
"transcript": "<string>",
"context_id": "<string>",
"continue": true,
"voice": {
"mode": "<string>",
"id": "<string>"
},
"output_format": {
"container": "<string>",
"encoding": "<string>",
"sample_rate": 123
}
}{
"context_id": "<string>",
"cancel": true
}{
"type": "<string>",
"context_id": "<string>",
"done": true,
"status_code": 123,
"data": "<string>"
}{
"type": "<string>",
"context_id": "<string>",
"done": true,
"status_code": 123,
"cancelled": true
}{
"type": "<string>",
"done": true,
"error_code": "<string>",
"status_code": 123,
"title": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}Text-to-Speech (WebSocket)
Real-time, low-latency TTS over a persistent WebSocket connection.
{
"model_id": "<string>",
"transcript": "<string>",
"context_id": "<string>",
"continue": true,
"voice": {
"mode": "<string>",
"id": "<string>"
},
"output_format": {
"container": "<string>",
"encoding": "<string>",
"sample_rate": 123
}
}{
"context_id": "<string>",
"cancel": true
}{
"type": "<string>",
"context_id": "<string>",
"done": true,
"status_code": 123,
"data": "<string>"
}{
"type": "<string>",
"context_id": "<string>",
"done": true,
"status_code": 123,
"cancelled": true
}{
"type": "<string>",
"done": true,
"error_code": "<string>",
"status_code": 123,
"title": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}Your Nineninesix API key (sk_996_...), sent as the api_key query parameter on the connection URL.
Opt in to cancel acknowledgements. true, 1, yes, and on enable it. Each cancel then gets exactly one reply: a done frame with cancelled: true, or a context_not_found / missing_context_id error frame. Without it, cancel is silent.
Speak a transcript within a context.
Stop a context's in-flight generation and drop its queued sentences. Other contexts keep running, and all text sent for the context is billed. By default the cancel is silent; chunks for that context simply stop. On a connection opened with ?cancel_ack=true, the server replies exactly once after generation has stopped: a done frame with cancelled: true (no audio follows it), context_not_found (404) if the context isn't active, or missing_context_id (400) if context_id is omitted. Both errors keep the socket open.
One audio segment.
The context/turn is complete, after a continue: false and all queued sentences render — or, on a ?cancel_ack=true connection, a cancel has taken effect (cancelled: true).
Full Cartesia-shaped error envelope. See the error-code catalog above.