{ url, token } for the browser SDK. Never put your API key in frontend code.
Rate limited to 10 requests per minute per authenticated user.Concurrent cap of 10 sessions per account. Unused tokens count toward this cap until they expire (15 minutes). In-progress website-widget voice sessions on the same account also count.
Request body
assistant_idstring required
The assistant UUID. Use the uuid field from Get Assistants, not the numeric id.
variables object
Optional context variables passed into the assistant (prompt variables). Keys and scalar values only. Maximum 50 keys.
external_identifier string
Optional CRM or customer id. Passed through as a variable when not already set.
Maximum length: 255 characters.
Response
idstring
Session id (UUID). Useful for your own logging.
url string
Media server URL. Pass this to the browser SDK. Do not expose it in a public repo or log it in client analytics.
token string
Short-lived session token. Treat it like a password. Pass it to the browser SDK only.
expires_in number
Token lifetime in seconds. Currently 900 (15 minutes).
Browser SDK
Install@voice-session/web and pass url and token from this response. Do not send the API key to the browser.
Example
Error responses
successboolean
false when the request fails
error string
Human-readable error message
error_code string
One of ASSISTANT_NOT_FOUND, ASSISTANT_BLOCKED, INSUFFICIENT_BALANCE, CONCURRENT_LIMIT, CONNECTION_FAILED

