WS /realtime

Open a full-duplex websocket for live voice conversations.

Opens a realtime, bidirectional session. See the Realtime API guide for the full event flow and client examples.

GET wss://api.vocenza.com/v1/realtime?model=vocenza-realtime-1

Connection

Authenticate with an ephemeral token via the websocket subprotocol:

new WebSocket(url, ["vocenza", `token.${ephemeralToken}`]);

Query parameters

ParameterTypeDescription
modelstringRealtime model id, e.g. vocenza-realtime-1.
voicestringOptional default voice for the session.

Client events

TypeDescription
session.updateConfigure voice, instructions, and audio formats.
input_audio.appendAppend a base64 PCM16 audio chunk.
input_audio.commitMark the end of the user's turn.
response.cancelCancel the in-flight assistant response.

Server events

TypeDescription
transcript.deltaIncremental transcript text.
audio.deltaA chunk of output audio (base64 PCM16).
response.doneThe assistant turn completed.
response.canceledThe turn was interrupted (barge-in).
errorAn error object.

Full walkthrough

The Realtime API guide shows a complete client with audio capture, playback, and barge-in handling.