Skip to content

Start a Continuous Session

GET/v1/audio/conversations/stream

Overview

Requires REALTIME_ENABLED, audio.write, a funded workspace, and a configured Hume EVI, Amazon Nova Sonic, Gemini 3.1 Flash Live or Gemini 3.5 Live Translate endpoint. Authenticate the WebSocket upgrade with Authorization: Bearer <API_KEY> and send an Idempotency-Key. Provider credentials stay on the server.

First send {"type":"session.start","model":"amazon/nova-2-sonic", "voice":"matthew","max_seconds":120,"instructions":"Answer briefly."}. Input is mono PCM16 at 16000 Hz. max_seconds accepts 10 through 300. session.start accepts provider.data_region, as a request does. After session.ready, continuously send binary audio at its capture cadence, or input_audio.append with base64 in the audio field. Each frame is at most one second. Input_text.append accepts a text field for typed input. Native VAD and interruptions preserve the conversation.

Receive output_audio.delta, input_transcript.delta, output_transcript.delta, output_audio.interrupted and output_audio.done. Nova Sonic and Gemini return base64 mono PCM16 at 24000 Hz. Hume returns complete WAV chunks. An output_audio.done marks a turn, not final billing. Send {"type":"session.finish"} after the final turn; session.completed follows native usage validation and wallet settlement.

Gemini Live Translate requires target_language in session.start and accepts optional echo_target. It meters audio at the provider's published 25 tokens per second. Gemini 3.1 Live supports native VAD, interruptions and tools declared as {name,description,parameters}. tool.call events carry an id, name and arguments; return {"type":"tool.result","id":"...", "response":{}}. Tools run in your application. Optional vad accepts silence_ms and prefix_ms. Native per-turn context usage determines cost.

Hume uses a version-pinned EVI 3 configuration without supplemental models or tools and its published Scale minute tariff. Nova Sonic uses its native text/speech token counters at the us-east-1 published rate. The temporary reservation is a risk allowance, not an estimated final charge. Session creation is never retried automatically. Duplicate idempotency keys return original status without generating again. Missing final usage retains the hold. Ended Hume chats can be recovered using their owned native receipt; no new conversation is created.

Authorization

Authorizationstring · headerRequired

AudioLab API key sent as Bearer <token>. Authentication guide

Responses

101WebSocket protocol upgrade accepted.
401Authentication is missing or invalid.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

403Authenticated principal lacks permission.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

429Rate limit exceeded.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

503No eligible provider endpoint is currently available, or async processing has no healthy worker polling the durable queue.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.