One of the following:
BetaResponseAudioDeltaEvent { delta, sequence_number, type, agent }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseAudioDoneEvent { sequence_number, type, agent }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseAudioTranscriptDeltaEvent { delta, sequence_number, type, agent }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseAudioTranscriptDoneEvent { sequence_number, type, agent }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCodeInterpreterCallCodeDeltaEvent { delta, item_id, output_index, 3 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCodeInterpreterCallCodeDoneEvent { code, item_id, output_index, 3 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCodeInterpreterCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCodeInterpreterCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCodeInterpreterCallInterpretingEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCompactionCompactingEvent { item_id, output_index, sequence_number, 2 more }

Emitted when new summary content is sampled for a compaction trigger. Contains no summary content.

item_id: string

The ID of the compaction output item.

output_index: number

The index of the compaction output item.

sequence_number: number

The sequence number of the event that was emitted.

type: "response.compaction.compacting"

The type of the event, always response.compaction.compacting.

agent?: Agent { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCompletedEvent { response, sequence_number, type, agent }

Emitted when the model response is complete.

response: BetaResponse { id, access_programs, created_at, 36 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseContentPartAddedEvent { content_index, item_id, output_index, 4 more }

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, text, type, logprobs } | BetaResponseOutputRefusal { refusal, type } | ReasoningText { text, type }

The content part that was added.

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

A text output from the model.

annotations: Array<FileCitation { file_id, filename, index, type } | URLCitation { end_index, start_index, title, 2 more } | ContainerFileCitation { container_id, end_index, file_id, 3 more } | FilePath { file_id, index, type } >

The annotations of the text output.

One of the following:
FileCitation { 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 in the output text at which to insert the file citation.

type: "file_citation"

The type of the file citation. Always file_citation.

URLCitation { 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 { 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 { 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.

text: string

The text output from the model.

type: "output_text"

The type of the output text. Always output_text.

logprobs?: Array<Logprob>
token: string
bytes: Array<number>
logprob: number
top_logprobs: Array<TopLogprob>
token: string
bytes: Array<number>
logprob: number
BetaResponseOutputRefusal { 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 { 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseContentPartDoneEvent { content_index, item_id, output_index, 4 more }

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, text, type, logprobs } | BetaResponseOutputRefusal { refusal, type } | ReasoningText { text, type }

The content part that is done.

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

A text output from the model.

annotations: Array<FileCitation { file_id, filename, index, type } | URLCitation { end_index, start_index, title, 2 more } | ContainerFileCitation { container_id, end_index, file_id, 3 more } | FilePath { file_id, index, type } >

The annotations of the text output.

One of the following:
FileCitation { 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 in the output text at which to insert the file citation.

type: "file_citation"

The type of the file citation. Always file_citation.

URLCitation { 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 { 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 { 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.

text: string

The text output from the model.

type: "output_text"

The type of the output text. Always output_text.

logprobs?: Array<Logprob>
token: string
bytes: Array<number>
logprob: number
top_logprobs: Array<TopLogprob>
token: string
bytes: Array<number>
logprob: number
BetaResponseOutputRefusal { 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 { 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseCreatedEvent { response, sequence_number, type, agent }

An event that is emitted when a response is created.

response: BetaResponse { id, access_programs, created_at, 36 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseErrorEvent { code, message, param, 3 more }

Emitted when an error occurs.

code: string | null

The error code.

message: string

The error message.

param: string | null

The error parameter.

sequence_number: number

The sequence number of this event.

type: "error"

The type of the event. Always error.

agent?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseFileSearchCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseFileSearchCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseFileSearchCallSearchingEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseFunctionCallArgumentsDeltaEvent { delta, item_id, output_index, 3 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseFunctionCallArgumentsDoneEvent { arguments, item_id, output_index, 3 more }

Emitted when function-call arguments are finalized.

arguments: string

The function-call arguments.

item_id: string

The ID of the item.

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseShellCallCommandAddedEvent { command, command_index, output_index, 3 more }

A streaming event that indicated a shell command was added to a tool call.

command: string

The shell command that was added.

command_index: number

The index of the shell command that was added.

output_index: number

The index of the output item that was updated.

sequence_number: number

The sequence number of the event that was emitted.

type: "response.shell_call_command.added"

The type of the event, always response.shell_call_command.added.

agent?: Agent { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseShellCallCommandDeltaEvent { command_index, delta, output_index, 4 more }

A streaming event that indicated a shell command was incrementally updated.

command_index: number

The index of the shell command that was updated.

delta: string

The shell command delta that was appended.

output_index: number

The index of the output item that was updated.

sequence_number: number

The sequence number of the event that was emitted.

type: "response.shell_call_command.delta"

The type of the event, always response.shell_call_command.delta.

agent?: Agent { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

obfuscation?: string

An obfuscation string that was added to pad the event payload.

BetaResponseShellCallCommandDoneEvent { command, command_index, output_index, 3 more }

A streaming event that indicated a shell command was completed.

command: string

The final shell command that was emitted.

command_index: number

The index of the shell command that was completed.

output_index: number

The index of the output item that was updated.

sequence_number: number

The sequence number of the event that was emitted.

type: "response.shell_call_command.done"

The type of the event, always response.shell_call_command.done.

agent?: Agent { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseShellCallOutputContentDeltaEvent { command_index, delta, item_id, 4 more }

A streaming event that indicated shell call output was incrementally added.

command_index: number

The index of the shell command that produced output.

delta: Delta { stderr, stdout }

The stdout/stderr delta that was emitted.

stderr?: string

The stderr delta that was emitted.

stdout?: string

The stdout delta that was emitted.

item_id: string

The ID of the output item that was updated.

output_index: number

The index of the output item that was updated.

sequence_number: number

The sequence number of the event that was emitted.

type: "response.shell_call_output_content.delta"

The type of the event, always response.shell_call_output_content.delta.

agent?: Agent { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseShellCallOutputContentDoneEvent { command_index, item_id, output, 4 more }

A streaming event that indicated shell call output was completed.

command_index: number

The index of the shell command that produced output.

item_id: string

The ID of the output item that was updated.

output: Array<Output>

The output contents emitted for the shell command.

outcome: Timeout { type } | Exit { exit_code, type }

Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.

One of the following:
Timeout { type }

Indicates that the shell call exceeded its configured time limit.

type: "timeout"

The outcome type. Always timeout.

Exit { exit_code, type }

Indicates that the shell commands finished and returned an exit code.

exit_code: number

Exit code from the shell process.

type: "exit"

The outcome type. Always exit.

stderr: string

The standard error output that was captured.

stdout: string

The standard output that was captured.

created_by?: string

The identifier of the actor that created the item.

output_index: number

The index of the output item that was updated.

sequence_number: number

The sequence number of the event that was emitted.

type: "response.shell_call_output_content.done"

The type of the event, always response.shell_call_output_content.done.

agent?: Agent { agent_name }

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseInProgressEvent { response, sequence_number, type, agent }

Emitted when the response is in progress.

response: BetaResponse { id, access_programs, created_at, 36 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseFailedEvent { response, sequence_number, type, agent }

An event that is emitted when a response fails.

response: BetaResponse { id, access_programs, created_at, 36 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseIncompleteEvent { response, sequence_number, type, agent }

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

Over WebSocket, steering can finish a response with response.incomplete_details.reason set to steered, followed automatically by a successor response.created that commits the queued steering input.

response: BetaResponse { id, access_programs, created_at, 36 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseOutputItemAddedEvent { item, output_index, sequence_number, 2 more }

Emitted when a new output item is added.

The output item that was added. For reasoning items, encrypted_content may be incomplete while the item is in progress. Use the reasoning item from the corresponding response.output_item.done event when passing it as input to a subsequent request.

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseOutputItemDoneEvent { item, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseReasoningSummaryPartAddedEvent { item_id, output_index, part, 4 more }

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: Part { 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseReasoningSummaryPartDoneEvent { item_id, output_index, part, 5 more }

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: Part { 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

status?: "incomplete"

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

BetaResponseReasoningSummaryTextDeltaEvent { delta, item_id, output_index, 4 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseReasoningSummaryTextDoneEvent { item_id, output_index, sequence_number, 4 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseReasoningTextDeltaEvent { content_index, delta, item_id, 4 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseReasoningTextDoneEvent { content_index, item_id, output_index, 4 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseRefusalDeltaEvent { content_index, delta, item_id, 4 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseRefusalDoneEvent { content_index, item_id, output_index, 4 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseTextDeltaEvent { content_index, delta, item_id, 5 more }

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<Logprob>

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?: Array<TopLogprob>

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

token?: string

A possible text token.

logprob?: 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseTextDoneEvent { content_index, item_id, logprobs, 5 more }

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<Logprob>

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?: Array<TopLogprob>

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

token?: string

A possible text token.

logprob?: 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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseWebSearchCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseWebSearchCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseWebSearchCallSearchingEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseImageGenCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseImageGenCallGeneratingEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseImageGenCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

BetaResponseImageGenCallPartialImageEvent { item_id, output_index, partial_image_b64, 8 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

agent_name: string

The canonical name of the agent that produced this item.

background?: string

The background setting that was used.

output_format?: string

The output format that was used.

quality?: string

The image quality that was used.

size?: string

The image size that was used.

BetaResponseMcpCallArgumentsDeltaEvent { delta, item_id, output_index, 3 more }

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?: Agent | null

The agent that owns this multi-agent streaming event.

BetaResponseMcpCallArgumentsDoneEvent { arguments, item_id, output_index, 3 more }

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

BetaResponseMcpCallCompletedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an MCP tool call has completed successfully.

BetaResponseMcpCallFailedEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an MCP tool call has failed.

BetaResponseMcpCallInProgressEvent { item_id, output_index, sequence_number, 2 more }

Emitted when an MCP tool call is in progress.

BetaResponseMcpListToolsCompletedEvent { item_id, output_index, sequence_number, 2 more }

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

BetaResponseMcpListToolsFailedEvent { item_id, output_index, sequence_number, 2 more }

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

BetaResponseMcpListToolsInProgressEvent { item_id, output_index, sequence_number, 2 more }

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

BetaResponseOutputTextAnnotationAddedEvent { annotation, annotation_index, content_index, 5 more }

Emitted when an annotation is added to output text content.

BetaResponseQueuedEvent { response, sequence_number, type, agent }

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

BetaResponseCustomToolCallInputDeltaEvent { delta, item_id, output_index, 3 more }

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

BetaResponseCustomToolCallInputDoneEvent { input, item_id, output_index, 3 more }

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