BlyntBlynt API
WebSocket API Reference

API Overview

Messages exchanged between client and server over the WebSocket connection.

This section documents the messages exchanged between client and server over the WebSocket connection. The current production API runs in manual turn-taking mode: the client explicitly brackets each turn with start_turn and end_turn. If you are new here, read the High-Level Flow first for the end-to-end walkthrough, then use this reference for the exact schemas.

You can also refer to the Stream a local audio file quickstart for a practical python integration of the API.

The reference is split into four pages, grouped by concern. Client Session API and Client Turn Control API cover the client-driven (Client → Server) messages; Server API and Error Management cover the server-driven (Server → Client) messages. Each message in the tables below links to the page that documents it.

Messages

Client → Server (JSON text frames, plus binary audio frames):

MessageTypePurposeDocumented in
start_sessionJSONFirst message; sets language and turn-taking mode.Client Session API
audio bytesrawBinary frames of 16 kHz mono int16 PCM audio for the active turn.Client Session API
start_turnJSONMarks the start of a turn; optionally carries turn-level biasing (turnContext).Client Turn Control API
end_turnJSONMarks the end of the current turn.Client Turn Control API

Server → Client (JSON text frames):

MessageTypePurposeDocumented in
session_startedJSONAcknowledges the session and returns its id.Server API
turn_startedJSONA turn has started.Server API
turn_partialJSONIncremental transcript decoded so far.Server API
turn_endedJSONThe turn ended; contains the final transcript.Server API
errorJSONAn error occurred; the connection is closed afterwards.Error Management

Message categories

On this page