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.Quick start
Connect
token (JWT) query parameter is also accepted for the 60db web app.
Session flow
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 getinterrupted. - 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.