curl --request POST \
--url https://app.thinnest.ai/api/v1/byok/voices/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice": "EXAVITQu4vr4xnSDxMaL",
"agentId": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
"language": "hi-IN"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voice: 'EXAVITQu4vr4xnSDxMaL',
agentId: 'ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71',
language: 'hi-IN'
})
};
fetch('https://app.thinnest.ai/api/v1/byok/voices/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/byok/voices/preview"
payload = {
"voice": "EXAVITQu4vr4xnSDxMaL",
"agentId": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
"language": "hi-IN"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)"<string>"Preview BYOK Voice
Speaks one short line in a voice of your own voice provider, on your key, and answers with the audio itself. Your provider charges you for the characters, so text is capped at 200; without it the voice says a short greeting of ours in language, or the agent’s language when you name an agent. Soniox has no preview: it speaks only on a live call. Needs a full key.
curl --request POST \
--url https://app.thinnest.ai/api/v1/byok/voices/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice": "EXAVITQu4vr4xnSDxMaL",
"agentId": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
"language": "hi-IN"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voice: 'EXAVITQu4vr4xnSDxMaL',
agentId: 'ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71',
language: 'hi-IN'
})
};
fetch('https://app.thinnest.ai/api/v1/byok/voices/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/byok/voices/preview"
payload = {
"voice": "EXAVITQu4vr4xnSDxMaL",
"agentId": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
"language": "hi-IN"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)"<string>"Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
A voice id from List BYOK Voices.
160An agent (ag_…) whose language the line is spoken in when you send no language.
The line to speak, up to 200 characters. Left out, a short greeting of ours.
200A language tag such as hi-IN or en, for the line and the voice.
^[A-Za-z]{2,3}([-_][A-Za-z]{2,4})?$Response
The spoken line. audio/mpeg from most providers; audio/wav from some (Sarvam). Cacheable privately for an hour.
The audio of the spoken line.