Real-Time WebSocket API Documentation

Connect voice applications using WebSockets for low-latency communication, streaming, and real-time interactions.

WebSocket Endpoints

Voice Stream

Bidirectional audio streaming for voice calls:

wss://api.voxentis.com/v1/calls/{call_id}/stream

Live Transcript

Receive real-time transcripts (read-only):

wss://api.voxentis.com/v1/calls/{call_id}/transcript/live

Call Events

Subscribe to all events for a specific call:

wss://api.voxentis.com/v1/calls/{call_id}/events

Agent Events (Dashboard)

Subscribe to all events across all calls for an agent:

wss://api.voxentis.com/v1/agents/{agent_id}/events

Authentication

Pass your API key in the connection URL or as a header during the WebSocket handshake.

import websockets

async with websockets.connect(
    "wss://api.voxentis.com/v1/calls/call_123/stream",
    extra_headers={"Authorization": "Bearer YOUR_API_KEY"}
) as ws:
    ...

Message Types

Client → Server

TypeDescription
audioBinary audio frame (voice stream only)
configUpdate stream configuration
pingKeepalive ping (server responds with pong)
closeGracefully close the connection

Server → Client

TypeDescription
audioBinary audio frame from the agent
transcript.interimPartial transcript of caller speech
transcript.finalFinal transcript of caller speech
agent.speakingAgent started/stopped speaking
tool.invokedTool call initiated
tool.resultTool call completed
call.started / call.endedCall lifecycle events