Overview
Several endpoints return Server-Sent Events (SSE) streams for real-time updates during analysis.SSE Endpoints
The following endpoints support SSE streaming:POST /analyze/stream- Stream analysis events for uploaded mediaPOST /analyze?stream=true- Alias for/analyze/streamGET /analyze/live/{session_id}/events- Subscribe to events for a live session
Event Catalogue
Event Types
Status Event
Emitted during processing to indicate current phase and progress.string
required
Current processing phase. One of:
starting, processing, waiting_media, completednumber
required
Progress indicator from 0 to 1
Partial Transcript Event
Arrives only in live capture when interim text is available.string
required
Unique identifier for this partial transcript
string
required
Partial transcript text
boolean
required
Whether this is a final transcript segment
Final Transcript Event
Fired per utterance once a segment is finalized.string
required
Unique identifier for the utterance
string
required
Speaker identifier from diarization
string
required
Final transcript text
number
required
Start time in seconds
number
required
End time in seconds
Emotion Event
Emitted immediately after eachfinal_transcript. Includes PAD scores (valence, arousal, dominance) and emotion classifications.
string
required
Associated utterance identifier
string
required
Speaker identifier
object
required
Emotion scores (e.g.,
{"joy": 0.64, "fear": 0.05, ...})object
required
PAD scores:
valence, arousal, dominance (each 0-1)number
required
Confidence score (0-1)
string
required
Stability indicator (e.g.,
"final")Cognitive Event
Mirrorsemotion cadence. Includes engagement and cognitive load analysis.
string
required
Associated utterance identifier
string
required
Speaker identifier
object
required
Cognitive analysis signals
number
required
Engagement score (0-1)
string
required
Cognitive load level
Transition Event
Triggers when significant state changes are detected.string
required
Unique transition identifier
integer
required
Timestamp in milliseconds
object
required
Previous affective state
object
required
New affective state
object
required
Highlights which signals contributed to the transition
array
required
Array of utterance IDs that contributed to this transition
number
required
Confidence score (0-1)
Moment Event
Detected objections, CTAs, and topic shifts.string
required
Unique moment identifier
string
required
Moment category:
objection, cta_offered, cta_accepted, cta_rejected, topic_shiftstring
required
Speaker identifier
integer
required
Start timestamp in milliseconds
integer
required
End timestamp in milliseconds
array
required
Array of associated utterance IDs
string
required
Summary of the moment
array
required
Evidence supporting the moment detection
number
required
Confidence score (0-1)
Summary Update Event
Emitted once per conversation after processing completes. Contains structuredConversationSummary.
object
required
Full conversation summary object. See Response Schemas for complete schema.
Error Event
Fatal issues (ASR failure, invalid chunk, double SSE connection).string
required
Error code. Notable codes:
LIVE_ASR_FAILURE, NO_UTTERANCES, STREAM_FAILURE, INVALID_KEY, FILE_TOO_LARGE, ANALYSIS_FAILUREstring
required
Human-readable error message
Done Event
Terminal success marker.string
required
Final conversation identifier
SSE Format
SSE events follow the standard format:Event Order
Events are emitted in order:status(phase=start)final_transcript(per utterance once finalized)- For each utterance:
emotion,cognitive, optionaltransition/moment summary_updateafter the timeline completesstatus(phase=completed)done
Error Handling
SSE streams may emit error events at any time. Clients should handle these gracefully:LIVE_ASR_FAILURE: Live ASR connection failedNO_UTTERANCES: No speech detected in mediaSTREAM_FAILURE: General streaming failureINVALID_KEY: Missing/incorrect API keyFILE_TOO_LARGE: Exceeded file size limitANALYSIS_FAILURE: Downstream processing failure
done event indicates successful completion.