RealtimeClientEventResponseCancel
objectSend this event to cancel an in-progress response. The server will respond
with a response.cancelled event or an error if there is no response to
cancel.
Optional client-generated ID used to identify this event.
The event type, must be response.cancel.
Allowed values:response.cancel
A specific response ID to cancel - if not provided, will cancel an
in-progress response in the default conversation.
RealtimeClientEventResponseCreate
objectThis event instructs the server to create a Response, which means triggering
model inference. When in Server VAD mode, the server will create Responses
automatically.
A Response will include at least one Item, and may have two, in which case
the second will be a function call. These Items will be appended to the
conversation history.
The server will respond with a response.created event, events for Items
and content created, and finally a response.done event to indicate the
Response is complete.
The response.create event includes inference configuration like
instructions, and temperature. These fields will override the Session’s
configuration for this Response only.
Optional client-generated ID used to identify this event.
The event type, must be response.create.
Allowed values:response.create
Create a new Realtime response with these parameters
Show Child Parameters
RealtimeClientEventSessionUpdate
objectSend this event to update the session’s default configuration. The client may
send this event at any time to update the session configuration, and any
field may be updated at any time, except for “voice”. The server will respond
with a session.updated event that shows the full effective configuration.
Only fields that are present are updated, thus the correct way to clear a
field like “instructions” is to pass an empty string.
Optional client-generated ID used to identify this event.
The event type, must be session.update.
Allowed values:session.update
Realtime session object configuration.
Show Child Parameters
RealtimeConversationItem
objectThe item to add to the conversation.
The unique ID of the item, this can be generated by the client to help
manage server-side context, but is not required because the server will
generate one if not provided.
The type of the item (message, function_call, function_call_output).
Allowed values:messagefunction_callfunction_call_output
Identifier for the API object being returned - always realtime.item.
Allowed values:realtime.item
The status of the item (completed, incomplete). These have no effect
on the conversation, but are accepted for consistency with the
conversation.item.created event.
Allowed values:completedincomplete
The role of the message sender (user, assistant, system), only
applicable for message items.
Allowed values:userassistantsystem
The content of the message, applicable for message items.
- Message items of role
systemsupport onlyinput_textcontent - Message items of role
usersupportinput_textandinput_audio
content - Message items of role
assistantsupporttextcontent.
Show Child Parameters
The ID of the function call (for function_call and
function_call_output items). If passed on a function_call_output
item, the server will check that a function_call item with the same
ID exists in the conversation history.
The name of the function being called (for function_call items).
The arguments of the function call (for function_call items).
The output of the function call (for function_call_output items).
RealtimeConversationItemWithReference
objectThe item to add to the conversation.
For an item of type (message | function_call | function_call_output)
this field allows the client to assign the unique ID of the item. It is
not required because the server will generate one if not provided.
For an item of type item_reference, this field is required and is a
reference to any item that has previously existed in the conversation.
The type of the item (message, function_call, function_call_output, item_reference).
Allowed values:messagefunction_callfunction_call_output
Identifier for the API object being returned - always realtime.item.
Allowed values:realtime.item
The status of the item (completed, incomplete). These have no effect
on the conversation, but are accepted for consistency with the
conversation.item.created event.
Allowed values:completedincomplete
The role of the message sender (user, assistant, system), only
applicable for message items.
Allowed values:userassistantsystem
The content of the message, applicable for message items.
- Message items of role
systemsupport onlyinput_textcontent - Message items of role
usersupportinput_textandinput_audio
content - Message items of role
assistantsupporttextcontent.
Show Child Parameters
The ID of the function call (for function_call and
function_call_output items). If passed on a function_call_output
item, the server will check that a function_call item with the same
ID exists in the conversation history.
The name of the function being called (for function_call items).
The arguments of the function call (for function_call items).
The output of the function call (for function_call_output items).