Skip to main content
Open a Realtime session over WebSocket. The protocol is the OpenAI Realtime GA protocol. After the handshake, send client events and receive server events.

Endpoint

string
wss://api.60db.ai/v1/realtime

Query parameters

string
required
Model to run. Use 60db-realtime-v1-mini. OpenAI model names (gpt-realtime, gpt-realtime-mini, gpt-4o-realtime-preview*) are accepted and run on this model.

Authentication

Use one of two methods.

Server: Bearer header

string
required
Bearer sk_your_api_key. Use this on servers, from Node ws, Python, or the OpenAI SDKs.

Browser: ephemeral key subprotocols

Browsers cannot set headers on a WebSocket. Pass the ek_ key in the subprotocol list instead. Mint the key with Create ephemeral key.
@openai/agents-realtime sends these subprotocols for you when you call session.connect({ apiKey }).

Session start

After the socket opens, the server sends session.created. Send session.update before you stream audio so the voice, audio formats and tools are set. See Client events.

Errors

Failures are reported as an error event with this shape:
Some failures also close the socket. The close code tells you which kind. See the table below.

Close codes

Read the close reason and the last error event before you retry. Retry 4005 with backoff. Do not retry 1008, 4002 or 4003 until the cause is fixed.