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

# Clone a voice

> Clone a voice from a reference audio sample. Use the returned voice `id` in your `/tts/bytes` and `/tts/websocket` requests.



## OpenAPI

````yaml api-reference/openapi.json POST /voices/clone
openapi: 3.1.0
info:
  title: Nineninesix TTS API
  description: >-
    Cartesia-compatible Text-to-Speech API for voice agents and real-time
    dialogue. Point the official Cartesia SDKs at this base URL and they just
    work.
  version: 0.3.0
  contact:
    name: Nineninesix Support
    email: ulan@nineninesix.ai
servers:
  - url: https://api.nineninesix.ai
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Speech
    description: Generate audio from text.
  - name: Voices
    description: List, fetch, and clone voices.
paths:
  /voices/clone:
    post:
      tags:
        - Voices
      summary: Clone a voice
      description: >-
        Clone a voice from a reference audio sample. Use the returned voice `id`
        in your `/tts/bytes` and `/tts/websocket` requests.
      operationId: cloneVoice
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - name
                - clip
              properties:
                name:
                  type: string
                  description: A name for the cloned voice.
                clip:
                  type: string
                  format: binary
                  description: Reference audio sample to clone from.
                language:
                  type: string
                  description: BCP-47 language tag of the sample.
                  example: en
      responses:
        '200':
          description: The newly created voice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
components:
  schemas:
    Voice:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: a0e99841-438c-4a64-b679-ae501e7d6091
        name:
          type: string
          example: Barbershop Man
        description:
          type: string
          example: A friendly, conversational voice
        language:
          type: string
          description: BCP-47 tag.
          example: en
    Error:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code.
          example: payment_required
        message:
          type: string
          description: Human-readable description.
          example: insufficient credits
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: invalid API key
    PaymentRequired:
      description: Insufficient credits.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: payment_required
            message: insufficient credits
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key as a Bearer token: `Authorization: Bearer sk_996_...`.'
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Alternatively, pass your API key in the `X-API-Key` header.

````