{
"model_id": "sonic-2",
"transcript": "Hello, world! I'm generating audio on Cartesia!",
"voice": {
"mode": "id",
"id": "a0e99841-438c-4a64-b679-ae501e7d6091"
},
"language": "en",
"context_id": "happy-monkeys-fly",
"output_format": {
"container": "raw",
"encoding": "pcm_s16le",
"sample_rate": 8000
},
"add_timestamps": true,
"continue": false
}{
"context_id": "happy-monkeys-fly",
"cancel": true
}{
"type": "chunk",
"data": "aSDinaTvuI8gbWludGxpZnk=",
"done": false,
"status_code": 206,
"step_time": 123,
"context_id": "happy-monkeys-fly"
}{
"type": "flush_done",
"done": false,
"flush_done": true,
"flush_id": 1,
"status_code": 206,
"context_id": "happy-monkeys-fly"
}{
"type": "done",
"done": true,
"status_code": 206,
"context_id": "happy-monkeys-fly"
}{
"type": "timestamps",
"done": false,
"status_code": 206,
"context_id": "happy-monkeys-fly",
"word_timestamps": {
"words": [
"Hello",
"world"
],
"start": [
0,
0.5
],
"end": [
0.4,
0.9
]
}
}{
"type": "<string>",
"done": true,
"error": "<string>",
"status_code": 123,
"context_id": "<string>"
}No examples found{
"model_id": "sonic-2",
"transcript": "Hello, world! I'm generating audio on Cartesia!",
"voice": {
"mode": "id",
"id": "a0e99841-438c-4a64-b679-ae501e7d6091"
},
"language": "en",
"context_id": "happy-monkeys-fly",
"output_format": {
"container": "raw",
"encoding": "pcm_s16le",
"sample_rate": 8000
},
"add_timestamps": true,
"continue": false
}{
"context_id": "happy-monkeys-fly",
"cancel": true
}{
"type": "chunk",
"data": "aSDinaTvuI8gbWludGxpZnk=",
"done": false,
"status_code": 206,
"step_time": 123,
"context_id": "happy-monkeys-fly"
}{
"type": "flush_done",
"done": false,
"flush_done": true,
"flush_id": 1,
"status_code": 206,
"context_id": "happy-monkeys-fly"
}{
"type": "done",
"done": true,
"status_code": 206,
"context_id": "happy-monkeys-fly"
}{
"type": "timestamps",
"done": false,
"status_code": 206,
"context_id": "happy-monkeys-fly",
"word_timestamps": {
"words": [
"Hello",
"world"
],
"start": [
0,
0.5
],
"end": [
0.4,
0.9
]
}
}{
"type": "<string>",
"done": true,
"error": "<string>",
"status_code": 123,
"context_id": "<string>"
}No examples foundAPI version. Allowed values: 2024-06-10, 2024-11-13, 2025-04-16.
You can specify this instead of the Cartesia-Version header. This is particularly useful for use in the browser, where WebSockets do not support headers. You do not need to specify this if you are passing the header.
API key. You can specify this instead of the X-API-Key header. This is particularly useful for use in the browser, where WebSockets do not support headers. You do not need to specify this if you are passing the header.
API key passed in header
API key passed as query parameter (useful for browser WebSockets)
Use this to generate speech for a transcript.
Use this to cancel a context, so that no more messages are generated for that context.
Audio data chunk
Acknowledgment that flush command was received
Generation completion signal
Word-level timing information
Error information
Phoneme-level timing information