curl --request POST \
--url https://api.anam.ai/v1/pronunciation-dictionaries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Brand names",
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "SQL",
"pronunciation": "sequel",
"caseSensitive": true
},
{
"text": "Zorvex",
"kind": "ipa",
"pronunciation": "<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>",
"soundsLike": "zor vex"
}
]
}
'import requests
url = "https://api.anam.ai/v1/pronunciation-dictionaries"
payload = {
"name": "Brand names",
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "SQL",
"pronunciation": "sequel",
"caseSensitive": True
},
{
"text": "Zorvex",
"kind": "ipa",
"pronunciation": "<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>",
"soundsLike": "zor vex"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Brand names',
entries: [
{text: 'Anam', pronunciation: 'annum'},
{text: 'SQL', pronunciation: 'sequel', caseSensitive: true},
{
text: 'Zorvex',
kind: 'ipa',
pronunciation: '<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>',
soundsLike: 'zor vex'
}
]
})
};
fetch('https://api.anam.ai/v1/pronunciation-dictionaries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anam.ai/v1/pronunciation-dictionaries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Brand names',
'entries' => [
[
'text' => 'Anam',
'pronunciation' => 'annum'
],
[
'text' => 'SQL',
'pronunciation' => 'sequel',
'caseSensitive' => true
],
[
'text' => 'Zorvex',
'kind' => 'ipa',
'pronunciation' => '<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>',
'soundsLike' => 'zor vex'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anam.ai/v1/pronunciation-dictionaries"
payload := strings.NewReader("{\n \"name\": \"Brand names\",\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"SQL\",\n \"pronunciation\": \"sequel\",\n \"caseSensitive\": true\n },\n {\n \"text\": \"Zorvex\",\n \"kind\": \"ipa\",\n \"pronunciation\": \"<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>\",\n \"soundsLike\": \"zor vex\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anam.ai/v1/pronunciation-dictionaries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Brand names\",\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"SQL\",\n \"pronunciation\": \"sequel\",\n \"caseSensitive\": true\n },\n {\n \"text\": \"Zorvex\",\n \"kind\": \"ipa\",\n \"pronunciation\": \"<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>\",\n \"soundsLike\": \"zor vex\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/pronunciation-dictionaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Brand names\",\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"SQL\",\n \"pronunciation\": \"sequel\",\n \"caseSensitive\": true\n },\n {\n \"text\": \"Zorvex\",\n \"kind\": \"ipa\",\n \"pronunciation\": \"<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>\",\n \"soundsLike\": \"zor vex\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "4f600129-13cf-4bfa-909a-2f4c31467f43",
"name": "Brand names",
"revision": 1,
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:00:00.000Z",
"entries": [
{
"text": "Anam",
"kind": "sounds_like",
"pronunciation": "annum",
"caseSensitive": false
},
{
"text": "SQL",
"kind": "sounds_like",
"pronunciation": "sequel",
"caseSensitive": true
},
{
"text": "Zorvex",
"kind": "ipa",
"pronunciation": "<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>",
"soundsLike": "zor vex",
"caseSensitive": false
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "Invalid pronunciation dictionary",
"details": [
{
"row": 2,
"field": "pronunciation",
"message": "Must not contain [ or ]"
},
{
"row": 3,
"field": "text",
"message": "Same word or phrase as row 1. Remove one, or turn on Match case for both if they differ only in case."
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}create pronunciation dictionary
Creates a pronunciation dictionary. Select it for a session with voiceGenerationOptions.pronunciationDictionaryId.
Entries are validated as a whole: if any entry is invalid, nothing is saved and the response lists every error by one-based row.
curl --request POST \
--url https://api.anam.ai/v1/pronunciation-dictionaries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Brand names",
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "SQL",
"pronunciation": "sequel",
"caseSensitive": true
},
{
"text": "Zorvex",
"kind": "ipa",
"pronunciation": "<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>",
"soundsLike": "zor vex"
}
]
}
'import requests
url = "https://api.anam.ai/v1/pronunciation-dictionaries"
payload = {
"name": "Brand names",
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "SQL",
"pronunciation": "sequel",
"caseSensitive": True
},
{
"text": "Zorvex",
"kind": "ipa",
"pronunciation": "<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>",
"soundsLike": "zor vex"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Brand names',
entries: [
{text: 'Anam', pronunciation: 'annum'},
{text: 'SQL', pronunciation: 'sequel', caseSensitive: true},
{
text: 'Zorvex',
kind: 'ipa',
pronunciation: '<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>',
soundsLike: 'zor vex'
}
]
})
};
fetch('https://api.anam.ai/v1/pronunciation-dictionaries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anam.ai/v1/pronunciation-dictionaries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Brand names',
'entries' => [
[
'text' => 'Anam',
'pronunciation' => 'annum'
],
[
'text' => 'SQL',
'pronunciation' => 'sequel',
'caseSensitive' => true
],
[
'text' => 'Zorvex',
'kind' => 'ipa',
'pronunciation' => '<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>',
'soundsLike' => 'zor vex'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anam.ai/v1/pronunciation-dictionaries"
payload := strings.NewReader("{\n \"name\": \"Brand names\",\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"SQL\",\n \"pronunciation\": \"sequel\",\n \"caseSensitive\": true\n },\n {\n \"text\": \"Zorvex\",\n \"kind\": \"ipa\",\n \"pronunciation\": \"<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>\",\n \"soundsLike\": \"zor vex\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anam.ai/v1/pronunciation-dictionaries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Brand names\",\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"SQL\",\n \"pronunciation\": \"sequel\",\n \"caseSensitive\": true\n },\n {\n \"text\": \"Zorvex\",\n \"kind\": \"ipa\",\n \"pronunciation\": \"<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>\",\n \"soundsLike\": \"zor vex\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/pronunciation-dictionaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Brand names\",\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"SQL\",\n \"pronunciation\": \"sequel\",\n \"caseSensitive\": true\n },\n {\n \"text\": \"Zorvex\",\n \"kind\": \"ipa\",\n \"pronunciation\": \"<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>\",\n \"soundsLike\": \"zor vex\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "4f600129-13cf-4bfa-909a-2f4c31467f43",
"name": "Brand names",
"revision": 1,
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:00:00.000Z",
"entries": [
{
"text": "Anam",
"kind": "sounds_like",
"pronunciation": "annum",
"caseSensitive": false
},
{
"text": "SQL",
"kind": "sounds_like",
"pronunciation": "sequel",
"caseSensitive": true
},
{
"text": "Zorvex",
"kind": "ipa",
"pronunciation": "<<ˈ|z|ɔ|ɹ|v|ɛ|k|s>>",
"soundsLike": "zor vex",
"caseSensitive": false
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "Invalid pronunciation dictionary",
"details": [
{
"row": 2,
"field": "pronunciation",
"message": "Must not contain [ or ]"
},
{
"row": 3,
"field": "text",
"message": "Same word or phrase as row 1. Remove one, or turn on Match case for both if they differ only in case."
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Successfully created pronunciation dictionary
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.
Pronunciation dictionary ID. Pass it as voiceGenerationOptions.pronunciationDictionaryId when creating a session token.
"4f600129-13cf-4bfa-909a-2f4c31467f43"
Display name
"Brand names"
Starts at 1 and increases with every save. Send it as expectedRevision to reject a write if someone else saved first.
x >= 11
When the dictionary was created
When the dictionary was last saved
Show child attributes
Show child attributes
Was this page helpful?

