Subscribe to live call events (SSE)
Real-time streaming of user speech (STT) and agent speech (TTS) events for an active call via Server-Sent Events.
The connection is real-time — events stream directly from the call runtime as they are produced. The SSE connection auto-closes when the call ends (sse_close event). Only active calls can be subscribed to; completed calls return a 400 error.
Transcript event types:
user_interim_transcription— Partial, in-progress transcription as the user speaks. Use for live preview only; will be superseded byuser_transcription.user_transcription— Final transcription for a completed user speech turn.tts_completed— Fired when the agent finishes speaking a TTS segment. Includes the spoken text and optionally TTS latency.
Lifecycle events:
sse_init— Sent immediately when the SSE connection is established.sse_close— Sent when the call ends, right before the server closes the connection.
Other event types (e.g. tool_call_start, pre_call_api, agent_log, metrics) are also sent on this stream.
call_startcall_endturn_latencymetricsagent_node_statehoppingknowledgebasevariable_extractionpre_call_apipost_call_apiagent_erroragent_logtool_call_starttool_call_endtool_call_errorcall_cancelledcall_recording
Authentication
API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.
Headers
Required when using session-cookie auth. API-token auth may infer the organization from the token.
Query parameters
The call ID of an in-progress call. Behavior on error cases:
- Missing:
400 {"status": false, "errors": ["CallId is required"]}. callIdbelongs to another organization (the common case for a wrong ID):404 "Agent not found".- Organization cannot be resolved from the auth context:
404 "Not authorized". - Non-existent call:
404 "Call log not found". - Completed call:
400 "Call is already completed".
A client that routes on the message string must handle all three 404 messages. Prefer routing on the HTTP status.
Response
Timestamp used by sse_init and sse_close
Telephony ID for call_start
Metadata for call_end, agent_error, or agent_log
Turn latency value for turn_latency
STT API latency in milliseconds for turn_latency
STT-to-LLM latency in milliseconds for turn_latency
Smart-turn latency in milliseconds for turn_latency
LLM API latency in milliseconds for turn_latency
LLM-to-TTS latency in milliseconds for turn_latency
TTS API latency in milliseconds for turn_latency
TTS-to-audio latency in milliseconds for turn_latency
Total turn latency in milliseconds for turn_latency
Turn index for turn_latency
Whether the turn was interrupted for turn_latency
Whether smart turn was enabled for turn_latency
Partial transcription text (only for user_interim_transcription)
Final transcription text (only for user_transcription)
Text spoken by the agent (only for tts_completed)
TTS latency in milliseconds (only for tts_completed)
Per-turn metrics payload for metrics events. Server emits an
array of {processor, model, value} entries (one per
pipeline stage), not a single object. The SDK previously
dropped every metrics SSE event with a pydantic
ValidationError when this was typed as an object (122
events on a 40s call); typing it as an array of objects
fixes the decode.
Node ID for agent_node_state
Node name for agent_node_state
Node type for agent_node_state
Context payload for agent-node and tool-call events
Source node ID for hopping
Destination node ID for hopping
Knowledge base ID for knowledgebase
User transcript for knowledgebase
Response payload for knowledgebase, API, or tool-call events
Latency for knowledgebase or variable_extraction
Variables extracted by variable_extraction
Prompt used for variable_extraction
HTTP method for pre_call_api or post_call_api
Headers for pre_call_api or post_call_api
Body for pre_call_api or post_call_api
Timeout for pre_call_api or post_call_api
Extracted variables for pre_call_api or post_call_api
Next node ID for pre_call_api or post_call_api
Success status for API and tool-call events
Turn ID for tool-call events
Tool call ID for tool-call events
Function name for tool-call events
Latency in milliseconds for tool_call_end
Recording URL for call_recording
Recording status for call_recording