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

# import pronunciation dictionary

> Creates a pronunciation dictionary from a Cartesia pronunciation dictionary file: an array of `{ text, pronunciation, case_sensitive? }` rows, with an optional Anam `sounds_like` fallback. A pronunciation containing `<<` or `>>` is imported as an IPA entry; anything else is a sounds-like entry.

The file is validated as a whole: it must hold 1 to 500 rows and at most 1 MiB of UTF-8 JSON. When `json` is an array, the limit applies to the array serialized without whitespace. If any row is invalid, nothing is saved and the response lists every error by one-based row and file field name.




## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/pronunciation-dictionaries/import
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/pronunciation-dictionaries/import:
    post:
      tags:
        - Pronunciation Dictionaries
      summary: import pronunciation dictionary
      description: >
        Creates a pronunciation dictionary from a Cartesia pronunciation
        dictionary file: an array of `{ text, pronunciation, case_sensitive? }`
        rows, with an optional Anam `sounds_like` fallback. A pronunciation
        containing `<<` or `>>` is imported as an IPA entry; anything else is a
        sounds-like entry.


        The file is validated as a whole: it must hold 1 to 500 rows and at most
        1 MiB of UTF-8 JSON. When `json` is an array, the limit applies to the
        array serialized without whitespace. If any row is invalid, nothing is
        saved and the response lists every error by one-based row and file field
        name.
      operationId: importPronunciationDictionary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - name
                - json
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: Display name for the new dictionary
                  example: Brand names
                json:
                  description: >-
                    The file's rows, either as an array or as the file's
                    contents in a string.
                  oneOf:
                    - type: array
                      minItems: 1
                      maxItems: 500
                      items:
                        type: object
                        additionalProperties: false
                        required:
                          - text
                          - pronunciation
                        properties:
                          text:
                            type: string
                            maxLength: 100
                          pronunciation:
                            type: string
                            maxLength: 200
                            description: >-
                              Respelling, or Cartesia IPA markup between `<<`
                              and `>>`
                          sounds_like:
                            type: string
                            maxLength: 200
                            description: >-
                              IPA rows only. Respelling spoken by voices whose
                              model can't read IPA.
                          case_sensitive:
                            type: boolean
                            default: false
                    - type: string
                      description: The file's contents
            examples:
              default:
                $ref: '#/components/examples/PronunciationDictionaryImport'
      responses:
        '201':
          description: Successfully imported pronunciation dictionary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PronunciationDictionary'
              examples:
                default:
                  $ref: >-
                    #/components/examples/PronunciationDictionaryImportedResponse
        '400':
          description: Bad request - The body is not valid JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PronunciationDictionaryError'
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - API key lacks write access to pronunciation dictionaries
        '422':
          description: >-
            Unprocessable - The name or file is invalid. `field` uses the file's
            names, such as `case_sensitive`. Nothing was saved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PronunciationDictionaryValidationError'
              examples:
                default:
                  $ref: >-
                    #/components/examples/PronunciationDictionaryImportValidationError
        '429':
          description: >-
            Too many requests - Your organization made more than 60
            pronunciation dictionary writes (creates, imports, updates and
            archives) this minute. Rejected writes count too.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds until the limit resets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PronunciationDictionaryError'
        '500':
          description: Server error
components:
  examples:
    PronunciationDictionaryImport:
      summary: Import Cartesia-format rows
      value:
        name: Brand names
        json:
          - text: Anam
            pronunciation: annum
          - text: SQL
            pronunciation: sequel
            case_sensitive: true
          - text: Zorvex
            pronunciation: <<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>
            sounds_like: zor vex
    PronunciationDictionaryImportedResponse:
      summary: The imported dictionary
      value:
        id: 4f600129-13cf-4bfa-909a-2f4c31467f43
        name: Brand names
        revision: 1
        createdAt: '2026-10-11T09:00:00.000Z'
        updatedAt: '2026-10-11T09:00:00.000Z'
        entries:
          - text: Anam
            kind: sounds_like
            pronunciation: annum
            caseSensitive: false
          - text: SQL
            kind: sounds_like
            pronunciation: sequel
            caseSensitive: true
          - text: Zorvex
            kind: ipa
            pronunciation: <<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>
            soundsLike: zor vex
            caseSensitive: false
    PronunciationDictionaryImportValidationError:
      summary: Invalid file rows; nothing was saved
      value:
        error: Invalid dictionary import
        details:
          - row: 2
            field: case_sensitive
            message: Expected boolean, received string
  schemas:
    PronunciationDictionary:
      description: >
        A pronunciation dictionary and its entries. Saves are live: sessions
        that start after a save use the saved entries, and running sessions keep
        the entries they started with.
      allOf:
        - $ref: '#/components/schemas/PronunciationDictionarySummary'
        - type: object
          properties:
            entries:
              type: array
              items:
                $ref: '#/components/schemas/PronunciationEntry'
    PronunciationDictionaryError:
      type: object
      properties:
        error:
          type: string
          description: What went wrong
        code:
          type: string
          enum:
            - REVISION_CONFLICT
            - DICTIONARY_ATTACHED
            - RATE_LIMITED
          description: Why a 409 or 429 happened
        personaIds:
          type: array
          items:
            type: string
            format: uuid
          description: With `DICTIONARY_ATTACHED`, the personas that use the dictionary
    PronunciationDictionaryValidationError:
      type: object
      properties:
        error:
          type: string
          example: Invalid pronunciation dictionary
        code:
          type: string
          enum:
            - DICTIONARY_OUTDATED
          description: Set when the saved entries, not the request, fail the current rules
        details:
          type: array
          description: Every validation error
          items:
            type: object
            properties:
              row:
                type:
                  - integer
                  - 'null'
                minimum: 1
                description: One-based entry number, or null for an error outside an entry
              field:
                type:
                  - string
                  - 'null'
                description: Field with the error, or null for the whole entry or request
              message:
                type: string
                description: What to fix
    PronunciationDictionarySummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Pronunciation dictionary ID. Pass it as
            `voiceGenerationOptions.pronunciationDictionaryId` when creating a
            session token.
          example: 4f600129-13cf-4bfa-909a-2f4c31467f43
        name:
          type: string
          description: Display name
          example: Brand names
        revision:
          type: integer
          minimum: 1
          description: >-
            Starts at 1 and increases with every save. Send it as
            `expectedRevision` to reject a write if someone else saved first.
          example: 1
        createdAt:
          type: string
          format: date-time
          description: When the dictionary was created
        updatedAt:
          type: string
          format: date-time
          description: When the dictionary was last saved
    PronunciationEntry:
      type: object
      additionalProperties: false
      required:
        - text
        - pronunciation
      description: >
        One word or phrase and how to say it. The persona speaks the
        pronunciation in place of the text; captions and transcripts keep the
        original text.


        Text and pronunciation must not be blank or contain `[` or `]`. Two
        entries can't have the same text (ignoring case and spacing) unless both
        set `caseSensitive` and differ only in case.
      properties:
        text:
          type: string
          maxLength: 100
          description: Word or phrase to replace, at most 100 Unicode characters.
          example: Anam
        kind:
          type: string
          enum:
            - sounds_like
            - ipa
          default: sounds_like
          description: >
            - `sounds_like`: `pronunciation` is a respelling, such as `annum`.
            Works with every voice.

            - `ipa`: `pronunciation` is Cartesia IPA markup, such as
            `<<ˈ|ɑ|n|ə|m>>`. Voices whose model reads IPA (Cartesia Sonic 3,
            ElevenLabs v3 and v4) speak it; other voices speak `soundsLike`, or
            leave the text unchanged without it.
          example: sounds_like
        pronunciation:
          type: string
          maxLength: 200
          description: >-
            How to say the text, at most 200 Unicode characters. A sounds-like
            respelling can't contain `<<` or `>>`.
          example: annum
        soundsLike:
          type: string
          maxLength: 200
          description: >-
            IPA entries only. Respelling spoken by voices whose model can't read
            IPA.
          example: annum
        caseSensitive:
          type: boolean
          default: false
          description: Match the text only with the same capitalization.
          example: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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