For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • API reference
    • Introduction
    • Authentication
    • Streaming
  • ElevenAgents
  • ElevenAPI
      • POSTCreate a pronunciation dictionary from a file
      • POSTCreate a pronunciation dictionary from rules
      • GETGet pronunciation dictionary
      • PATCHUpdate Pronunciation Dictionary
      • GETGet pronunciation dictionary by version
      • GETList pronunciation dictionaries
        • POSTSet pronunciation dictionary rules
        • POSTAdd pronunciation dictionary rules
        • POSTRemove pronunciation dictionary rules
  • ElevenCreative
  • Core Resources
  • Workspace
  • Legacy
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
ElevenAPIPronunciation DictionariesRules

Add pronunciation dictionary rules

POST
/v1/pronunciation-dictionaries/:pronunciation_dictionary_id/add-rules
POST
/v1/pronunciation-dictionaries/:pronunciation_dictionary_id/add-rules
$curl -X POST https://api.elevenlabs.io/v1/pronunciation-dictionaries/pronunciation_dictionary_id/add-rules \
> -H "Content-Type: application/json" \
> -d '{
> "rules": [
> {
> "string_to_replace": "string",
> "type": "string",
> "alias": "string"
> }
> ]
>}'
1{
2 "id": "5xM3yVvZQKV0EfqQpLrJ",
3 "version_id": "5xM3yVvZQKV0EfqQpLr2",
4 "version_rules_num": 5
5}

Add rules to the pronunciation dictionary. If a rule with the same string_to_replace already exists, it will be replaced.

Was this page helpful?
Previous

Remove pronunciation dictionary rules

Next
Built with

Path parameters

pronunciation_dictionary_idstringRequired
The id of the pronunciation dictionary

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
ruleslist of objectsRequired

List of pronunciation rules. Rule can be either: an alias rule: {‘string_to_replace’: ‘a’, ‘type’: ‘alias’, ‘alias’: ‘b’, } or a phoneme rule: {‘string_to_replace’: ‘a’, ‘type’: ‘phoneme’, ‘phoneme’: ‘b’, ‘alphabet’: ‘ipa’ }

Response

Successful Response
idstring
The ID of the pronunciation dictionary.
version_idstring
The version ID of the pronunciation dictionary.
version_rules_numinteger
The number of rules in the version of the pronunciation dictionary.

Errors

422
Unprocessable Entity Error