How it works
- Start a session — Call the REST endpoint or connect directly via WebSocket
- Connect — Open a WebSocket connection to the returned URL
- Stream audio — Send microphone audio as base64 PCM chunks; receive audio responses the same way
- End the session — Send a
stopmessage, or simply close the WebSocket
Getting Started
There are two ways to start a voice session. Choose the one that fits your stack.Option A: SDK / REST (recommended)
CallPOST /v1/voice to validate your request and receive a WebSocket URL with a ready-made start message. Then connect to the URL and send the message as the first frame.
POST /v1/voice depends on Redis to issue a short-lived REST-to-WebSocket handoff token. During a Redis incident, clients that can construct their own start message may use the direct WebSocket flow below with a raw API key.Option B: Direct WebSocket
If you prefer to skip the REST call, connect directly to the WebSocket endpoint with your API key:start message manually as the first frame:
Client → Server Messages
All messages are JSON objects with atype field and an optional payload.
start — Begin a voice session
audio — Send an audio chunk
ready message before sending audio.
stop — End the session
ended message containing the session transcript and credits consumed.
stop is optional. Closing the WebSocket connection also gracefully ends the session and commits all buffered content server-side. The only difference is that with stop, you receive the ended response containing the final transcript and credit usage before the connection closes.interrupt — Interrupt the agent
interrupted message.
Voice Configuration
Thevoice_config option in the start message allows you to customize voice session behavior:
Available Voice Presets
Server → Client Messages
started — Session established
start message is processed. Contains the IDs for the session, conversation, and initial message.
ready — Agent is ready to receive audio
audio — Agent audio response
audio messages are sent in sequence as the agent speaks.
tool_call — Agent is using a tool
"started" or "completed". Use this to show loading indicators while the agent searches knowledge or uses other tools.
transcript — Real-time transcription
role field is either "user" or "agent". Use this to display a live transcript as the conversation progresses.
citation — Source citation
/v1/converse CitationSource schema: the core fields (type, source_name, optional source_id/source_uri, and confirmations) are identical, so external clients can treat voice and SSE citations the same way. Sources also include optional per-type enrichment fields (e.g. page_number/data_lake_item_id/item_type for pdf_page, table_id/content/record_title/status/fields/item_type for record, thumbnail_url for web_search, query_view/task_explanation for sql_query_result, fact_data for action) that clients may use or ignore. The timestamp_ms is relative to the session start, and message_id is the stable id of the agent turn that produced the citations — use it to correlate a citation to the turn it supports.
interrupted — Agent was interrupted
interrupt message.
error — An error occurred
ended — Session ended
stop message, server-side timeout, or error). Contains the final transcript and credit usage.
Session Lifecycle
WebSocket Close Codes
Voice Orchestrator Tasks
Default orchestrator voice sessions can delegate longer-running work to specialist agents. When delegated work continues after the voice-safe turn budget, the server persists task status so clients can show a user-scoped task inbox. Use these REST endpoints to surface delegated task state:
Supported task states are
queued, running, completed, failed, and
cancelled. The cancelled state is reserved for terminal records produced by
future cancellation flows; this API does not currently expose a cancel
operation. Missing, unowned, expired, non-terminal acknowledgement, and
feature-disabled tasks are returned as not found.
The current backend persists task status and terminal results. In-flight
specialist execution still runs in the existing voice server process, so a
server crash or redeploy during execution can leave a task running until its
expires_at time.
Audio Format Reference
Platform Guides
- iOS / Swift Integration — Full walkthrough for building a voice assistant in a native iOS app