Skip to content
  • There are no suggestions because the search field is empty.

Server Events (Part 2)

response.output_item.done

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

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.done.
response_id false string The ID of the Response to which the item belongs.
output_index false string The index of the output item in the Response.
item false object The item to add to the conversation.
id false string 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.
type false string The type of the item (message, function_call, function_call_output).
object false string Identifier for the API object being returned - always realtime.item
status false string 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.
role false string The role of the message sender (user, assistant, system), only applicable for message items.
content false array The content of the message, applicable for message items.
  • Message items of role system support only input_text content.
  • Message items of role user support input_text and input_audio content.
  • Message items of role assistant support text content.
type false string The type of the item (message, function_call, function_call_output).
text false string The text content, used for input_text and text content types.
id false string ID of a previous conversation item to reference (for item_reference content types in response.create events). These can reference both client and server created items.
audio false string Base64-encoded audio bytes, used for input_audio content type.
transcript false string The transcript of the audio, used for input_audio content type.
call_id false string 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.
name false string The name of the function being called (for function_call items).
arguments false string The arguments of the function call (for function_call items).
output false string The output of the function call (for function_call_output items).

response.content_part.added

Returned when a new content part is added to an assistant message item during response generation.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.content_part.added.
response_id false string The ID of the response.
item_id false string The ID of the item to which the content part was added.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.
part false object The content part that was added.
type false string The content type ("text", "audio").
text false string The text content (if type is "text").
audio false string Base64-encoded audio data (if type is "audio").
transcript false string The transcript of the audio (if type is "audio").

response.content_part.done

Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.content_part.done.
response_id false string The ID of the response.
item_id false string The ID of the item to which the content part was added.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.
part false object The content part that was added.
type false string The content type ("text", "audio").
text false string The text content (if type is "text").
audio false string Base64-encoded audio data (if type is "audio").
transcript false string The transcript of the audio (if type is "audio").

response.text.delta

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

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.text.delta.
response_id false string The ID of the response.
item_id false string The ID of the item.
output_index false integer The index of the output item in the response.
content_index false integer The index of the content part in the item's content array.
delta false string The text data.

response.text.done

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

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.text.done.
response_id false string The ID of the response.
item_id false string The ID of the item.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.
text false string The final text content.

response.audio_transcript.delta

Returned when the model-generated transcription of audio output is updated.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.audio_transcript.delta.
response_id false string The ID of the response.
item_id false string The ID of the item.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.
delta false string The transcript delta.

response.audio_transcript.done

Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.audio_transcript.done.
response_id false string The ID of the response.
item_id false string The ID of the item.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.
transcript false string The final transcript of the audio.

response.audio.delta

Returned when the model-generated audio is updated.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.audio.delta.
response_id false string The ID of the response.
item_id false string The ID of the item.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.
delta false string Base64-encoded audio data delta.

response.audio.done

Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.audio.done.
response_id false string The ID of the response.
item_id false string The ID of the item.
output_index false integer The index of the output item in the Response.
content_index false integer The index of the content part in the item's content array.

response.function_call_arguments.delta

Returned when the model-generated function call arguments are updated.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.function_call_arguments.delta.
response_id false string The ID of the response.
item_id false string The ID of the function call item.
output_index false integer The index of the output item in the Response.
call_id false string The ID of the function call.
delta false string The arguments delta as a JSON string.

response.function_call_arguments.done

Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be response.function_call_arguments.done.
response_id false string The ID of the response.
item_id false string The ID of the function call item.
output_index false integer The index of the output item in the Response.
call_id false string The ID of the function call.
arguments false string The arguments delta as a JSON string.

rate_limits.updated

Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed.

Name Required Type Description
event_id false string The unique ID of the server event.
type false string The event type, must be rate_limits.updated.
rate_limits false array List of rate limit information.
name false string The name of the rate limit (requests, tokens).
limit false integer The maximum allowed value for the rate limit.
remaining false integer The remaining value before the limit is reached.
reset_seconds false number Seconds until the rate limit resets.