---
title: "import pronunciation dictionary"
method: POST
path: "/v1/pronunciation-dictionaries/import"
tags: ["Pronunciation Dictionaries"]
---

# import pronunciation dictionary

`POST /v1/pronunciation-dictionaries/import`

## Request

- Base URL: `https://api.anam.ai`
- URL: `https://api.anam.ai/v1/pronunciation-dictionaries/import`
- Auth: HTTP bearer

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.

## Request body

- object
  - `name` string, required: Display name for the new dictionary
  - `json` union, required: The file's rows, either as an array or as the file's contents in a string.
    - object[]
      - `text` string, required
      - `pronunciation` string, required: Respelling, or Cartesia IPA markup between `<<` and `>>`
      - `sounds_like` string: IPA rows only. Respelling spoken by voices whose model can't read IPA.
      - `case_sensitive` boolean
    - string: The file's contents

## Response `201`

Successfully imported pronunciation dictionary

- PronunciationDictionary: 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.
  - `id` string, uuid: Pronunciation dictionary ID. Pass it as `voiceGenerationOptions.pronunciationDictionaryId` when creating a session token.
  - `name` string: Display name
  - `revision` integer: Starts at 1 and increases with every save. Send it as `expectedRevision` to reject a write if someone else saved first.
  - `createdAt` string, date-time: When the dictionary was created
  - `updatedAt` string, date-time: When the dictionary was last saved
  - `entries` PronunciationEntry[]
    - `text` string, required: Word or phrase to replace, at most 100 Unicode characters.
    - `kind` 'sounds_like' | 'ipa': - `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.
    - `pronunciation` string, required: How to say the text, at most 200 Unicode characters. A sounds-like respelling can't contain `<<` or `>>`.
    - `soundsLike` string: IPA entries only. Respelling spoken by voices whose model can't read IPA.
    - `caseSensitive` boolean: Match the text only with the same capitalization.

## Other responses

- `400`: Bad request - The body is not valid JSON
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - API key lacks write access to pronunciation dictionaries
- `422`: Unprocessable - The name or file is invalid. `field` uses the file's names, such as `case_sensitive`. Nothing was saved.
- `429`: Too many requests - Your organization made more than 60 pronunciation dictionary writes (creates, imports, updates and archives) this minute. Rejected writes count too.
- `500`: Server error
- `503`: The API key could not be checked because of a temporary server problem. The key may be valid; retry after `Retry-After` seconds.

## Changes

- **2026-10-26** `e85ef0cd491e`: 1 info
  - added the non-success response with the status `503`
- **2026-10-14** `5ae8f3dbfe52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anam/apis/anam-ai-api/changes/v1/pronunciation-dictionaries/import/post.md)

---

[API](https://skmtc.dev/anam/apis/anam-ai-api.md) - [All operations](https://skmtc.dev/anam/apis/anam-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anam/apis/anam-ai-api/revisions/3e535ea89083?raw)
