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
  • ElevenCreative
  • Core Resources
  • Workspace
  • Legacy
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
ElevenAPIPronunciation Dictionaries

Create a pronunciation dictionary from rules

POST
/v1/pronunciation-dictionaries/add-from-rules
POST
/v1/pronunciation-dictionaries/add-from-rules
$curl -X POST https://api.elevenlabs.io/v1/pronunciation-dictionaries/add-from-rules \
> -H "Content-Type: application/json" \
> -d '{
> "rules": [
> {
> "string_to_replace": "string",
> "type": "string",
> "alias": "string"
> }
> ],
> "name": "My Dictionary"
>}'
1{
2 "id": "5xM3yVvZQKV0EfqQpLrJ",
3 "name": "My Dictionary",
4 "created_by": "ar6633Es2kUjFXBdR1iVc9ztsXl1",
5 "creation_time_unix": 1714156800,
6 "version_id": "5xM3yVvZQKV0EfqQpLrJ",
7 "version_rules_num": 5,
8 "permission_on_resource": "admin",
9 "description": "This is a test dictionary"
10}
Creates a new pronunciation dictionary from provided rules.
Was this page helpful?
Previous

Get pronunciation dictionary

Next
Built with

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’ }

namestringRequired
The name of the pronunciation dictionary, used for identification only.
descriptionstring or nullOptional
A description of the pronunciation dictionary, used for identification only.
workspace_accessenum or nullOptional
Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.
Allowed values:

Response

Successful Response
idstring
The ID of the created pronunciation dictionary.
namestring
The name of the created pronunciation dictionary.
created_bystring
The user ID of the creator of the pronunciation dictionary.
creation_time_unixinteger
The creation time of the pronunciation dictionary in Unix timestamp.
version_idstring
The ID of the created pronunciation dictionary version.
version_rules_numinteger
The number of rules in the version of the pronunciation dictionary.
permission_on_resourceenum or null
The permission on the resource of the pronunciation dictionary.
Allowed values:
descriptionstring or null
The description of the pronunciation dictionary.

Errors

422
Unprocessable Entity Error