Overview
The Vaani Backend API provides endpoints for building and configuring voice agents, triggering and managing calls, and connecting in-browser sessions via WebRTC. All endpoints require API key authentication via the X-API-Key header.
Authentication
All endpoints require API key authentication. Include your API key in the request header:
X-API-Key: vaani_<your_key>
Keep your API key secure and never expose it in client-side code or public repositories.
Base URL
All endpoints are prefixed with /api/. The base URL is:
https://api.vaanivoice.ai
API Version
Current API version: 2.0.0
Agent Builder
Use these endpoints to programmatically create and configure agents via the API.
| Method | Endpoint | Description |
|---|
POST | /api/create-agent | Create a new agent |
PATCH | /api/agent/{agent_id}/persona | Update identity, AI providers |
PATCH | /api/agent/{agent_id}/training | Update knowledge base, FAQ, guardrails |
PATCH | /api/agent/{agent_id}/experience | Update conversational feel and call settings |
PATCH | /api/agent/{agent_id}/analysis | Update post-call evaluation and data extraction |
PATCH | /api/agent/{agent_id}/deployment | Update phone number routing |
All PATCH endpoints perform a partial merge — only the fields you send are updated.
Call Management
| Method | Endpoint | Description |
|---|
POST | /api/trigger-call/ | Trigger an outbound call |
POST | /api/webrtc/token | Generate a LiveKit WebRTC token |
GET | /api/call-history | Paginated call history |
GET | /api/transcript/{call_id} | Get call transcript |
GET | /api/call_details/{call_id} | Get call details, summary, and extractions |
GET | /api/stream/{call_id} | Stream audio recording |