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

# create voice

> Create a voice by cloning from audio or importing an existing provider voice. Send clone audio inline as multipart/form-data (the whole request must stay under ~4.5MB), or first upload a larger clip via `POST /v1/voices/presigned-upload` and reference its `audioKey`. Provider imports are checked against Anam's supported model registry. Cartesia, ElevenLabs, and Fish Audio imports must successfully generate a sample before the voice is persisted; the first import of an ElevenLabs Voice Library voice typically takes about a minute while ElevenLabs adds it to Anam's account. New integrations should prefer POST /v1/voice-imports for synchronous validation and preview generation. An import by provider voice ID shares that endpoint's organization limit: 30 voice imports and model changes an hour, at most 3 at once, refused with 429 `rate_limited` and `Retry-After` before any provider work.



## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/voices
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Avatar Videos
  - name: Meetings
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: Pronunciation Dictionaries
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
  - name: Engine
paths:
  /v1/voices:
    post:
      tags:
        - Voices
      summary: create voice
      description: >-
        Create a voice by cloning from audio or importing an existing provider
        voice. Send clone audio inline as multipart/form-data (the whole request
        must stay under ~4.5MB), or first upload a larger clip via `POST
        /v1/voices/presigned-upload` and reference its `audioKey`. Provider
        imports are checked against Anam's supported model registry. Cartesia,
        ElevenLabs, and Fish Audio imports must successfully generate a sample
        before the voice is persisted; the first import of an ElevenLabs Voice
        Library voice typically takes about a minute while ElevenLabs adds it to
        Anam's account. New integrations should prefer POST /v1/voice-imports
        for synchronous validation and preview generation. An import by provider
        voice ID shares that endpoint's organization limit: 30 voice imports and
        model changes an hour, at most 3 at once, refused with 429
        `rate_limited` and `Retry-After` before any provider work.
      operationId: createVoice
      requestBody:
        description: Audio clone data or an existing provider voice to import.
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - name
                - audioFile
              properties:
                name:
                  type: string
                  description: Display name for the cloned voice
                audioFile:
                  type: string
                  format: binary
                  description: Audio file to clone the voice from
                description:
                  type: string
                  description: Optional description of the voice
                language:
                  type: string
                  default: en
                  description: Language code for the voice
                enhance:
                  type: boolean
                  default: true
                  deprecated: true
                  description: >-
                    Accepted for compatibility; no longer forwarded to the
                    current Cartesia cloning API.
          application/json:
            schema:
              oneOf:
                - type: object
                  title: Clone from uploaded audio
                  required:
                    - name
                    - audioKey
                  properties:
                    name:
                      type: string
                      description: Display name for the cloned voice
                    audioKey:
                      type: string
                      description: >-
                        Storage key returned by POST
                        /v1/voices/presigned-upload, after the audio has been
                        uploaded to the presigned URL. Use this for clips larger
                        than ~4.5MB.
                    description:
                      type: string
                      description: Optional description of the voice
                    language:
                      type: string
                      default: en
                      description: Language code for the voice
                    enhance:
                      type: boolean
                      default: true
                      deprecated: true
                      description: >-
                        Accepted for compatibility; no longer forwarded to the
                        current Cartesia cloning API.
                - type: object
                  title: Import provider voice
                  required:
                    - displayName
                    - provider
                    - providerVoiceId
                  properties:
                    displayName:
                      type: string
                      description: Display name for the imported voice
                    provider:
                      type: string
                      enum:
                        - CARTESIA
                        - ELEVENLABS
                        - FISH_AUDIO
                    providerVoiceId:
                      type: string
                      description: Voice ID in the selected provider
                    providerModelId:
                      type: string
                      enum:
                        - sonic-3.6
                        - sonic-3.6-2026-08-27
                        - sonic-3.5
                        - sonic-3.5-2026-05-04
                        - sonic-3
                        - sonic-3-2026-01-12
                        - sonic-2
                        - sonic-latest
                        - eleven_v4_turbo
                        - eleven_v3_conversational
                        - eleven_v4
                        - eleven_v3
                        - eleven_flash_v2_5
                        - eleven_multilingual_v2
                        - eleven_flash_v2
                        - eleven_turbo_v2_5
                        - s2.1-pro
                        - s2-pro
                        - s1
                      description: >-
                        Supported model for the selected provider. Omit to use
                        that provider's default.
                    providerConfig:
                      type: object
                      additionalProperties: true
                    sampleUrl:
                      type: string
                      format: uri
                      description: Optional provider-hosted sample URL retained as metadata
                    isClone:
                      type: boolean
                      description: Legacy compatibility flag
                    gender:
                      type: string
                      enum:
                        - MALE
                        - FEMALE
                        - NEUTRAL
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                      description: ISO 3166-1 alpha-2 country code
                    description:
                      type: string
            examples:
              cloneFromUpload:
                value:
                  name: My cloned voice
                  audioKey: voice-clones/org_123/sample.wav
                  language: en
                  enhance: true
              importProviderVoice:
                value:
                  displayName: My Cartesia voice
                  provider: CARTESIA
                  providerVoiceId: voice_abc123
                  providerModelId: sonic-3.6
      responses:
        '201':
          description: Successfully cloned or imported a voice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voice'
              examples:
                default:
                  $ref: '#/components/examples/VoiceResponse'
        '400':
          description: >-
            Bad request - Invalid voice data, unsupported model, or provider
            validation failed
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: >-
            Forbidden - Requires enterprise plan or API key lacks the required
            permission
        '409':
          description: >-
            ElevenLabs attachment conflict (`voice_bound_elsewhere`) or another
            attachment is running (`import_in_progress`, retryable).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - code
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - voice_bound_elsewhere
                      - import_in_progress
                  retryable:
                    type: boolean
              examples:
                voiceBoundElsewhere:
                  value:
                    error: >-
                      This ElevenLabs voice is linked to another organization.
                      Contact support to use it.
                    code: voice_bound_elsewhere
                importInProgress:
                  value:
                    error: This ElevenLabs voice is being imported. Retry shortly.
                    code: import_in_progress
                    retryable: true
        '422':
          description: >-
            The voice provider refused to clone from this audio or these
            parameters. `code` says why: `audio_too_large`, `audio_silent`,
            `audio_too_short`, or `clone_rejected` for any other refusal, such
            as an unsupported `language`. Fix the request before retrying.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - code
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - audio_too_large
                      - audio_silent
                      - audio_too_short
                      - clone_rejected
              examples:
                audioTooShort:
                  value:
                    error: >-
                      The audio is too short to clone. Send 10–15 seconds of the
                      voice speaking.
                    code: audio_too_short
        '429':
          description: >-
            A clone or an import by provider voice ID found the organization's
            30 voice clones, imports and model changes this hour spent or 3
            running (`code: rate_limited`, `retryable: true`; nothing was sent
            to the provider), or the voice provider rate limited the validation
            request. Retry later.
          headers:
            Retry-After:
              description: >-
                Seconds until the organization's limit allows another clone or
                import, when it refused the request.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - rate_limited
                  retryable:
                    type: boolean
        '500':
          description: Server error
        '502':
          description: >-
            Voice provider or preview storage is temporarily unavailable. A
            clone answers with `code: provider_unavailable` and `retryable:
            true`. An uploaded `audioKey` is kept, so the same request can be
            retried until the upload is 24 hours old; after that, upload the
            clip again.
        '503':
          description: >-
            The API key could not be checked because of a temporary server
            problem (the key may be valid), or a clone or an import by provider
            voice ID found the organization's voice limit couldn't be checked
            (`code: service_unavailable`, `retryable: true`; nothing was sent to
            the provider). Retry after `Retry-After` seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ServiceUnavailableError'
                  - type: object
                    required:
                      - error
                      - code
                    properties:
                      error:
                        type: string
                      code:
                        type: string
                        enum:
                          - service_unavailable
                      retryable:
                        type: boolean
        '504':
          description: Voice provider validation timed out
components:
  schemas:
    Voice:
      type: object
      description: A voice preset a persona can use for text-to-speech.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the voice.
        displayName:
          type: string
          description: Human-readable name shown in the Lab.
        provider:
          type: string
          enum:
            - CARTESIA
            - ELEVENLABS
            - FISH_AUDIO
          description: Upstream TTS provider for this voice.
        providerVoiceId:
          type:
            - string
            - 'null'
          description: The upstream provider's identifier for the voice.
        providerModelId:
          type:
            - string
            - 'null'
          description: The upstream provider's model identifier used to generate speech.
        sampleUrl:
          type:
            - string
            - 'null'
          format: uri
          description: URL of a short audio preview of the voice.
        previewSampleUrl:
          type:
            - string
            - 'null'
          format: uri
          description: Alias for `sampleUrl`, kept for backwards compatibility.
        gender:
          type:
            - string
            - 'null'
          enum:
            - MALE
            - FEMALE
            - NEUTRAL
            - null
          description: Perceived gender of the voice, if categorised.
        country:
          type:
            - string
            - 'null'
          description: ISO 3166-1 alpha-2 country code representing the voice's accent.
        description:
          type:
            - string
            - 'null'
          description: Free-form description of the voice's character.
        displayTags:
          type: array
          items:
            type: string
          description: Tags used to categorise the voice in the Lab UI.
        isZdr:
          type: boolean
          description: Whether this voice meets the Zero Data Retention requirements.
        createdByOrganizationId:
          type:
            - string
            - 'null'
          description: >-
            ID of the organization that created the voice, or `null` for stock
            voices. IDs may be either UUIDs or nanoid-style strings depending on
            when the organization was created.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the voice was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the voice was last updated.
    ServiceUnavailableError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          example: Service temporarily unavailable
        message:
          type: string
          example: We could not check your API key. Please retry shortly.
  examples:
    VoiceResponse:
      summary: A single voice resource
      value:
        id: de23e340-1416-4dd8-977d-065a7ca11697
        displayName: Lucy - Fresh & Casual
        provider: ELEVENLABS
        providerVoiceId: lcMyyd2HUfFzxdCaC4Ta
        providerModelId: eleven_flash_v2_5
        sampleUrl: >-
          https://newgxnc1uqs0jnqm.public.blob.vercel-storage.com/voice-samples/de23e340-1416-4dd8-977d-065a7ca11697/1760617899390.mp3
        previewSampleUrl: >-
          https://newgxnc1uqs0jnqm.public.blob.vercel-storage.com/voice-samples/de23e340-1416-4dd8-977d-065a7ca11697/1760617899390.mp3
        gender: FEMALE
        country: GB
        description: >-
          Energetic and youthful British voice, perfect for narrations and
          conversational agents.
        displayTags:
          - fast
        isZdr: true
        createdByOrganizationId: null
        createdAt: '2026-04-20T10:00:00.000Z'
        updatedAt: '2026-04-20T10:00:00.000Z'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.