Skip to content
Primary navigation

Streaming events

When you create a Response with stream set to true, the server will emit server-sent events to the client as the Response is generated. This section contains the events that are emitted by the server.

Learn more about streaming responses.

response.created

An event that is emitted when a response is created.

response: BetaResponse { id, created_at, error, 32 more }

The response that was created.

sequence_number: number

The sequence number for this event.

type: "response.created"

The type of the event. Always response.created.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.in_progress

Emitted when the response is in progress.

response: BetaResponse { id, created_at, error, 32 more }

The response that is in progress.

sequence_number: number

The sequence number of this event.

type: "response.in_progress"

The type of the event. Always response.in_progress.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.completed

Emitted when the model response is complete.

response: BetaResponse { id, created_at, error, 32 more }

Properties of the completed response.

sequence_number: number

The sequence number for this event.

type: "response.completed"

The type of the event. Always response.completed.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.failed

An event that is emitted when a response fails.

response: BetaResponse { id, created_at, error, 32 more }

The response that failed.

sequence_number: number

The sequence number of this event.

type: "response.failed"

The type of the event. Always response.failed.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.incomplete

An event that is emitted when a response finishes as incomplete.

response: BetaResponse { id, created_at, error, 32 more }

The response that was incomplete.

sequence_number: number

The sequence number of this event.

type: "response.incomplete"

The type of the event. Always response.incomplete.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.output_item.added

Emitted when a new output item is added.

The output item that was added.

output_index: number

The index of the output item that was added.

sequence_number: number

The sequence number of this event.

type: "response.output_item.added"

The type of the event. Always response.output_item.added.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.output_item.done

Emitted when an output item is marked done.

The output item that was marked done.

output_index: number

The index of the output item that was marked done.

sequence_number: number

The sequence number of this event.

type: "response.output_item.done"

The type of the event. Always response.output_item.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.content_part.added

Emitted when a new content part is added.

content_index: number

The index of the content part that was added.

item_id: string

The ID of the output item that the content part was added to.

output_index: number

The index of the output item that the content part was added to.

part: BetaResponseOutputText { annotations, logprobs, text, type } or BetaResponseOutputRefusal { refusal, type } or object { text, type }

The content part that was added.

One of the following:
BetaResponseOutputText object { annotations, logprobs, text, type }

A text output from the model.

annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }

The annotations of the text output.

One of the following:
FileCitation object { file_id, filename, index, type }

A citation to a file.

file_id: string

The ID of the file.

filename: string

The filename of the file cited.

index: number

The index of the file in the list of files.

type: "file_citation"

The type of the file citation. Always file_citation.

URLCitation object { end_index, start_index, title, 2 more }

A citation for a web resource used to generate a model response.

end_index: number

The index of the last character of the URL citation in the message.

start_index: number

The index of the first character of the URL citation in the message.

title: string

The title of the web resource.

type: "url_citation"

The type of the URL citation. Always url_citation.

url: string

The URL of the web resource.

formaturi
ContainerFileCitation object { container_id, end_index, file_id, 3 more }

A citation for a container file used to generate a model response.

container_id: string

The ID of the container file.

end_index: number

The index of the last character of the container file citation in the message.

file_id: string

The ID of the file.

filename: string

The filename of the container file cited.

start_index: number

The index of the first character of the container file citation in the message.

type: "container_file_citation"

The type of the container file citation. Always container_file_citation.

FilePath object { file_id, index, type }

A path to a file.

file_id: string

The ID of the file.

index: number

The index of the file in the list of files.

type: "file_path"

The type of the file path. Always file_path.

logprobs: array of object { token, bytes, logprob, top_logprobs }
token: string
bytes: array of number
logprob: number
top_logprobs: array of object { token, bytes, logprob }
token: string
bytes: array of number
logprob: number
text: string

The text output from the model.

type: "output_text"

The type of the output text. Always output_text.

BetaResponseOutputRefusal object { refusal, type }

A refusal from the model.

refusal: string

The refusal explanation from the model.

type: "refusal"

The type of the refusal. Always refusal.

ReasoningText object { text, type }

Reasoning text from the model.

text: string

The reasoning text from the model.

type: "reasoning_text"

The type of the reasoning text. Always reasoning_text.

sequence_number: number

The sequence number of this event.

type: "response.content_part.added"

The type of the event. Always response.content_part.added.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.content_part.done

Emitted when a content part is done.

content_index: number

The index of the content part that is done.

item_id: string

The ID of the output item that the content part was added to.

output_index: number

The index of the output item that the content part was added to.

part: BetaResponseOutputText { annotations, logprobs, text, type } or BetaResponseOutputRefusal { refusal, type } or object { text, type }

The content part that is done.

One of the following:
BetaResponseOutputText object { annotations, logprobs, text, type }

A text output from the model.

annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }

The annotations of the text output.

One of the following:
FileCitation object { file_id, filename, index, type }

A citation to a file.

file_id: string

The ID of the file.

filename: string

The filename of the file cited.

index: number

The index of the file in the list of files.

type: "file_citation"

The type of the file citation. Always file_citation.

URLCitation object { end_index, start_index, title, 2 more }

A citation for a web resource used to generate a model response.

end_index: number

The index of the last character of the URL citation in the message.

start_index: number

The index of the first character of the URL citation in the message.

title: string

The title of the web resource.

type: "url_citation"

The type of the URL citation. Always url_citation.

url: string

The URL of the web resource.

formaturi
ContainerFileCitation object { container_id, end_index, file_id, 3 more }

A citation for a container file used to generate a model response.

container_id: string

The ID of the container file.

end_index: number

The index of the last character of the container file citation in the message.

file_id: string

The ID of the file.

filename: string

The filename of the container file cited.

start_index: number

The index of the first character of the container file citation in the message.

type: "container_file_citation"

The type of the container file citation. Always container_file_citation.

FilePath object { file_id, index, type }

A path to a file.

file_id: string

The ID of the file.

index: number

The index of the file in the list of files.

type: "file_path"

The type of the file path. Always file_path.

logprobs: array of object { token, bytes, logprob, top_logprobs }
token: string
bytes: array of number
logprob: number
top_logprobs: array of object { token, bytes, logprob }
token: string
bytes: array of number
logprob: number
text: string

The text output from the model.

type: "output_text"

The type of the output text. Always output_text.

BetaResponseOutputRefusal object { refusal, type }

A refusal from the model.

refusal: string

The refusal explanation from the model.

type: "refusal"

The type of the refusal. Always refusal.

ReasoningText object { text, type }

Reasoning text from the model.

text: string

The reasoning text from the model.

type: "reasoning_text"

The type of the reasoning text. Always reasoning_text.

sequence_number: number

The sequence number of this event.

type: "response.content_part.done"

The type of the event. Always response.content_part.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.output_text.delta

Emitted when there is an additional text delta.

content_index: number

The index of the content part that the text delta was added to.

delta: string

The text delta that was added.

item_id: string

The ID of the output item that the text delta was added to.

logprobs: array of object { token, logprob, top_logprobs }

The log probabilities of the tokens in the delta.

token: string

A possible text token.

logprob: number

The log probability of this token.

top_logprobs: optional array of object { token, logprob }

The log probabilities of up to 20 of the most likely tokens.

token: optional string

A possible text token.

logprob: optional number

The log probability of this token.

output_index: number

The index of the output item that the text delta was added to.

sequence_number: number

The sequence number for this event.

type: "response.output_text.delta"

The type of the event. Always response.output_text.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.output_text.done

Emitted when text content is finalized.

content_index: number

The index of the content part that the text content is finalized.

item_id: string

The ID of the output item that the text content is finalized.

logprobs: array of object { token, logprob, top_logprobs }

The log probabilities of the tokens in the delta.

token: string

A possible text token.

logprob: number

The log probability of this token.

top_logprobs: optional array of object { token, logprob }

The log probabilities of up to 20 of the most likely tokens.

token: optional string

A possible text token.

logprob: optional number

The log probability of this token.

output_index: number

The index of the output item that the text content is finalized.

sequence_number: number

The sequence number for this event.

text: string

The text content that is finalized.

type: "response.output_text.done"

The type of the event. Always response.output_text.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.refusal.delta

Emitted when there is a partial refusal text.

content_index: number

The index of the content part that the refusal text is added to.

delta: string

The refusal text that is added.

item_id: string

The ID of the output item that the refusal text is added to.

output_index: number

The index of the output item that the refusal text is added to.

sequence_number: number

The sequence number of this event.

type: "response.refusal.delta"

The type of the event. Always response.refusal.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.refusal.done

Emitted when refusal text is finalized.

content_index: number

The index of the content part that the refusal text is finalized.

item_id: string

The ID of the output item that the refusal text is finalized.

output_index: number

The index of the output item that the refusal text is finalized.

refusal: string

The refusal text that is finalized.

sequence_number: number

The sequence number of this event.

type: "response.refusal.done"

The type of the event. Always response.refusal.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.function_call_arguments.delta

Emitted when there is a partial function-call arguments delta.

delta: string

The function-call arguments delta that is added.

item_id: string

The ID of the output item that the function-call arguments delta is added to.

output_index: number

The index of the output item that the function-call arguments delta is added to.

sequence_number: number

The sequence number of this event.

type: "response.function_call_arguments.delta"

The type of the event. Always response.function_call_arguments.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.function_call_arguments.done

Emitted when function-call arguments are finalized.

arguments: string

The function-call arguments.

item_id: string

The ID of the item.

name: string

The name of the function that was called.

output_index: number

The index of the output item.

sequence_number: number

The sequence number of this event.

type: "response.function_call_arguments.done"
agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.file_search_call.in_progress

Emitted when a file search call is initiated.

item_id: string

The ID of the output item that the file search call is initiated.

output_index: number

The index of the output item that the file search call is initiated.

sequence_number: number

The sequence number of this event.

type: "response.file_search_call.in_progress"

The type of the event. Always response.file_search_call.in_progress.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.file_search_call.searching

Emitted when a file search is currently searching.

item_id: string

The ID of the output item that the file search call is initiated.

output_index: number

The index of the output item that the file search call is searching.

sequence_number: number

The sequence number of this event.

type: "response.file_search_call.searching"

The type of the event. Always response.file_search_call.searching.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.file_search_call.completed

Emitted when a file search call is completed (results found).

item_id: string

The ID of the output item that the file search call is initiated.

output_index: number

The index of the output item that the file search call is initiated.

sequence_number: number

The sequence number of this event.

type: "response.file_search_call.completed"

The type of the event. Always response.file_search_call.completed.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.web_search_call.in_progress

Emitted when a web search call is initiated.

item_id: string

Unique ID for the output item associated with the web search call.

output_index: number

The index of the output item that the web search call is associated with.

sequence_number: number

The sequence number of the web search call being processed.

type: "response.web_search_call.in_progress"

The type of the event. Always response.web_search_call.in_progress.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.web_search_call.searching

Emitted when a web search call is executing.

item_id: string

Unique ID for the output item associated with the web search call.

output_index: number

The index of the output item that the web search call is associated with.

sequence_number: number

The sequence number of the web search call being processed.

type: "response.web_search_call.searching"

The type of the event. Always response.web_search_call.searching.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.web_search_call.completed

Emitted when a web search call is completed.

item_id: string

Unique ID for the output item associated with the web search call.

output_index: number

The index of the output item that the web search call is associated with.

sequence_number: number

The sequence number of the web search call being processed.

type: "response.web_search_call.completed"

The type of the event. Always response.web_search_call.completed.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.reasoning_summary_part.added

Emitted when a new reasoning summary part is added.

item_id: string

The ID of the item this summary part is associated with.

output_index: number

The index of the output item this summary part is associated with.

part: object { text, type }

The summary part that was added.

text: string

The text of the summary part.

type: "summary_text"

The type of the summary part. Always summary_text.

sequence_number: number

The sequence number of this event.

summary_index: number

The index of the summary part within the reasoning summary.

type: "response.reasoning_summary_part.added"

The type of the event. Always response.reasoning_summary_part.added.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.reasoning_summary_part.done

Emitted when a reasoning summary part is completed.

item_id: string

The ID of the item this summary part is associated with.

output_index: number

The index of the output item this summary part is associated with.

part: object { text, type }

The completed summary part.

text: string

The text of the summary part.

type: "summary_text"

The type of the summary part. Always summary_text.

sequence_number: number

The sequence number of this event.

summary_index: number

The index of the summary part within the reasoning summary.

type: "response.reasoning_summary_part.done"

The type of the event. Always response.reasoning_summary_part.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

status: optional "incomplete"

The completion status of the summary part. Omitted when the part completed normally and set to incomplete when generation was interrupted.

response.reasoning_summary_text.delta

Emitted when a delta is added to a reasoning summary text.

delta: string

The text delta that was added to the summary.

item_id: string

The ID of the item this summary text delta is associated with.

output_index: number

The index of the output item this summary text delta is associated with.

sequence_number: number

The sequence number of this event.

summary_index: number

The index of the summary part within the reasoning summary.

type: "response.reasoning_summary_text.delta"

The type of the event. Always response.reasoning_summary_text.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.reasoning_summary_text.done

Emitted when a reasoning summary text is completed.

item_id: string

The ID of the item this summary text is associated with.

output_index: number

The index of the output item this summary text is associated with.

sequence_number: number

The sequence number of this event.

summary_index: number

The index of the summary part within the reasoning summary.

text: string

The full text of the completed reasoning summary.

type: "response.reasoning_summary_text.done"

The type of the event. Always response.reasoning_summary_text.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.reasoning_text.delta

Emitted when a delta is added to a reasoning text.

content_index: number

The index of the reasoning content part this delta is associated with.

delta: string

The text delta that was added to the reasoning content.

item_id: string

The ID of the item this reasoning text delta is associated with.

output_index: number

The index of the output item this reasoning text delta is associated with.

sequence_number: number

The sequence number of this event.

type: "response.reasoning_text.delta"

The type of the event. Always response.reasoning_text.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.reasoning_text.done

Emitted when a reasoning text is completed.

content_index: number

The index of the reasoning content part.

item_id: string

The ID of the item this reasoning text is associated with.

output_index: number

The index of the output item this reasoning text is associated with.

sequence_number: number

The sequence number of this event.

text: string

The full text of the completed reasoning content.

type: "response.reasoning_text.done"

The type of the event. Always response.reasoning_text.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.image_generation_call.completed

Emitted when an image generation tool call has completed and the final image is available.

item_id: string

The unique identifier of the image generation item being processed.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of this event.

type: "response.image_generation_call.completed"

The type of the event. Always 'response.image_generation_call.completed'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.image_generation_call.generating

Emitted when an image generation tool call is actively generating an image (intermediate state).

item_id: string

The unique identifier of the image generation item being processed.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of the image generation item being processed.

type: "response.image_generation_call.generating"

The type of the event. Always 'response.image_generation_call.generating'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.image_generation_call.in_progress

Emitted when an image generation tool call is in progress.

item_id: string

The unique identifier of the image generation item being processed.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of the image generation item being processed.

type: "response.image_generation_call.in_progress"

The type of the event. Always 'response.image_generation_call.in_progress'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.image_generation_call.partial_image

Emitted when a partial image is available during image generation streaming.

item_id: string

The unique identifier of the image generation item being processed.

output_index: number

The index of the output item in the response's output array.

partial_image_b64: string

Base64-encoded partial image data, suitable for rendering as an image.

partial_image_index: number

0-based index for the partial image (backend is 1-based, but this is 0-based for the user).

sequence_number: number

The sequence number of the image generation item being processed.

type: "response.image_generation_call.partial_image"

The type of the event. Always 'response.image_generation_call.partial_image'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_call_arguments.delta

Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

delta: string

A JSON string containing the partial update to the arguments for the MCP tool call.

item_id: string

The unique identifier of the MCP tool call item being processed.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of this event.

type: "response.mcp_call_arguments.delta"

The type of the event. Always 'response.mcp_call_arguments.delta'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_call_arguments.done

Emitted when the arguments for an MCP tool call are finalized.

arguments: string

A JSON string containing the finalized arguments for the MCP tool call.

item_id: string

The unique identifier of the MCP tool call item being processed.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of this event.

type: "response.mcp_call_arguments.done"

The type of the event. Always 'response.mcp_call_arguments.done'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_call.completed

Emitted when an MCP tool call has completed successfully.

item_id: string

The ID of the MCP tool call item that completed.

output_index: number

The index of the output item that completed.

sequence_number: number

The sequence number of this event.

type: "response.mcp_call.completed"

The type of the event. Always 'response.mcp_call.completed'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_call.failed

Emitted when an MCP tool call has failed.

item_id: string

The ID of the MCP tool call item that failed.

output_index: number

The index of the output item that failed.

sequence_number: number

The sequence number of this event.

type: "response.mcp_call.failed"

The type of the event. Always 'response.mcp_call.failed'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_call.in_progress

Emitted when an MCP tool call is in progress.

item_id: string

The unique identifier of the MCP tool call item being processed.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of this event.

type: "response.mcp_call.in_progress"

The type of the event. Always 'response.mcp_call.in_progress'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_list_tools.completed

Emitted when the list of available MCP tools has been successfully retrieved.

item_id: string

The ID of the MCP tool call item that produced this output.

output_index: number

The index of the output item that was processed.

sequence_number: number

The sequence number of this event.

type: "response.mcp_list_tools.completed"

The type of the event. Always 'response.mcp_list_tools.completed'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_list_tools.failed

Emitted when the attempt to list available MCP tools has failed.

item_id: string

The ID of the MCP tool call item that failed.

output_index: number

The index of the output item that failed.

sequence_number: number

The sequence number of this event.

type: "response.mcp_list_tools.failed"

The type of the event. Always 'response.mcp_list_tools.failed'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.mcp_list_tools.in_progress

Emitted when the system is in the process of retrieving the list of available MCP tools.

item_id: string

The ID of the MCP tool call item that is being processed.

output_index: number

The index of the output item that is being processed.

sequence_number: number

The sequence number of this event.

type: "response.mcp_list_tools.in_progress"

The type of the event. Always 'response.mcp_list_tools.in_progress'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.code_interpreter_call.in_progress

Emitted when a code interpreter call is in progress.

item_id: string

The unique identifier of the code interpreter tool call item.

output_index: number

The index of the output item in the response for which the code interpreter call is in progress.

sequence_number: number

The sequence number of this event, used to order streaming events.

type: "response.code_interpreter_call.in_progress"

The type of the event. Always response.code_interpreter_call.in_progress.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.code_interpreter_call.interpreting

Emitted when the code interpreter is actively interpreting the code snippet.

item_id: string

The unique identifier of the code interpreter tool call item.

output_index: number

The index of the output item in the response for which the code interpreter is interpreting code.

sequence_number: number

The sequence number of this event, used to order streaming events.

type: "response.code_interpreter_call.interpreting"

The type of the event. Always response.code_interpreter_call.interpreting.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.code_interpreter_call.completed

Emitted when the code interpreter call is completed.

item_id: string

The unique identifier of the code interpreter tool call item.

output_index: number

The index of the output item in the response for which the code interpreter call is completed.

sequence_number: number

The sequence number of this event, used to order streaming events.

type: "response.code_interpreter_call.completed"

The type of the event. Always response.code_interpreter_call.completed.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.code_interpreter_call_code.delta

Emitted when a partial code snippet is streamed by the code interpreter.

delta: string

The partial code snippet being streamed by the code interpreter.

item_id: string

The unique identifier of the code interpreter tool call item.

output_index: number

The index of the output item in the response for which the code is being streamed.

sequence_number: number

The sequence number of this event, used to order streaming events.

type: "response.code_interpreter_call_code.delta"

The type of the event. Always response.code_interpreter_call_code.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.code_interpreter_call_code.done

Emitted when the code snippet is finalized by the code interpreter.

code: string

The final code snippet output by the code interpreter.

item_id: string

The unique identifier of the code interpreter tool call item.

output_index: number

The index of the output item in the response for which the code is finalized.

sequence_number: number

The sequence number of this event, used to order streaming events.

type: "response.code_interpreter_call_code.done"

The type of the event. Always response.code_interpreter_call_code.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.output_text.annotation.added

Emitted when an annotation is added to output text content.

annotation: unknown

The annotation object being added. (See annotation schema for details.)

annotation_index: number

The index of the annotation within the content part.

content_index: number

The index of the content part within the output item.

item_id: string

The unique identifier of the item to which the annotation is being added.

output_index: number

The index of the output item in the response's output array.

sequence_number: number

The sequence number of this event.

type: "response.output_text.annotation.added"

The type of the event. Always 'response.output_text.annotation.added'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.queued

Emitted when a response is queued and waiting to be processed.

response: BetaResponse { id, created_at, error, 32 more }

The full response object that is queued.

sequence_number: number

The sequence number for this event.

type: "response.queued"

The type of the event. Always 'response.queued'.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.custom_tool_call_input.delta

Event representing a delta (partial update) to the input of a custom tool call.

delta: string

The incremental input data (delta) for the custom tool call.

item_id: string

Unique identifier for the API item associated with this event.

output_index: number

The index of the output this delta applies to.

sequence_number: number

The sequence number of this event.

type: "response.custom_tool_call_input.delta"

The event type identifier.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.custom_tool_call_input.done

Event indicating that input for a custom tool call is complete.

input: string

The complete input data for the custom tool call.

item_id: string

Unique identifier for the API item associated with this event.

output_index: number

The index of the output this event applies to.

sequence_number: number

The sequence number of this event.

type: "response.custom_tool_call_input.done"

The event type identifier.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

error

Emitted when an error occurs.

code: string

The error code.

message: string

The error message.

param: string

The error parameter.

sequence_number: number

The sequence number of this event.

type: "error"

The type of the event. Always error.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.audio.delta

Emitted when there is a partial audio response.

delta: string

A chunk of Base64 encoded response audio bytes.

sequence_number: number

A sequence number for this chunk of the stream response.

type: "response.audio.delta"

The type of the event. Always response.audio.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.audio.done

Emitted when the audio response is complete.

sequence_number: number

The sequence number of the delta.

type: "response.audio.done"

The type of the event. Always response.audio.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.audio.transcript.delta

Emitted when there is a partial transcript of audio.

delta: string

The partial transcript of the audio response.

sequence_number: number

The sequence number of this event.

type: "response.audio.transcript.delta"

The type of the event. Always response.audio.transcript.delta.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

response.audio.transcript.done

Emitted when the full audio transcript is completed.

sequence_number: number

The sequence number of this event.

type: "response.audio.transcript.done"

The type of the event. Always response.audio.transcript.done.

agent: optional object { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.