Skip to main content
Real-time voice provides a low-latency spoken interface to the grounded AutoSage runtime. Unlike the versioned REST API, voice is served directly at the API root under /voice.

Endpoints

ProtocolPathDescriptionAuth
WebSocket/voice/realtimeStart a real-time voice session[User]
GET/voice/healthCheck voice service readiness[Public]

Open a real-time session

Connect to:
wss://api.autosage.ai/voice/realtime?kbId=KB_ID
kbId
string
required
Knowledge base used for grounded voice responses.
token
string
Signed-in user session token when a session cookie cannot be sent during the WebSocket handshake.
The handshake must authenticate a signed-in user, either through the normal session headers/cookie or the token query parameter. AutoSage verifies that the user can access the knowledge base and that the tenant has credits before starting the session.
token is a user session token, not an sk_... API key. Do not place long-lived credentials in browser-visible URLs or logs.
Once connected, the socket carries bidirectional audio and transcript events. The runtime can ground responses in the selected knowledge base and its configured data connections. When the socket closes, AutoSage saves the user and assistant transcript as a chat and records session usage. Common server message types include connected, speech_started, speech_stopped, audio, audio_done, assistant_transcript, user_transcript, response_done, and error. The detailed audio payload and client-message protocol can evolve independently of the REST schemas.
For production protocol details, contact the AutoSage team and consult the API explorer at /swagger. Build clients to ignore unknown message types so additive protocol updates remain compatible.

Check readiness

GET /voice/health
curl "https://api.autosage.ai/voice/health"
Returns ready when the voice service is configured or not_configured otherwise.

Next steps

Chat lifecycle

Understand how grounded conversation state is persisted.

Knowledge bases

Prepare the content that grounds voice sessions.