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-1Connection
Authenticate with an ephemeral token via the websocket subprotocol:
new WebSocket(url, ["vocenza", `token.${ephemeralToken}`]);Query parameters
| Parameter | Type | Description |
|---|---|---|
model | string | Realtime model id, e.g. vocenza-realtime-1. |
voice | string | Optional default voice for the session. |
Client events
| Type | Description |
|---|---|
session.update | Configure voice, instructions, and audio formats. |
input_audio.append | Append a base64 PCM16 audio chunk. |
input_audio.commit | Mark the end of the user's turn. |
response.cancel | Cancel the in-flight assistant response. |
Server events
| Type | Description |
|---|---|
transcript.delta | Incremental transcript text. |
audio.delta | A chunk of output audio (base64 PCM16). |
response.done | The assistant turn completed. |
response.canceled | The turn was interrupted (barge-in). |
error | An error object. |
Full walkthrough
The Realtime API guide shows a complete client with audio capture, playback, and barge-in handling.