Skip to main content

Installation

Or install directly from source:
Requirements: Python 3.9+, httpx>=0.24.0, pydantic>=2.0.0

Authentication

Every client call injects your API key as the X-API-Key header. Generate a key from app.vaanivoice.aiSettings → API Keys.
Use the client as a context manager to ensure the HTTP connection is properly closed:

Outbound Calls

Trigger a Call

Call History

Transcript and Call Details

Stream Audio


WebRTC Voice Sessions

Use client.sessions to create and manage real-time voice sessions powered by LiveKit.

Flow Overview

1

Create a session

Call client.sessions.create(...) to get a session_token and an embeddable session_url.
2

Connect and get LiveKit credentials

Call client.sessions.connect(session_token) to obtain lk_url and lk_token.
3

Join via LiveKit

Pass lk_url and lk_token to the LiveKit client SDK in your browser or mobile app to establish the WebRTC connection.
4

End the session

Call client.sessions.disconnect(session_token) when the user leaves.

Quickstart

sessions.create() Parameters

Real-Time Session Events

Connect to the WebSocket URL to receive push events while the session is active:

Agent Management

Create an Agent

List and Inspect Agents

Update Agent Configuration


Async Usage

Every method has an exact async equivalent on AsyncVaaniClient, including all resource namespaces.

Error Handling

All SDK exceptions inherit from VaaniError and carry a .status_code attribute.