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_KEYParameters
| Field | Type | Required | Description |
|---|---|---|---|
| modelquery | string | — | The model to use |
Responses
101Switching to the WebSocket protocol
This response has no JSON body.
400Invalid request
| Field | Type | Required | Description |
|---|---|---|---|
| error | object | — | — |
| message | string | — | Error message |
| type | string | — | Error type |
| param | string | null | — | The parameter involved |
| code | string | null | — | Error code |
Example request
curl -X GET 'https://api.oletoken.ai/v1/realtime?model=string' \
-H "Authorization: Bearer $OLETOKEN_API_KEY"
