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)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. On a Cartesia key, speed, volume, emotion, model and pronunciationDictId are spoken too, so a setting is heard before it is saved (they work as in Set Agent BYOK Voice; the agent’s saved settings are not read). 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)Authorizations
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. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
The line to speak, up to 200 characters. Left out, a short greeting of ours.
200Response
The spoken line. audio/mpeg from most providers; audio/wav from some (Sarvam). Cacheable privately for an hour.
The audio of the spoken line.