Skip to main content

Token Endpoint

To start a voice session, send a POST request with your API key to receive a session token and WebSocket URL.

Response

On success, the server returns a JSON object with two fields:

Error Responses

Best Practices

  • Request a fresh token for each voice session — do not cache or reuse tokens
  • Use the token immediately after receiving it — it expires in 5 minutes
  • If the WebSocket connection fails, request a new token before reconnecting
  • Handle authentication errors gracefully and provide user feedback

Health Check

Use the heartbeat endpoint to verify your API key and check server availability before starting a session.

Next Steps

Once you have a token, continue to the WebSocket Protocol page to learn how to establish the connection and start streaming audio.