All requests require an X-API-Key header.
X-API-Key: your-project-api-key
All endpoints are relative to:
https://voxai.ai0.dev/api/v1
Enter your API key here to test endpoints directly from the browser.
/api/v1/token
Generate a LiveKit token to join a room. Optionally dispatches one or more agents.
| Field | Type | Required | Description |
|---|---|---|---|
identity | string | Yes | User identity for the room |
room | string | Yes | Room name (auto-prefixed with project prefix) |
agent_config_id | number | No | Single agent to dispatch |
agent_config_ids | number[] | No | Multiple agents to dispatch |
no_agent | boolean | No | If true, no agent is dispatched |
grants | object | No | Extra LiveKit grants |
{
"token": "eyJ...",
"room": "proj_my-room",
"wsUrl": "wss://livekit.example.com",
"agents_dispatched": [1]
}curl -X POST https://voxai.ai0.dev/api/v1/token \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{"identity":"user1","room":"my-room"}'/api/v1/agents
Returns all agent configurations for the project associated with your API key.
{
"agents": [
{ "id": 1, "name": "Support Agent", "agent_type": "voice", "llm_provider": "openai", "llm_model": "gpt-4o", "is_active": true }
]
}curl https://voxai.ai0.dev/api/v1/agents \
-H "X-API-Key: YOUR_KEY"/api/v1/agents/:agentId/tools
Returns the list of tool definitions configured for a specific agent.
| Param | Type | Description |
|---|---|---|
agentId | number | The agent config ID |
curl https://voxai.ai0.dev/api/v1/agents/1/tools \
-H "X-API-Key: YOUR_KEY"/api/v1/rooms
Returns all currently active LiveKit rooms for your project.
{
"rooms": [
{ "name": "my-room", "fullName": "proj_my-room", "numParticipants": 2, "createdAt": 1711800000 }
]
}curl https://voxai.ai0.dev/api/v1/rooms \
-H "X-API-Key: YOUR_KEY"/api/v1/rooms/:roomName/participants
Returns participants currently in a specific room.
| Param | Type | Description |
|---|---|---|
roomName | string | Room name (without project prefix) |
curl https://voxai.ai0.dev/api/v1/rooms/my-room/participants \
-H "X-API-Key: YOUR_KEY"/api/v1/sessions
Creates a new session log entry for tracking agent conversations.
| Field | Type | Required | Description |
|---|---|---|---|
room_name | string | Yes | Room name for the session |
agent_config_id | number | No | Agent config ID |
caller_identity | string | No | Caller identity |
session_type | string | No | "voice" or "sip" (default: "voice") |
metadata | object | No | Arbitrary metadata |
curl -X POST https://voxai.ai0.dev/api/v1/sessions \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{"room_name":"proj_my-room","caller_identity":"user1"}'/api/v1/sessions/:roomName/transcript
Adds a transcript entry to an active session for a given room.
| Field | Type | Required | Description |
|---|---|---|---|
speaker | string | Yes | "agent", "user", or "system" |
content | string | Yes | Transcript text |
timestamp_ms | number | No | Timestamp in milliseconds |
is_final | boolean | No | Whether this is a final transcript (default true) |
curl -X POST https://voxai.ai0.dev/api/v1/sessions/proj_my-room/transcript \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{"speaker":"user","content":"Hello agent"}'/api/v1/sessions/:roomName/end
Ends an active session, marking it as completed.
| Field | Type | Required | Description |
|---|---|---|---|
summary | string | No | Session summary text |
duration | number | No | Override duration in seconds |
curl -X POST https://voxai.ai0.dev/api/v1/sessions/proj_my-room/end \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{"summary":"User asked about pricing"}'/api/v1/knowledge/search
Performs a RAG (semantic) search against a knowledge base.
| Field | Type | Required | Description |
|---|---|---|---|
knowledge_base_id | number | Yes | Knowledge base ID |
query | string | Yes | Search query text |
top_k | number | No | Number of results (default 5) |
curl -X POST https://voxai.ai0.dev/api/v1/knowledge/search \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{"knowledge_base_id":1,"query":"How do I reset password?"}'/api/v1/usage
Returns usage and cost data for your project, with optional period and grouping.
| Param | Type | Default | Description |
|---|---|---|---|
period | string | 30d | "today", "7d", "30d", or "all" |
group_by | string | day | "day", "model", "agent", or "service" |
curl "https://voxai.ai0.dev/api/v1/usage?period=7d&group_by=model" \
-H "X-API-Key: YOUR_KEY"/api/v1/projects/:projectId/secrets/:provider
Returns decrypted secrets for the specified provider. Used by agent servers at runtime.
| Param | Type | Description |
|---|---|---|
projectId | number | Must match the project of your API key |
provider | string | "openai", "deepgram", "elevenlabs", "cartesia", etc. |
curl https://voxai.ai0.dev/api/v1/projects/1/secrets/openai \
-H "X-API-Key: YOUR_KEY"LiveKit sends webhook events to POST /webhooks/livekit with content type application/webhook+json. Configure your LiveKit server to point to:
https://voxai.ai0.dev/webhooks/livekitEvents include: room_started, room_finished, participant_joined, participant_left, track_published, etc.