Publish a version
curl --request POST \
--url https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_latest_version_id": "1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b",
"description": "Add the new product names",
"items": [
{
"key": "Fish Audio",
"value": "fɪʃ ˈɔːdi.oʊ",
"type": "phoneme",
"case_sensitive": false
}
]
}
'import requests
url = "https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions"
payload = {
"expected_latest_version_id": "1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b",
"description": "Add the new product names",
"items": [
{
"key": "Fish Audio",
"value": "fɪʃ ˈɔːdi.oʊ",
"type": "phoneme",
"case_sensitive": False
}
]
}
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({
expected_latest_version_id: '1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b',
description: 'Add the new product names',
items: [
{
key: 'Fish Audio',
value: 'fɪʃ ˈɔːdi.oʊ',
type: 'phoneme',
case_sensitive: false
}
]
})
};
fetch('https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions', 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.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions",
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([
'expected_latest_version_id' => '1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b',
'description' => 'Add the new product names',
'items' => [
[
'key' => 'Fish Audio',
'value' => 'fɪʃ ˈɔːdi.oʊ',
'type' => 'phoneme',
'case_sensitive' => false
]
]
]),
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.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions"
payload := strings.NewReader("{\n \"expected_latest_version_id\": \"1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b\",\n \"description\": \"Add the new product names\",\n \"items\": [\n {\n \"key\": \"Fish Audio\",\n \"value\": \"fɪʃ ˈɔːdi.oʊ\",\n \"type\": \"phoneme\",\n \"case_sensitive\": false\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.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_latest_version_id\": \"1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b\",\n \"description\": \"Add the new product names\",\n \"items\": [\n {\n \"key\": \"Fish Audio\",\n \"value\": \"fɪʃ ˈɔːdi.oʊ\",\n \"type\": \"phoneme\",\n \"case_sensitive\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions")
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 \"expected_latest_version_id\": \"1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b\",\n \"description\": \"Add the new product names\",\n \"items\": [\n {\n \"key\": \"Fish Audio\",\n \"value\": \"fɪʃ ˈɔːdi.oʊ\",\n \"type\": \"phoneme\",\n \"case_sensitive\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b",
"dictionary_id": "9b2f5c0d4e6a4f4c8a1d3e5f7a9b0c2d",
"description": "Add the new product names",
"created_at": "2026-11-05T04:02:44Z",
"items": [
{
"key": "Fish Audio",
"value": "fɪʃ ˈɔːdi.oʊ",
"type": "phoneme",
"case_sensitive": false
}
],
"version_number": 3,
"added_count": 2,
"removed_count": 0,
"changed_count": 1,
"item_count": 12
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}Pronunciation Dictionaries
Publish Version
Publish a new immutable version of a pronunciation dictionary
POST
/
v1
/
pronunciation-dictionaries
/
{dictionary_id}
/
versions
Publish a version
curl --request POST \
--url https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_latest_version_id": "1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b",
"description": "Add the new product names",
"items": [
{
"key": "Fish Audio",
"value": "fɪʃ ˈɔːdi.oʊ",
"type": "phoneme",
"case_sensitive": false
}
]
}
'import requests
url = "https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions"
payload = {
"expected_latest_version_id": "1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b",
"description": "Add the new product names",
"items": [
{
"key": "Fish Audio",
"value": "fɪʃ ˈɔːdi.oʊ",
"type": "phoneme",
"case_sensitive": False
}
]
}
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({
expected_latest_version_id: '1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b',
description: 'Add the new product names',
items: [
{
key: 'Fish Audio',
value: 'fɪʃ ˈɔːdi.oʊ',
type: 'phoneme',
case_sensitive: false
}
]
})
};
fetch('https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions', 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.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions",
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([
'expected_latest_version_id' => '1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b',
'description' => 'Add the new product names',
'items' => [
[
'key' => 'Fish Audio',
'value' => 'fɪʃ ˈɔːdi.oʊ',
'type' => 'phoneme',
'case_sensitive' => false
]
]
]),
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.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions"
payload := strings.NewReader("{\n \"expected_latest_version_id\": \"1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b\",\n \"description\": \"Add the new product names\",\n \"items\": [\n {\n \"key\": \"Fish Audio\",\n \"value\": \"fɪʃ ˈɔːdi.oʊ\",\n \"type\": \"phoneme\",\n \"case_sensitive\": false\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.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_latest_version_id\": \"1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b\",\n \"description\": \"Add the new product names\",\n \"items\": [\n {\n \"key\": \"Fish Audio\",\n \"value\": \"fɪʃ ˈɔːdi.oʊ\",\n \"type\": \"phoneme\",\n \"case_sensitive\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/pronunciation-dictionaries/{dictionary_id}/versions")
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 \"expected_latest_version_id\": \"1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b\",\n \"description\": \"Add the new product names\",\n \"items\": [\n {\n \"key\": \"Fish Audio\",\n \"value\": \"fɪʃ ˈɔːdi.oʊ\",\n \"type\": \"phoneme\",\n \"case_sensitive\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "1c3e5a7b9d0f4a2c8e6b4d1f3a5c7e9b",
"dictionary_id": "9b2f5c0d4e6a4f4c8a1d3e5f7a9b0c2d",
"description": "Add the new product names",
"created_at": "2026-11-05T04:02:44Z",
"items": [
{
"key": "Fish Audio",
"value": "fɪʃ ˈɔːdi.oʊ",
"type": "phoneme",
"case_sensitive": false
}
],
"version_number": 3,
"added_count": 2,
"removed_count": 0,
"changed_count": 1,
"item_count": 12
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}Each version holds the complete, ordered rule list; send every rule you want in the new version, not only the changes. Published versions never change, so TTS requests pinned to an older version keep using its rules.
Set
expected_latest_version_id to the dictionary’s current latest_version_id, or null for the first version. If another version was published in the meantime, the request returns 409. Fetch the new latest version, merge its rules with your changes, and publish again with its ID; resending your original list would drop the other publisher’s changes.
For the rule fields, rule types and limits, see Write Pronunciation Rules.Authorizations
Body
application/json
Response
Document created, URL follows
A version with its full ordered rule list.
Was this page helpful?

