> ## 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.

# Voice Changer (SSE)



## OpenAPI

````yaml /latest.yml POST /voice-changer/sse
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /voice-changer/sse:
    post:
      tags:
        - VoiceChanger
      summary: Voice Changer (SSE)
      operationId: voiceChanger_sse
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                clip:
                  type: string
                  format: binary
                voice[id]:
                  type: string
                output_format[container]:
                  $ref: '#/components/schemas/OutputFormatContainer'
                output_format[sample_rate]:
                  type: integer
                  enum:
                    - 8000
                    - 16000
                    - 22050
                    - 24000
                    - 44100
                    - 48000
                output_format[encoding]:
                  $ref: '#/components/schemas/RawEncoding'
                  description: Required for `raw` and `wav` containers.
                  nullable: true
                output_format[bit_rate]:
                  description: Required for `mp3` containers.
                  type: integer
                  nullable: true
      responses:
        '200':
          description: >-
            Server-sent events stream. Each frame is `data: <json>\n\n` where
            the JSON payload matches `VoiceChangerSSEEvent`.
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/VoiceChangerSSEEvent'
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    OutputFormatContainer:
      title: OutputFormatContainer
      type: string
      enum:
        - raw
        - wav
        - mp3
    RawEncoding:
      title: RawEncoding
      type: string
      description: >-
        The encoding format for output audio. See [Choosing TTS
        Parameters](/build-with-cartesia/capability-guides/choosing-tts-parameters)
        if you're unsure what to use.
      enum:
        - pcm_f32le
        - pcm_s16le
        - pcm_mulaw
        - pcm_alaw
    VoiceChangerSSEEvent:
      title: VoiceChangerSSEEvent
      description: An event emitted by the Voice Changer SSE stream.
      oneOf:
        - $ref: '#/components/schemas/VoiceChangerSSEChunk'
        - $ref: '#/components/schemas/VoiceChangerSSEDone'
        - $ref: '#/components/schemas/VoiceChangerSSEError'
    VoiceChangerSSEChunk:
      title: VoiceChangerSSEChunk
      description: Audio data chunk.
      type: object
      example:
        done: false
        status_code: 206
        step_time: 123
        data: aSDinaTvuI8gbWludGxpZnk=
        sample_rate: 44100
      properties:
        status_code:
          type: integer
          enum:
            - 206
          description: HTTP-style status code. Always `206` for chunk events.
        done:
          type: boolean
          enum:
            - false
          description: >-
            Whether this is the final event for the request. Always `false` for
            chunk events.
        data:
          type: string
          description: Base64-encoded audio data.
        sample_rate:
          type: integer
          description: The sample rate of the audio in Hz.
        step_time:
          type: number
          description: Server-side processing time for this chunk in milliseconds.
      required:
        - status_code
        - done
        - data
        - sample_rate
        - step_time
    VoiceChangerSSEDone:
      title: VoiceChangerSSEDone
      description: Generation completion signal. Final event in the stream.
      type: object
      example:
        done: true
        status_code: 200
      properties:
        status_code:
          type: integer
          enum:
            - 200
          description: HTTP-style status code. Always `200` for done events.
        done:
          type: boolean
          enum:
            - true
          description: Whether generation is complete. Always `true` for done events.
      required:
        - status_code
        - done
    VoiceChangerSSEError:
      title: VoiceChangerSSEError
      description: Error information for the Voice Changer SSE request.
      type: object
      example:
        type: error
        done: true
        title: Invalid voice
        message: The voice is not valid, make sure it is a valid voice ID.
        error_code: voice_not_found
        status_code: 400
        request_id: 2ff8af53-4d38-479d-8287-58940f01c701
      properties:
        type:
          type: string
          enum:
            - error
          description: Event type identifier.
        done:
          type: boolean
          enum:
            - true
          description: Whether generation is complete. Always `true` for error events.
        status_code:
          type: integer
          description: An HTTP response status code.
        title:
          type: string
          description: Human-readable error title.
        message:
          type: string
          description: Human-readable error message.
        error_code:
          type: string
          nullable: true
          description: Machine-readable error code.
        request_id:
          type: string
          description: Unique identifier for this request.
        doc_url:
          type: string
          nullable: true
          description: URL to relevant documentation.
      required:
        - type
        - done
        - status_code
        - title
        - message
        - request_id
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````