Voice · API Reference
Mint Voice Token
Mints an ephemeral token that a browser can use to open a Voice WebSocket without exposing your long-lived API key. Tokens expire in ~60 seconds and are bound to a single agent. Pass the `agentId` from the response in the WebSocket URL (`/voice/{agentId}?token=…`). You can also provide an inline `agent` config instead of a stored `agentId`.
POST
/v1/voice/tokensScope:
voice:connectRequest Body
agentIdstringoptional
ID of a stored agent to run for the session. Provide this OR `agent`.
agentobjectoptional
Inline agent config for the session. Use instead of `agentId`.
Responses
{
"token": "evt_xxxxx.yyyyy",
"expiresIn": 60,
"agentId": "agt_xxxxxxxxxxxx"
}PlaygroundPOST
AuthorizationBody
agentIdoptionalagentoptional