Client Events
These are the events that Realtime servers accept from the client
Overview
These events are accepted by the Realtime servers via WebRTC datachannel from the client. Each event has a specific structure and purpose for managing realtime interactions.
session.update
Send this event to update the session’s default configuration. The client may send this event at any time to update any field, except for voice. Note that once a session has been initialized with a particular model, it can’t be changed to another model using session.update
.
When the server receives a session.update
, it will respond with a session.updated
event showing the full, effective configuration. Only the fields that are present are updated. To clear a field like instructions, pass an empty string.
Properties
Client-generated ID used to identify this event.
The event type, must be session.update
.
Realtime session object configuration.
conversation.item.create
Add a new Item to the Conversation’s context, including messages, function calls, and function call responses. This event can be used both to populate a “history” of the conversation and to add new items mid-stream, but has the current limitation that it cannot populate assistant audio messages.
Properties
Client-generated ID used to identify this event.
The event type, must be conversation.item.create
.
The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation.
The item to add to the conversation.
response.create
This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically.
Properties
Client-generated ID used to identify this event.
The event type, must be response.create
.
Create a new Realtime response with these parameters.
Was this page helpful?