Rate this page:

RealtimeAPIClientParameters

OpenAI.Beta.RealtimeAPIClient parameters. Can be passed as arguments to the OpenAI.Beta.createRealtimeAPIClient method.

Props

apiKey

Copy URL
apiKey: 

string

The API key for the OpenAI Realtime API.

model

Copy URL
model: 

string

|

undefined

Optional. The model to use for OpenAI Realtime API processing. The default value is gpt-4o-realtime-preview-2024-10-01.

onWebSocketClose

Copy URL
onWebSocketClose: 

(event: WebSocketEvents.CLOSE) => void

|

undefined

Optional. A callback function that is called when the WebSocket connection is closed.