> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cartesia Sonic 3

> Stream low-latency speech synthesis from Cartesia Sonic 3 over WebSocket with a multilingual catalog of voices and context-aware controls.

**Hosting: routed through SLNG (Cartesia).** This model runs on Cartesia's servers; SLNG proxies each request through the nearest regional gateway. Available in Netherlands, Germany, United States (East, West), Australia, Brazil, United Kingdom, Indonesia, Israel, India, Japan, Singapore, South Africa. Connect to your region's gateway WebSocket endpoint: `wss://eu-north.api.slng.ai`, `wss://eu-west.api.slng.ai`, `wss://us-east.api.slng.ai`, `wss://us-west.api.slng.ai`, `wss://au.api.slng.ai`, `wss://br.api.slng.ai`, `wss://gb.api.slng.ai`, `wss://id.api.slng.ai`, `wss://il.api.slng.ai`, `wss://in.api.slng.ai`, `wss://jp.api.slng.ai`, `wss://sg.api.slng.ai`, `wss://za.api.slng.ai`.


## AsyncAPI

````yaml api-reference/asyncapi/tts-cartesia.asyncapi.yaml /v1/tts/cartesia/sonic:3
id: /v1/tts/cartesia/sonic:3
title: Cartesia Sonic 3
description: >-
  Stream low-latency speech synthesis from Cartesia Sonic 3 over WebSocket with
  a multilingual catalog of voices and context-aware controls.
servers:
  - id: production-eu-north
    protocol: wss
    host: eu-north.api.slng.ai
    bindings: []
    variables: []
  - id: production-eu-west
    protocol: wss
    host: eu-west.api.slng.ai
    bindings: []
    variables: []
  - id: production-us-east
    protocol: wss
    host: us-east.api.slng.ai
    bindings: []
    variables: []
  - id: production-us-west
    protocol: wss
    host: us-west.api.slng.ai
    bindings: []
    variables: []
  - id: production-au
    protocol: wss
    host: au.api.slng.ai
    bindings: []
    variables: []
  - id: production-br
    protocol: wss
    host: br.api.slng.ai
    bindings: []
    variables: []
  - id: production-gb
    protocol: wss
    host: gb.api.slng.ai
    bindings: []
    variables: []
  - id: production-id
    protocol: wss
    host: id.api.slng.ai
    bindings: []
    variables: []
  - id: production-il
    protocol: wss
    host: il.api.slng.ai
    bindings: []
    variables: []
  - id: production-in
    protocol: wss
    host: in.api.slng.ai
    bindings: []
    variables: []
  - id: production-jp
    protocol: wss
    host: jp.api.slng.ai
    bindings: []
    variables: []
  - id: production-sg
    protocol: wss
    host: sg.api.slng.ai
    bindings: []
    variables: []
  - id: production-za
    protocol: wss
    host: za.api.slng.ai
    bindings: []
    variables: []
address: /v1/tts/cartesia/sonic:3
parameters: []
bindings:
  - protocol: ws
    version: latest
    value:
      method: GET
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
operations:
  - &ref_2
    id: ttsCartesiaSonic3ReceiveInit
    title: Tts cartesia sonic3 receive init
    description: Initialize session on Cartesia Sonic 3
    type: receive
    messages:
      - &ref_11
        id: CartesiaSonicTtsInitRequest
        contentType: application/json
        payload:
          - name: Init Request (Cartesia Sonic 3)
            description: >-
              Initialize a Cartesia Sonic 3 TTS session with provider-specific
              configuration.
            type: object
            properties:
              - name: type
                type: string
                description: init
                required: true
              - name: model_id
                type: string
                description: Cartesia Sonic model identifier.
                enumValues:
                  - sonic-3
                required: false
              - name: voice
                type: string
                description: Cartesia voice identifier.
                required: false
              - name: language
                type: string
                description: Optional language override for supported Sonic 3 voices.
                required: false
              - name: encoding
                type: string
                description: Output audio encoding format.
                enumValues:
                  - linear16
                  - mulaw
                  - ulaw
                  - alaw
                required: false
              - name: sample_rate
                type: integer
                description: Output audio sample rate in Hz.
                enumValues:
                  - 8000
                  - 16000
                  - 24000
                  - 44100
                required: false
              - name: context_id
                type: string
                description: >-
                  Optional synthesis context identifier. If omitted, the gateway
                  generates one per WebSocket session.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Initialize a Cartesia Sonic 3 TTS session with voice, language, and
            audio format options. Fields set here are applied for the session
            unless overridden per text message.
          required:
            - type
          properties:
            type:
              type: string
              const: init
              default: init
              x-parser-schema-id: <anonymous-schema-2>
            model_id:
              type: string
              description: Cartesia Sonic model identifier.
              enum:
                - sonic-3
              default: sonic-3
              x-parser-schema-id: <anonymous-schema-3>
            voice:
              type: string
              description: Cartesia voice identifier.
              default: f786b574-daa5-4673-aa0c-cbe3e8534c02
              x-parser-schema-id: <anonymous-schema-4>
            language:
              type: string
              description: Optional language override for supported Sonic 3 voices.
              x-parser-schema-id: <anonymous-schema-5>
            encoding:
              type: string
              description: Output audio encoding format.
              enum:
                - linear16
                - mulaw
                - ulaw
                - alaw
              default: linear16
              x-parser-schema-id: <anonymous-schema-6>
            sample_rate:
              type: integer
              description: Output audio sample rate in Hz.
              enum:
                - 8000
                - 16000
                - 24000
                - 44100
              default: 24000
              x-parser-schema-id: <anonymous-schema-7>
            context_id:
              type: string
              description: >-
                Optional synthesis context identifier. If omitted, the gateway
                generates one per WebSocket session.
              x-parser-schema-id: <anonymous-schema-8>
          x-parser-schema-id: <anonymous-schema-1>
        title: Init Request (Cartesia Sonic 3)
        description: >-
          Initialize a Cartesia Sonic 3 TTS session with provider-specific
          configuration.
        example: |-
          {
            "type": "init",
            "model_id": "sonic-3",
            "voice": "f786b574-daa5-4673-aa0c-cbe3e8534c02",
            "encoding": "linear16",
            "sample_rate": 24000
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: CartesiaSonicTtsInitRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /v1/tts/cartesia/sonic:3
  - &ref_3
    id: ttsCartesiaSonic3ReceiveText
    title: Tts cartesia sonic3 receive text
    description: Send text to Cartesia Sonic 3
    type: receive
    messages:
      - &ref_12
        id: CartesiaSonicTtsTextMessage
        contentType: application/json
        payload:
          - name: Text Message (Cartesia Sonic 3)
            description: >-
              Send text to synthesize on Cartesia Sonic 3 with optional
              generation controls.
            type: object
            properties:
              - name: type
                type: string
                description: text
                required: true
              - name: text
                type: string
                description: Text to synthesize.
                required: true
              - name: voice
                type: string
                description: Override the Cartesia voice identifier for this utterance.
                required: false
              - name: generation_config
                type: object
                description: >-
                  Optional Sonic 3 generation controls such as speed, volume,
                  and emotion.
                required: false
                properties:
                  - name: speed
                    type: number
                    description: Sonic 3 speed multiplier guidance.
                    required: false
                  - name: volume
                    type: number
                    description: Sonic 3 volume multiplier guidance.
                    required: false
                  - name: emotion
                    type: string
                    description: Sonic 3 emotional guidance.
                    required: false
              - name: speed
                type: string
                description: >-
                  Deprecated Cartesia speed override. Prefer
                  `generation_config.speed` for Sonic 3. Ignored when
                  `generation_config` is provided.
                enumValues:
                  - slow
                  - normal
                  - fast
                required: false
              - name: continue
                type: boolean
                description: >-
                  Whether more text inputs may follow on the same `context_id`.
                  When `true`, Cartesia keeps the context open and waits. When
                  `false` or omitted, this is the final input — Cartesia emits
                  the trailing audio and then `audio_end`.
                required: false
              - name: max_buffer_delay_ms
                type: integer
                description: >-
                  Maximum time, in milliseconds, that Cartesia buffers incoming
                  text before starting generation. Use it to group several quick
                  `text` inputs into a single synthesis pass — the longer the
                  delay, the more text Cartesia can combine. Omit or set `0` to
                  generate as soon as the first text input arrives.
                required: false
              - name: add_timestamps
                type: boolean
                description: >-
                  Whether Cartesia should emit timestamp events for this
                  generation.
                required: false
              - name: flush
                type: boolean
                description: >-
                  Marks a segment boundary within the active context. Not
                  required to receive audio — Cartesia begins generating as soon
                  as text arrives. Sending `flush: true` increments the
                  `flush_id` that Cartesia includes on subsequent `audio_chunk`
                  frames so you can correlate audio back to the text segment
                  that produced it. Does not finalize the context; complete
                  generation by sending the final input with `continue: false`.
                required: false
              - name: pronunciation_dict_id
                type: string
                description: >-
                  Optional pronunciation dictionary applied to this generation
                  only.
                required: false
              - name: context_id
                type: string
                description: >-
                  Optional synthesis context identifier. If omitted, the gateway
                  uses the active session context_id.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Send text to synthesize into audio output using Cartesia Sonic 3.
            Supports per-utterance generation controls including speed, volume,
            emotion, and manual flushing.
          required:
            - type
            - text
          properties:
            type:
              type: string
              const: text
              x-parser-schema-id: <anonymous-schema-10>
            text:
              type: string
              minLength: 1
              description: Text to synthesize.
              x-parser-schema-id: <anonymous-schema-11>
            voice:
              type: string
              description: Override the Cartesia voice identifier for this utterance.
              x-parser-schema-id: <anonymous-schema-12>
            generation_config:
              type: object
              description: >-
                Optional Sonic 3 generation controls such as speed, volume, and
                emotion.
              properties:
                speed:
                  type: number
                  minimum: 0.6
                  maximum: 1.5
                  description: Sonic 3 speed multiplier guidance.
                  x-parser-schema-id: <anonymous-schema-14>
                volume:
                  type: number
                  minimum: 0.5
                  maximum: 2
                  description: Sonic 3 volume multiplier guidance.
                  x-parser-schema-id: <anonymous-schema-15>
                emotion:
                  type: string
                  description: Sonic 3 emotional guidance.
                  x-parser-schema-id: <anonymous-schema-16>
              x-parser-schema-id: <anonymous-schema-13>
            speed:
              type: string
              description: >-
                Deprecated Cartesia speed override. Prefer
                `generation_config.speed` for Sonic 3. Ignored when
                `generation_config` is provided.
              enum:
                - slow
                - normal
                - fast
              x-parser-schema-id: <anonymous-schema-17>
            continue:
              type: boolean
              description: >-
                Whether more text inputs may follow on the same `context_id`.
                When `true`, Cartesia keeps the context open and waits. When
                `false` or omitted, this is the final input — Cartesia emits the
                trailing audio and then `audio_end`.
              x-parser-schema-id: <anonymous-schema-18>
            max_buffer_delay_ms:
              type: integer
              minimum: 0
              maximum: 5000
              description: >-
                Maximum time, in milliseconds, that Cartesia buffers incoming
                text before starting generation. Use it to group several quick
                `text` inputs into a single synthesis pass — the longer the
                delay, the more text Cartesia can combine. Omit or set `0` to
                generate as soon as the first text input arrives.
              x-parser-schema-id: <anonymous-schema-19>
            add_timestamps:
              type: boolean
              description: >-
                Whether Cartesia should emit timestamp events for this
                generation.
              x-parser-schema-id: <anonymous-schema-20>
            flush:
              type: boolean
              description: >-
                Marks a segment boundary within the active context. Not required
                to receive audio — Cartesia begins generating as soon as text
                arrives. Sending `flush: true` increments the `flush_id` that
                Cartesia includes on subsequent `audio_chunk` frames so you can
                correlate audio back to the text segment that produced it. Does
                not finalize the context; complete generation by sending the
                final input with `continue: false`.
              x-parser-schema-id: <anonymous-schema-21>
            pronunciation_dict_id:
              type: string
              description: >-
                Optional pronunciation dictionary applied to this generation
                only.
              x-parser-schema-id: <anonymous-schema-22>
            context_id:
              type: string
              description: >-
                Optional synthesis context identifier. If omitted, the gateway
                uses the active session context_id.
              x-parser-schema-id: <anonymous-schema-23>
          x-parser-schema-id: <anonymous-schema-9>
        title: Text Message (Cartesia Sonic 3)
        description: >-
          Send text to synthesize on Cartesia Sonic 3 with optional generation
          controls.
        example: |-
          {
            "type": "text",
            "text": "Hello, this is Cartesia Sonic 3."
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: CartesiaSonicTtsTextMessage
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: ttsCartesiaSonic3ReceiveFlush
    title: Tts cartesia sonic3 receive flush
    description: Flush buffered output on Cartesia Sonic 3
    type: receive
    messages:
      - &ref_13
        id: TtsFlushMessage
        contentType: application/json
        payload:
          - name: Flush Message
            description: >-
              Standalone segment boundary on the active Cartesia Sonic 3
              context.
            type: object
            properties:
              - name: type
                type: string
                description: flush
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Standalone segment boundary on the active context. Has the same
            effect as setting `flush: true` on a `text` input: it increments
            `flush_id` and does not finalize the context. Complete generation by
            sending the final `text` input with `continue: false`.
          required:
            - type
          properties:
            type:
              type: string
              const: flush
              x-parser-schema-id: <anonymous-schema-25>
          x-parser-schema-id: <anonymous-schema-24>
        title: Flush Message
        description: Standalone segment boundary on the active Cartesia Sonic 3 context.
        example: |-
          {
            "type": "flush"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsFlushMessage
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: ttsCartesiaSonic3ReceiveCancel
    title: Tts cartesia sonic3 receive cancel
    description: Cancel in-progress generation on Cartesia Sonic 3
    type: receive
    messages:
      - &ref_14
        id: TtsCancelMessage
        contentType: application/json
        payload:
          - name: Cancel Message
            description: Cancel an in-progress Cartesia Sonic 3 synthesis context.
            type: object
            properties:
              - name: type
                type: string
                description: cancel
                required: true
              - name: context_id
                type: string
                description: >-
                  Optional context identifier to cancel. If omitted, the gateway
                  cancels the active session context_id.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Cancel an in-progress Cartesia synthesis context. The gateway
            forwards a native `{ context_id, cancel: true }` frame to Cartesia.
            When `context_id` is omitted, the active session context is
            cancelled. Cartesia recommends starting a new `context_id` for the
            next turn after a cancel.
          required:
            - type
          properties:
            type:
              type: string
              const: cancel
              x-parser-schema-id: <anonymous-schema-27>
            context_id:
              type: string
              description: >-
                Optional context identifier to cancel. If omitted, the gateway
                cancels the active session context_id.
              x-parser-schema-id: <anonymous-schema-28>
          x-parser-schema-id: <anonymous-schema-26>
        title: Cancel Message
        description: Cancel an in-progress Cartesia Sonic 3 synthesis context.
        example: |-
          {
            "type": "cancel"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsCancelMessage
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: ttsCartesiaSonic3ReceiveClose
    title: Tts cartesia sonic3 receive close
    description: Close session on Cartesia Sonic 3
    type: receive
    messages:
      - &ref_15
        id: TtsCloseMessage
        contentType: application/json
        payload:
          - name: Close Message
            description: Close the session and stop any further audio.
            type: object
            properties:
              - name: type
                type: string
                description: close
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Close the session and stop any further audio.
          required:
            - type
          properties:
            type:
              type: string
              const: close
              x-parser-schema-id: <anonymous-schema-30>
          x-parser-schema-id: <anonymous-schema-29>
        title: Close Message
        description: Close the session and stop any further audio.
        example: |-
          {
            "type": "close"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsCloseMessage
    bindings: []
    extensions: *ref_0
  - &ref_7
    id: ttsCartesiaSonic3ReceiveKeepalive
    title: Tts cartesia sonic3 receive keepalive
    description: Send keepalive on Cartesia Sonic 3
    type: receive
    messages:
      - &ref_16
        id: KeepaliveMessage
        contentType: application/json
        payload:
          - name: Keepalive Message
            description: Keep the WebSocket connection alive during silence.
            type: object
            properties:
              - name: type
                type: string
                description: keepalive
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Prevents the connection from being closed due to inactivity. Send
            periodically during silence to maintain the session.
          required:
            - type
          properties:
            type:
              type: string
              const: keepalive
              x-parser-schema-id: <anonymous-schema-32>
          x-parser-schema-id: <anonymous-schema-31>
        title: Keepalive Message
        description: Keep the WebSocket connection alive during silence.
        example: |-
          {
            "type": "keepalive"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: KeepaliveMessage
    bindings: []
    extensions: *ref_0
  - &ref_8
    id: ttsCartesiaSonic3SendAudioChunk
    title: Tts cartesia sonic3 send audio chunk
    description: Receive audio chunk from Cartesia Sonic 3
    type: send
    messages:
      - &ref_17
        id: CartesiaSonicTtsAudioChunk
        contentType: application/json
        payload:
          - name: Audio Chunk (Cartesia Sonic 3)
            description: Streaming audio chunk from Cartesia Sonic 3.
            type: object
            properties:
              - name: type
                type: string
                description: audio_chunk
                required: true
              - name: data
                type: string
                description: >-
                  Base64-encoded audio chunk matching the requested encoding and
                  sample rate.
                required: true
              - name: done
                type: boolean
                description: True when this is the final chunk of the active context.
                required: false
              - name: status_code
                type: integer
                description: Upstream HTTP-equivalent status code from Cartesia.
                required: false
              - name: step_time
                type: number
                description: Cartesia processing time for this chunk, in milliseconds.
                required: false
              - name: flush_id
                type: integer
                description: >-
                  Segment identifier within the active context. Starts at `0`
                  and increments by `1` each time a `text` input is sent with
                  `flush: true`, or whenever a standalone flush message is
                  issued. Use it to correlate audio chunks back to the text
                  segment that produced them.
                required: false
              - name: context_id
                type: string
                description: Synthesis context identifier this chunk belongs to.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Streaming audio chunk emitted by Cartesia Sonic 3. The gateway
            forwards each upstream `chunk` message as an `audio_chunk`,
            preserving Cartesia's native fields.
          required:
            - type
            - data
          properties:
            type:
              type: string
              const: audio_chunk
              x-parser-schema-id: <anonymous-schema-34>
            data:
              type: string
              format: byte
              description: >-
                Base64-encoded audio chunk matching the requested encoding and
                sample rate.
              x-parser-schema-id: <anonymous-schema-35>
            done:
              type: boolean
              description: True when this is the final chunk of the active context.
              x-parser-schema-id: <anonymous-schema-36>
            status_code:
              type: integer
              description: Upstream HTTP-equivalent status code from Cartesia.
              x-parser-schema-id: <anonymous-schema-37>
            step_time:
              type: number
              description: Cartesia processing time for this chunk, in milliseconds.
              x-parser-schema-id: <anonymous-schema-38>
            flush_id:
              type: integer
              description: >-
                Segment identifier within the active context. Starts at `0` and
                increments by `1` each time a `text` input is sent with `flush:
                true`, or whenever a standalone flush message is issued. Use it
                to correlate audio chunks back to the text segment that produced
                them.
              x-parser-schema-id: <anonymous-schema-39>
            context_id:
              type: string
              description: Synthesis context identifier this chunk belongs to.
              x-parser-schema-id: <anonymous-schema-40>
          x-parser-schema-id: <anonymous-schema-33>
        title: Audio Chunk (Cartesia Sonic 3)
        description: Streaming audio chunk from Cartesia Sonic 3.
        example: |-
          {
            "type": "audio_chunk",
            "context_id": "9baf38d7-799e-40f2-88d1-daeacbdb3910",
            "status_code": 206,
            "done": false,
            "data": "AAF+/dD7n/wj/rD/owGoBEQHBgjTBcoDjAITAk0BtwF0BFUI5wmlB7cEAgO3ArIBUwB0AJwDDQbQBacCEgDA/vD96vxr/H3+hwAqASr/Z/3C/BEAEQAUAA==",
            "step_time": 67.49622,
            "flush_id": 0
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: CartesiaSonicTtsAudioChunk
    bindings: []
    extensions: *ref_0
  - &ref_9
    id: ttsCartesiaSonic3SendAudioEnd
    title: Tts cartesia sonic3 send audio end
    description: Receive audio end from Cartesia Sonic 3
    type: send
    messages:
      - &ref_18
        id: TtsAudioEnd
        contentType: application/json
        payload:
          - name: Audio End
            description: Signals the end of audio generation.
            type: object
            properties:
              - name: type
                type: string
                description: audio_end
                required: true
              - name: done
                type: boolean
                description: Always `true` on Cartesia generation-complete frames.
                required: false
              - name: status_code
                type: integer
                description: Upstream HTTP-equivalent status code from Cartesia.
                required: false
              - name: context_id
                type: string
                description: Synthesis context identifier that finished generation.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Signals the end of audio generation for the active context. The
            gateway maps the upstream Cartesia `done` message to `audio_end`,
            preserving Cartesia's native fields.
          required:
            - type
          properties:
            type:
              type: string
              const: audio_end
              x-parser-schema-id: <anonymous-schema-42>
            done:
              type: boolean
              description: Always `true` on Cartesia generation-complete frames.
              x-parser-schema-id: <anonymous-schema-43>
            status_code:
              type: integer
              description: Upstream HTTP-equivalent status code from Cartesia.
              x-parser-schema-id: <anonymous-schema-44>
            context_id:
              type: string
              description: Synthesis context identifier that finished generation.
              x-parser-schema-id: <anonymous-schema-45>
          x-parser-schema-id: <anonymous-schema-41>
        title: Audio End
        description: Signals the end of audio generation.
        example: |-
          {
            "type": "audio_end",
            "context_id": "9baf38d7-799e-40f2-88d1-daeacbdb3910",
            "status_code": 200,
            "done": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsAudioEnd
    bindings: []
    extensions: *ref_0
  - &ref_10
    id: ttsCartesiaSonic3SendError
    title: Tts cartesia sonic3 send error
    description: Receive error from Cartesia Sonic 3
    type: send
    messages:
      - &ref_19
        id: TtsErrorResponse
        contentType: application/json
        payload:
          - name: Error Response
            description: Indicates an error occurred during synthesis.
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: message
                type: string
                description: Human-readable error description.
                required: true
              - name: title
                type: string
                description: Short error title from the upstream provider.
                required: false
              - name: status_code
                type: integer
                description: Upstream HTTP-equivalent status code.
                required: false
              - name: error_code
                type: &ref_1
                  - string
                  - 'null'
                description: Provider-specific error code, when available.
                required: false
              - name: done
                type: boolean
                description: >-
                  True when the upstream marked the context as terminated by
                  this error.
                required: false
              - name: request_id
                type: string
                description: Cartesia request identifier, useful when contacting support.
                required: false
              - name: doc_url
                type: string
                description: >-
                  Cartesia documentation link for this error class, when
                  provided.
                required: false
              - name: context_id
                type: string
                description: Synthesis context identifier associated with the error.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Indicates an error occurred during synthesis. The gateway surfaces
            upstream Cartesia error messages with the original status code,
            provider-specific error code, and supporting metadata.
          required:
            - type
            - message
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-47>
            message:
              type: string
              description: Human-readable error description.
              x-parser-schema-id: <anonymous-schema-48>
            title:
              type: string
              description: Short error title from the upstream provider.
              x-parser-schema-id: <anonymous-schema-49>
            status_code:
              type: integer
              description: Upstream HTTP-equivalent status code.
              x-parser-schema-id: <anonymous-schema-50>
            error_code:
              type: *ref_1
              description: Provider-specific error code, when available.
              x-parser-schema-id: <anonymous-schema-51>
            done:
              type: boolean
              description: >-
                True when the upstream marked the context as terminated by this
                error.
              x-parser-schema-id: <anonymous-schema-52>
            request_id:
              type: string
              description: Cartesia request identifier, useful when contacting support.
              x-parser-schema-id: <anonymous-schema-53>
            doc_url:
              type: string
              description: Cartesia documentation link for this error class, when provided.
              x-parser-schema-id: <anonymous-schema-54>
            context_id:
              type: string
              description: Synthesis context identifier associated with the error.
              x-parser-schema-id: <anonymous-schema-55>
          x-parser-schema-id: <anonymous-schema-46>
        title: Error Response
        description: Indicates an error occurred during synthesis.
        example: |-
          {
            "type": "error",
            "message": "Provider returned an unexpected error",
            "status_code": 500,
            "error_code": "provider_error",
            "done": true,
            "request_id": "req-9b1c2f",
            "doc_url": "https://docs.cartesia.ai/errors/provider_error",
            "context_id": "demo-context-123"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsErrorResponse
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_2
  - *ref_3
  - *ref_4
  - *ref_5
  - *ref_6
  - *ref_7
receiveOperations:
  - *ref_8
  - *ref_9
  - *ref_10
sendMessages:
  - *ref_11
  - *ref_12
  - *ref_13
  - *ref_14
  - *ref_15
  - *ref_16
receiveMessages:
  - *ref_17
  - *ref_18
  - *ref_19
extensions:
  - id: x-parser-unique-object-id
    value: /v1/tts/cartesia/sonic:3
securitySchemes:
  - id: bearer
    name: bearer
    type: http
    description: >
      API key issued by SLNG. Pass as `Authorization: Bearer <token>` in the
      WebSocket upgrade request headers.
    scheme: bearer
    extensions: []

````