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

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

Response

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

string
required
Live session identifier from /analyze/live/start.
integer
required
Zero-based, must equal next_chunk_seq.
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

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

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

Actions

Payload schema:
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.

Live Capture Python Cookbook (Async)

Async Python examples using httpx for implementing live capture workflows with asyncio.

Live Capture Python Cookbook (Sync)

Synchronous Python examples using requests for WSGI apps, Lambda, and non-async environments.