Session token
REST endpoint used to obtain a short-lived JWT for the WebSocket connection.
Connection
WebSocket channel, message types, and request/response flow.
Prerequisites
- Python 3.9+
- Organization API key from the Vatel dashboard
- Agent ID (agent UUID) for the agent you want to run the call with
Walkthrough
1
Install the SDK
Install from the repository:
2
Create a client
Create a
Client with your organization API key. Optionally set a different host:3
Get a session token
Generate a short-lived token for the WebSocket. Pass the agent UUID you want to run the call with:Async:
resp = await client.session.generate_token_async(agent_id="...").4
Connect and stream messages
Connect with the token and iterate over incoming messages. Handle events and send tool results as needed:
5
Send audio
Send captured audio as base64-encoded PCM 16-bit, 24 000 Hz, mono:
REST API
The client exposes the REST API; see the API reference for all endpoints. Examples: List agents (sync and async):Tool calls
When the server sends atool_call message, run your logic and send the result back:

