Skip to main content
New apps should use /v1/realtime. It speaks the OpenAI Realtime GA protocol, so OpenAI SDKs work without changes. This page covers the native /ws/realtime protocol, which existing integrations can keep using.
The native endpoint is one socket and one session. You stream microphone audio in and get spoken replies back. 60db runs speech recognition, the LLM turn and voice synthesis on the server, with server-side VAD, turn detection and barge-in.

Quick start

Connect

Any key with STT and TTS permissions can use the native endpoint. A token (JWT) query parameter is also accepted for the 60db web app.

Session flow

The first frame must be setup, or an OpenAI-style nested session.update. Any other event first returns a recoverable SETUP_REQUIRED error, and audio is rejected until setup succeeds. voice is required. Get one from GET /get-voices.

Setup fields

The server replies session.updated with the applied config. Use session.update to change settings mid-session. Changes apply from the next turn.

Client events

Send session.close instead of dropping the socket. The server also sends protocol pings every 30 seconds, and you must answer them or the connection drops.

Server events

turn.complete example:

Barge-in

  • Reply playing, user talks: the server sends interrupted, cancels the rest of the reply, and starts a new turn. Stop local playback when you get interrupted.
  • Reply generating, user talks: the new utterance waits behind the current reply and runs as the next turn.

Audio formats

Send about 100 ms per frame. At 48 kHz that is 9,600 samples. Include silence, because the VAD needs a continuous stream.

Limits and pricing

The native endpoint uses the same billing as /v1/realtime: $0.02 per connected minute**, plus **$0.50 per 1M LLM tokens. See Realtime overview.

Next steps