OpenAI API

RealtimeServerEventResponseOutputItemAdded

object

Returned when a new Item is created during Response generation.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be response.output_item.added.

Allowed values:response.output_item.added

response_idstringrequired

The ID of the Response to which the item belongs.

output_indexintegerrequired

The index of the output item in the Response.

itemobjectrequired

The item to add to the conversation.

Show Child Parameters
Example

RealtimeServerEventResponseOutputItemDone

object

Returned when an Item is done streaming. Also emitted when a Response is
interrupted, incomplete, or cancelled.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be response.output_item.done.

Allowed values:response.output_item.done

response_idstringrequired

The ID of the Response to which the item belongs.

output_indexintegerrequired

The index of the output item in the Response.

itemobjectrequired

The item to add to the conversation.

Show Child Parameters
Example

RealtimeServerEventResponseTextDelta

object

Returned when the text value of a “text” content part is updated.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be response.text.delta.

Allowed values:response.text.delta

response_idstringrequired

The ID of the response.

item_idstringrequired

The ID of the item.

output_indexintegerrequired

The index of the output item in the response.

content_indexintegerrequired

The index of the content part in the item’s content array.

deltastringrequired

The text delta.

Example

RealtimeServerEventResponseTextDone

object

Returned when the text value of a “text” content part is done streaming. Also
emitted when a Response is interrupted, incomplete, or cancelled.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be response.text.done.

Allowed values:response.text.done

response_idstringrequired

The ID of the response.

item_idstringrequired

The ID of the item.

output_indexintegerrequired

The index of the output item in the response.

content_indexintegerrequired

The index of the content part in the item’s content array.

textstringrequired

The final text content.

Example

RealtimeServerEventSessionCreated

object

Returned when a Session is created. Emitted automatically when a new
connection is established as the first server event. This event will contain
the default Session configuration.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be session.created.

Allowed values:session.created

sessionobjectrequired

Realtime session object configuration.

Show Child Parameters
Example