Skip to main content
Designed for browser microphones and softphones that produce audio incrementally. Each session supports exactly one SSE consumer at a time.

Initialize Session — POST /analyze/live/start

filename
string
Optional hint used to infer the extension.
suffix
string
Explicit extension (e.g., .wav). Defaults to .mp4.
ttl_seconds
integer
Session lifetime (60-3600). Default 900s.

Response

{
  "session_id": "live_6a0a64c0",
  "conversation_id": "liveconv_353cee7a",
  "chunk_endpoint": "/analyze/live/live_6a0a64c0/chunk",
  "events_endpoint": "/analyze/live/live_6a0a64c0/events",
  "control_endpoint": "/analyze/live/live_6a0a64c0/control",
  "next_chunk_seq": 0,
  "expires_at": "2025-11-08T18:12:04.991Z",
  "status": "waiting_media"
}

Upload Chunks — POST /analyze/live/{session_id}/chunk

session_id
string
required
Live session identifier from /analyze/live/start.
chunk_seq
integer
required
Zero-based, must equal next_chunk_seq.
chunk
binary
required
PCM/Opus audio chunks.
Response includes received_bytes and updated next_chunk_seq. Out-of-order uploads return 409 Conflict.

Subscribe to Events — GET /analyze/live/{session_id}/events

session_id
string
required
Live session identifier.
  • Returns the same SSE catalog as /analyze/stream.
  • Only one connection allowed; a second call returns 409.
  • When streaming completes, the session is cleaned up.

Control Session — POST /analyze/live/{session_id}/control

session_id
string
required
Live session identifier.
action
string
required
One of: finalize, cancel, keepalive
reason
string
Optional reason for the action.

Actions

ActionEffect
finalizeStop ingest and begin final processing stages.
cancelAbort processing; SSE clients receive error.
keepaliveExtend TTL without uploading media.
Payload schema:
{
  "action": "finalize" | "cancel" | "keepalive",
  "reason": "optional string"
}
Response echoes status, detail, and new expires_at.
Only one SSE consumer may be attached to a live session at a time. Attempting to attach a second listener will return 409 Conflict.