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
OverviewElevenCreativeElevenAgentsElevenAPIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIAPI 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

Set pronunciation dictionary rules

POST
/v1/pronunciation-dictionaries/:pronunciation_dictionary_id/set-rules
POST
/v1/pronunciation-dictionaries/:pronunciation_dictionary_id/set-rules
$curl -X POST https://api.elevenlabs.io/v1/pronunciation-dictionaries/pronunciation_dictionary_id/set-rules \
> -H "Content-Type: application/json" \
> -d '{
> "rules": [
> {
> "string_to_replace": "colour",
> "type": "alias",
> "alias": "color"
> },
> {
> "string_to_replace": "route",
> "type": "phoneme",
> "alias": "string"
> }
> ]
>}'
1{
2 "id": "5xM3yVvZQKV0EfqQpLrJ",
3 "version_id": "5xM3yVvZQKV0EfqQpLr2",
4 "version_rules_num": 2
5}
Replaces all existing rules on the pronunciation dictionary with the provided ones.
Was this page helpful?
Previous

Add 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

Successfully set rules on the pronunciation dictionary
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