Skip to main content
POST
/
api
/
v1
/
pronunciation-dictionaries
Create a new pronunciation dictionary
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    provider: '<string>',
    name: '<string>',
    rules: [{text: '<string>', alias: '<string>'}]
  })
};

fetch('https://blackbox.dasha.ai/api/v1/pronunciation-dictionaries', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "providerId": "<string>",
  "provider": "<string>",
  "orgId": "<string>",
  "contentHash": "<string>",
  "content": [
    {
      "type": "alias",
      "text": "<string>",
      "alias": "<string>"
    }
  ],
  "name": "<string>",
  "createdTime": "2023-11-07T05:31:56Z",
  "lastUpdatedTime": "2023-11-07T05:31:56Z"
}

Body

Dictionary creation request

Request DTO for creating a new pronunciation dictionary

provider
string
required

TTS provider name - must be 'ElevenLabs' or 'Cartesia' (case-insensitive)

Minimum string length: 1
name
string
required

Human-readable name for the dictionary (1-64 characters)

Required string length: 1 - 64
rules
object[]
required

List of pronunciation rules

Base class for pronunciation rules using the discriminator pattern. Uses TypeIndicatorConverter for polymorphic JSON serialization.

Response

Dictionary created successfully

Response DTO for pronunciation dictionary operations

providerId
string
required

Provider-specific ID of the pronunciation dictionary

Minimum string length: 1
provider
string
required

TTS provider name (e.g., 'ElevenLabs', 'Cartesia')

Minimum string length: 1
orgId
string
required

Organization ID

Minimum string length: 1
contentHash
string
required

Hash of the dictionary content for version tracking

Minimum string length: 1
content
object[]
required

List of pronunciation rules in this dictionary

Base class for pronunciation rules using the discriminator pattern. Uses TypeIndicatorConverter for polymorphic JSON serialization.

name
string
required

Human-readable name of the dictionary

Minimum string length: 1
createdTime
string<date-time>
required

When the dictionary was created

lastUpdatedTime
string<date-time>
required

When the dictionary was last updated