Realtime WebSocket connection

get/v1/realtime

Open a WebSocket connection for realtime conversations.

Note: this is a WebSocket endpoint and must be reached over the WebSocket protocol.

Example URL: wss://api.example.com/v1/realtime?model=gpt-4o-realtime

Authentication

Send your OLETOKEN API key as a Bearer token. Keys are created on the API Keys page of the console.

Authorization: Bearer $OLETOKEN_API_KEY

Parameters

FieldTypeRequiredDescription
modelquerystringThe model to use

Responses

101Switching to the WebSocket protocol

This response has no JSON body.

400Invalid request

FieldTypeRequiredDescription
errorobject
messagestringError message
typestringError type
paramstring | nullThe parameter involved
codestring | nullError code

Example request

curl -X GET 'https://api.oletoken.ai/v1/realtime?model=string' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY"