Get Agent BYOK Voice

Agents

Get Agent BYOK Voice

On a workspace that brings its own keys: the voice this agent speaks with on your own voice provider. voice is null for the provider's default voice. A choice belongs to the provider it was made on; after you switch your voice key to another provider, stale holds the old choice and calls speak the new provider's default until you choose again. On a Cartesia key the response also holds how the voice sounds: speed, volume, emotion, agentModel (this agent's own Sonic model; model is always your key's) and pronunciationDictId, each null while unset. Refused with 409 when the workspace is not using its own voice key (it brings no keys, or only its language model), or when this agent is set to byok: "off" (it then speaks in our voices).

GET/agents/{id}/byok-voice

Path parameters

idstringrequired
The agent's id (ag_…), as List Agents returns it. Another workspace's agent is the same 404 as one that never existed.

Headers

Katexs-Workspacestring
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.

Example request

bash
curl "https://app.katexs.com/api/v1/agents/{id}/byok-voice" \
  -H "Authorization: Bearer $KATEXS_API_KEY"

Responses

StatusDescription
200The agent's voice on your provider.
400Katexs-Workspace was sent from a workspace that is not a developer workspace.
401The key is missing, wrong or revoked. The answer is always the same, whichever it is.
403The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden.
404The id is not an agent id.
409The workspace is not using its own keys — or the agent is not in it (this route answers both the same way).
410The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date.
429Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit.

Response fields

providerobjectrequired
One of your own providers.
modelstring | nullrequired
The model your voice key runs.
voicestring | nullrequired
The voice this agent speaks with on this provider, or null for the provider's default.
speednumber | null
Cartesia only: the speed set for this agent (0.6 to 1.5), or null for Cartesia's own.
volumenumber | null
Cartesia only: the volume set for this agent (0.5 to 2.0), or null for Cartesia's own.
emotionstring | null
Cartesia only: the emotion set for this agent (English only), or null to let the words decide.
agentModelstring | null
Cartesia only: the Sonic model this agent speaks on instead of your key's model, or null for the key's.
pronunciationDictIdstring | null
Cartesia only: the pronunciation dictionary used for this agent, or null for none.
staleobject | nullrequired
A choice made on a different provider, which no longer applies; null when there is none.
200 response
{
  "provider": {
    "id": "elevenlabs",
    "label": "ElevenLabs"
  },
  "model": "eleven_flash_v2_5",
  "voice": "EXAVITQu4vr4xnSDxMaL",
  "speed": null,
  "volume": null,
  "emotion": null,
  "agentModel": null,
  "pronunciationDictId": null,
  "stale": null
}

Last updated November 2026 · Found a problem? Email support@katexs.com