{
"type": "session.ready",
"session_id": "ses_example",
"sequence": 1,
"model": "tazo-large",
"config_revision": 1,
"input_audio": {
"encoding": "pcm_s16le",
"sample_rate_hz": 16000,
"channels": 1
},
"evaluation_interval_ms": 1000,
"max_turn_audio_ms": null,
"max_audio_message_bytes": 6400,
"audio_scope": "chunk"
}{
"type": "session.updated",
"session_id": "ses_example",
"sequence": 4,
"config_revision": 2
}{
"type": "decision.updated",
"session_id": "ses_example",
"sequence": 2,
"turn_id": "turn_1",
"config_revision": 1,
"id": "dec_example",
"model": "tazo-large",
"audio_start_ms": 0,
"audio_end_ms": 500,
"answers": {
"action": {
"type": "choice",
"choice": "get_weather",
"probabilities": {
"NO_TOOL": 0.08,
"get_weather": 0.92
},
"confidence": 0.92
}
},
"usage": {
"audio_seconds": 0.5
},
"elapsed_ms": 52
}{
"type": "decision.finalized",
"session_id": "ses_example",
"sequence": 3,
"turn_id": "turn_1",
"config_revision": 1,
"id": "dec_example",
"model": "tazo-large",
"audio_start_ms": 0,
"audio_end_ms": 500,
"answers": {
"action": {
"type": "choice",
"choice": "get_weather",
"probabilities": {
"NO_TOOL": 0.08,
"get_weather": 0.92
},
"confidence": 0.92
}
},
"usage": {
"audio_seconds": 0.5
},
"elapsed_ms": 52
}{
"type": "session.closed",
"session_id": "ses_example",
"sequence": 4
}{
"type": "error",
"session_id": "ses_example",
"sequence": 3,
"fatal": true,
"error": {
"code": "turn_too_long",
"message": "The turn exceeds its audio limit; commit before sending more."
}
}{
"type": "session.start",
"authorization": "Bearer YOUR_API_KEY",
"model": "tazo-large",
"audio_scope": "chunk",
"evaluation_interval_ms": 1000,
"state": {
"context": "Choose the tool matching the spoken request."
},
"questions": {
"action": {
"type": "choice",
"instructions": "Which action should be taken?",
"criteria": {
"NO_TOOL": "Respond directly without calling a tool.",
"get_weather": "Get weather for a city."
}
}
},
"input_audio": {
"encoding": "pcm_s16le",
"sample_rate_hz": 16000,
"channels": 1
}
}{}{
"type": "session.update",
"state": {
"context": "Choose the tool matching the spoken request."
},
"questions": {
"action": {
"type": "choice",
"instructions": "Which action should be taken?",
"criteria": {
"NO_TOOL": "Respond directly without calling a tool.",
"get_weather": "Get weather for a city."
}
}
}
}{
"type": "input.commit"
}{
"type": "input.finish"
}Stream decisions
Send audio over a WebSocket connection and receive typed decisions.
wss://api.tazolabs.com/v1/decisions/stream and send session.start
within five seconds. Include your API key or access token in its authorization
field, then wait for session.ready before sending audio.
Send control messages as JSON and audio as binary PCM16 frames: little-endian,
16 kHz, mono. Audio must be sent as raw bytes, without JSON or base64 encoding.
For a walkthrough with request and response examples, see
Streaming decisions. Try streaming audio in the
Tazo playground.{
"type": "session.ready",
"session_id": "ses_example",
"sequence": 1,
"model": "tazo-large",
"config_revision": 1,
"input_audio": {
"encoding": "pcm_s16le",
"sample_rate_hz": 16000,
"channels": 1
},
"evaluation_interval_ms": 1000,
"max_turn_audio_ms": null,
"max_audio_message_bytes": 6400,
"audio_scope": "chunk"
}{
"type": "session.updated",
"session_id": "ses_example",
"sequence": 4,
"config_revision": 2
}{
"type": "decision.updated",
"session_id": "ses_example",
"sequence": 2,
"turn_id": "turn_1",
"config_revision": 1,
"id": "dec_example",
"model": "tazo-large",
"audio_start_ms": 0,
"audio_end_ms": 500,
"answers": {
"action": {
"type": "choice",
"choice": "get_weather",
"probabilities": {
"NO_TOOL": 0.08,
"get_weather": 0.92
},
"confidence": 0.92
}
},
"usage": {
"audio_seconds": 0.5
},
"elapsed_ms": 52
}{
"type": "decision.finalized",
"session_id": "ses_example",
"sequence": 3,
"turn_id": "turn_1",
"config_revision": 1,
"id": "dec_example",
"model": "tazo-large",
"audio_start_ms": 0,
"audio_end_ms": 500,
"answers": {
"action": {
"type": "choice",
"choice": "get_weather",
"probabilities": {
"NO_TOOL": 0.08,
"get_weather": 0.92
},
"confidence": 0.92
}
},
"usage": {
"audio_seconds": 0.5
},
"elapsed_ms": 52
}{
"type": "session.closed",
"session_id": "ses_example",
"sequence": 4
}{
"type": "error",
"session_id": "ses_example",
"sequence": 3,
"fatal": true,
"error": {
"code": "turn_too_long",
"message": "The turn exceeds its audio limit; commit before sending more."
}
}{
"type": "session.start",
"authorization": "Bearer YOUR_API_KEY",
"model": "tazo-large",
"audio_scope": "chunk",
"evaluation_interval_ms": 1000,
"state": {
"context": "Choose the tool matching the spoken request."
},
"questions": {
"action": {
"type": "choice",
"instructions": "Which action should be taken?",
"criteria": {
"NO_TOOL": "Respond directly without calling a tool.",
"get_weather": "Get weather for a city."
}
}
},
"input_audio": {
"encoding": "pcm_s16le",
"sample_rate_hz": 16000,
"channels": 1
}
}{}{
"type": "session.update",
"state": {
"context": "Choose the tool matching the spoken request."
},
"questions": {
"action": {
"type": "choice",
"instructions": "Which action should be taken?",
"criteria": {
"NO_TOOL": "Respond directly without calling a tool.",
"get_weather": "Get weather for a city."
}
}
}
}{
"type": "input.commit"
}{
"type": "input.finish"
}The session is ready. Read the effective audio format, interval, scope, and limits.
The replacement context and question were accepted.
A decision for the reported audio range while audio continues arriving.
The turn is complete. In chunk mode this is the last chunk result, not a summary of the turn.
The server is closing the session after input.finish.
An error occurred. A fatal error closes the connection.
Authenticate and configure the session. Wait for session.ready before sending audio.
Send raw mono audio matching session.start.input_audio after session.ready.
Between turns, replace both state and questions. Wait for session.updated before sending audio.
Complete the current turn. Wait for decision.finalized before sending more audio.
Complete pending audio and close the session.