You need an organization API key (from the Vatel dashboard) and an agent ID for the agent you want to run. Session tokens are short-lived JWTs obtained via the API and used to open the WebSocket connection.
Choose your language
Python
REST and WebSocket with async support. Python 3.9+.
JavaScript / TypeScript
Node.js and browser. REST client and WebSocket session.
Go
Single client for REST and WebSocket. Go 1.21+.
WebSockets
Real-time voice sessions. Send audio, receive events, and handle tool calls.
API Reference
Full request/response details and all endpoints.
How it works
Get credentials and agent ID
Use your organization API key and the agent UUID from the dashboard (or from the REST API).
Obtain a session token
Call the session-token endpoint with your API key and agent ID. The token authorizes one WebSocket connection for that agent.
API reference
For full request/response details and all endpoints, see the API reference:Session token
Get a short-lived JWT for the WebSocket connection.
Connection
WebSocket URL, message types, and flow.
Next steps
Next.js example
Full Session WebSocket demo in Next.js: server-side token, real-time voice, and event display.

