One of the following:
class BetaResponseAudioDeltaEvent: …

Emitted when there is a partial audio response.

delta: str

A chunk of Base64 encoded response audio bytes.

sequence_number: int

A sequence number for this chunk of the stream response.

type: Literal["response.audio.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseAudioDoneEvent: …

Emitted when the audio response is complete.

sequence_number: int

The sequence number of the delta.

type: Literal["response.audio.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseAudioTranscriptDeltaEvent: …

Emitted when there is a partial transcript of audio.

delta: str

The partial transcript of the audio response.

sequence_number: int

The sequence number of this event.

type: Literal["response.audio.transcript.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseAudioTranscriptDoneEvent: …

Emitted when the full audio transcript is completed.

sequence_number: int

The sequence number of this event.

type: Literal["response.audio.transcript.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCodeInterpreterCallCodeDeltaEvent: …

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

delta: str

The partial code snippet being streamed by the code interpreter.

item_id: str

The unique identifier of the code interpreter tool call item.

output_index: int

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

sequence_number: int

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

type: Literal["response.code_interpreter_call_code.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCodeInterpreterCallCodeDoneEvent: …

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

code: str

The final code snippet output by the code interpreter.

item_id: str

The unique identifier of the code interpreter tool call item.

output_index: int

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

sequence_number: int

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

type: Literal["response.code_interpreter_call_code.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCodeInterpreterCallCompletedEvent: …

Emitted when the code interpreter call is completed.

item_id: str

The unique identifier of the code interpreter tool call item.

output_index: int

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

sequence_number: int

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

type: Literal["response.code_interpreter_call.completed"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCodeInterpreterCallInProgressEvent: …

Emitted when a code interpreter call is in progress.

item_id: str

The unique identifier of the code interpreter tool call item.

output_index: int

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

sequence_number: int

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

type: Literal["response.code_interpreter_call.in_progress"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCodeInterpreterCallInterpretingEvent: …

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

item_id: str

The unique identifier of the code interpreter tool call item.

output_index: int

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

sequence_number: int

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

type: Literal["response.code_interpreter_call.interpreting"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCompactionCompactingEvent: …

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

item_id: str

The ID of the compaction output item.

output_index: int

The index of the compaction output item.

sequence_number: int

The sequence number of the event that was emitted.

type: Literal["response.compaction.compacting"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCompletedEvent: …

Emitted when the model response is complete.

response: BetaResponse

Properties of the completed response.

sequence_number: int

The sequence number for this event.

type: Literal["response.completed"]

The type of the event. Always response.completed.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseContentPartAddedEvent: …

Emitted when a new content part is added.

content_index: int

The index of the content part that was added.

item_id: str

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

output_index: int

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

part: Part

The content part that was added.

One of the following:
class BetaResponseOutputText: …

A text output from the model.

annotations: List[Annotation]

The annotations of the text output.

One of the following:
class AnnotationFileCitation: …

A citation to a file.

file_id: str

The ID of the file.

filename: str

The filename of the file cited.

index: int

The index in the output text at which to insert the file citation.

type: Literal["file_citation"]

The type of the file citation. Always file_citation.

class AnnotationURLCitation: …

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

end_index: int

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

start_index: int

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

title: str

The title of the web resource.

type: Literal["url_citation"]

The type of the URL citation. Always url_citation.

url: str

The URL of the web resource.

formaturi
class AnnotationContainerFileCitation: …

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

container_id: str

The ID of the container file.

end_index: int

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

file_id: str

The ID of the file.

filename: str

The filename of the container file cited.

start_index: int

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

type: Literal["container_file_citation"]

The type of the container file citation. Always container_file_citation.

class AnnotationFilePath: …

A path to a file.

file_id: str

The ID of the file.

index: int

The index of the file in the list of files.

type: Literal["file_path"]

The type of the file path. Always file_path.

text: str

The text output from the model.

type: Literal["output_text"]

The type of the output text. Always output_text.

logprobs: Optional[List[Logprob]]
token: str
bytes: List[int]
logprob: float
top_logprobs: List[LogprobTopLogprob]
token: str
bytes: List[int]
logprob: float
class BetaResponseOutputRefusal: …

A refusal from the model.

refusal: str

The refusal explanation from the model.

type: Literal["refusal"]

The type of the refusal. Always refusal.

class PartReasoningText: …

Reasoning text from the model.

text: str

The reasoning text from the model.

type: Literal["reasoning_text"]

The type of the reasoning text. Always reasoning_text.

sequence_number: int

The sequence number of this event.

type: Literal["response.content_part.added"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseContentPartDoneEvent: …

Emitted when a content part is done.

content_index: int

The index of the content part that is done.

item_id: str

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

output_index: int

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

part: Part

The content part that is done.

One of the following:
class BetaResponseOutputText: …

A text output from the model.

annotations: List[Annotation]

The annotations of the text output.

One of the following:
class AnnotationFileCitation: …

A citation to a file.

file_id: str

The ID of the file.

filename: str

The filename of the file cited.

index: int

The index in the output text at which to insert the file citation.

type: Literal["file_citation"]

The type of the file citation. Always file_citation.

class AnnotationURLCitation: …

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

end_index: int

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

start_index: int

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

title: str

The title of the web resource.

type: Literal["url_citation"]

The type of the URL citation. Always url_citation.

url: str

The URL of the web resource.

formaturi
class AnnotationContainerFileCitation: …

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

container_id: str

The ID of the container file.

end_index: int

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

file_id: str

The ID of the file.

filename: str

The filename of the container file cited.

start_index: int

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

type: Literal["container_file_citation"]

The type of the container file citation. Always container_file_citation.

class AnnotationFilePath: …

A path to a file.

file_id: str

The ID of the file.

index: int

The index of the file in the list of files.

type: Literal["file_path"]

The type of the file path. Always file_path.

text: str

The text output from the model.

type: Literal["output_text"]

The type of the output text. Always output_text.

logprobs: Optional[List[Logprob]]
token: str
bytes: List[int]
logprob: float
top_logprobs: List[LogprobTopLogprob]
token: str
bytes: List[int]
logprob: float
class BetaResponseOutputRefusal: …

A refusal from the model.

refusal: str

The refusal explanation from the model.

type: Literal["refusal"]

The type of the refusal. Always refusal.

class PartReasoningText: …

Reasoning text from the model.

text: str

The reasoning text from the model.

type: Literal["reasoning_text"]

The type of the reasoning text. Always reasoning_text.

sequence_number: int

The sequence number of this event.

type: Literal["response.content_part.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseCreatedEvent: …

An event that is emitted when a response is created.

response: BetaResponse

The response that was created.

sequence_number: int

The sequence number for this event.

type: Literal["response.created"]

The type of the event. Always response.created.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseErrorEvent: …

Emitted when an error occurs.

code: Optional[str]

The error code.

message: str

The error message.

param: Optional[str]

The error parameter.

sequence_number: int

The sequence number of this event.

type: Literal["error"]

The type of the event. Always error.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseFileSearchCallCompletedEvent: …

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

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.file_search_call.completed"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseFileSearchCallInProgressEvent: …

Emitted when a file search call is initiated.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.file_search_call.in_progress"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseFileSearchCallSearchingEvent: …

Emitted when a file search is currently searching.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.file_search_call.searching"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseFunctionCallArgumentsDeltaEvent: …

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

delta: str

The function-call arguments delta that is added.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.function_call_arguments.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseFunctionCallArgumentsDoneEvent: …

Emitted when function-call arguments are finalized.

arguments: str

The function-call arguments.

item_id: str

The ID of the item.

output_index: int

The index of the output item.

sequence_number: int

The sequence number of this event.

type: Literal["response.function_call_arguments.done"]
agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseShellCallCommandAddedEvent: …

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

command: str

The shell command that was added.

command_index: int

The index of the shell command that was added.

output_index: int

The index of the output item that was updated.

sequence_number: int

The sequence number of the event that was emitted.

type: Literal["response.shell_call_command.added"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseShellCallCommandDeltaEvent: …

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

command_index: int

The index of the shell command that was updated.

delta: str

The shell command delta that was appended.

output_index: int

The index of the output item that was updated.

sequence_number: int

The sequence number of the event that was emitted.

type: Literal["response.shell_call_command.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

obfuscation: Optional[str]

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

class BetaResponseShellCallCommandDoneEvent: …

A streaming event that indicated a shell command was completed.

command: str

The final shell command that was emitted.

command_index: int

The index of the shell command that was completed.

output_index: int

The index of the output item that was updated.

sequence_number: int

The sequence number of the event that was emitted.

type: Literal["response.shell_call_command.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseShellCallOutputContentDeltaEvent: …

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

command_index: int

The index of the shell command that produced output.

delta: Delta

The stdout/stderr delta that was emitted.

stderr: Optional[str]

The stderr delta that was emitted.

stdout: Optional[str]

The stdout delta that was emitted.

item_id: str

The ID of the output item that was updated.

output_index: int

The index of the output item that was updated.

sequence_number: int

The sequence number of the event that was emitted.

type: Literal["response.shell_call_output_content.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseShellCallOutputContentDoneEvent: …

A streaming event that indicated shell call output was completed.

command_index: int

The index of the shell command that produced output.

item_id: str

The ID of the output item that was updated.

output: List[Output]

The output contents emitted for the shell command.

outcome: OutputOutcome

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

One of the following:
class OutputOutcomeTimeout: …

Indicates that the shell call exceeded its configured time limit.

type: Literal["timeout"]

The outcome type. Always timeout.

class OutputOutcomeExit: …

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

exit_code: int

Exit code from the shell process.

type: Literal["exit"]

The outcome type. Always exit.

stderr: str

The standard error output that was captured.

stdout: str

The standard output that was captured.

created_by: Optional[str]

The identifier of the actor that created the item.

output_index: int

The index of the output item that was updated.

sequence_number: int

The sequence number of the event that was emitted.

type: Literal["response.shell_call_output_content.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseInProgressEvent: …

Emitted when the response is in progress.

response: BetaResponse

The response that is in progress.

sequence_number: int

The sequence number of this event.

type: Literal["response.in_progress"]

The type of the event. Always response.in_progress.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseFailedEvent: …

An event that is emitted when a response fails.

response: BetaResponse

The response that failed.

sequence_number: int

The sequence number of this event.

type: Literal["response.failed"]

The type of the event. Always response.failed.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseIncompleteEvent: …

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

The response that was incomplete.

sequence_number: int

The sequence number of this event.

type: Literal["response.incomplete"]

The type of the event. Always response.incomplete.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseOutputItemAddedEvent: …

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: int

The index of the output item that was added.

sequence_number: int

The sequence number of this event.

type: Literal["response.output_item.added"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseOutputItemDoneEvent: …

Emitted when an output item is marked done.

The output item that was marked done.

output_index: int

The index of the output item that was marked done.

sequence_number: int

The sequence number of this event.

type: Literal["response.output_item.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseReasoningSummaryPartAddedEvent: …

Emitted when a new reasoning summary part is added.

item_id: str

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

output_index: int

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

part: Part

The summary part that was added.

text: str

The text of the summary part.

type: Literal["summary_text"]

The type of the summary part. Always summary_text.

sequence_number: int

The sequence number of this event.

summary_index: int

The index of the summary part within the reasoning summary.

type: Literal["response.reasoning_summary_part.added"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseReasoningSummaryPartDoneEvent: …

Emitted when a reasoning summary part is completed.

item_id: str

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

output_index: int

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

part: Part

The completed summary part.

text: str

The text of the summary part.

type: Literal["summary_text"]

The type of the summary part. Always summary_text.

sequence_number: int

The sequence number of this event.

summary_index: int

The index of the summary part within the reasoning summary.

type: Literal["response.reasoning_summary_part.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

status: Optional[Literal["incomplete"]]

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

class BetaResponseReasoningSummaryTextDeltaEvent: …

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

delta: str

The text delta that was added to the summary.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

summary_index: int

The index of the summary part within the reasoning summary.

type: Literal["response.reasoning_summary_text.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseReasoningSummaryTextDoneEvent: …

Emitted when a reasoning summary text is completed.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

summary_index: int

The index of the summary part within the reasoning summary.

text: str

The full text of the completed reasoning summary.

type: Literal["response.reasoning_summary_text.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseReasoningTextDeltaEvent: …

Emitted when a delta is added to a reasoning text.

content_index: int

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

delta: str

The text delta that was added to the reasoning content.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.reasoning_text.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseReasoningTextDoneEvent: …

Emitted when a reasoning text is completed.

content_index: int

The index of the reasoning content part.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

text: str

The full text of the completed reasoning content.

type: Literal["response.reasoning_text.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseRefusalDeltaEvent: …

Emitted when there is a partial refusal text.

content_index: int

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

delta: str

The refusal text that is added.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.refusal.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseRefusalDoneEvent: …

Emitted when refusal text is finalized.

content_index: int

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

item_id: str

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

output_index: int

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

refusal: str

The refusal text that is finalized.

sequence_number: int

The sequence number of this event.

type: Literal["response.refusal.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseTextDeltaEvent: …

Emitted when there is an additional text delta.

content_index: int

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

delta: str

The text delta that was added.

item_id: str

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

logprobs: List[Logprob]

The log probabilities of the tokens in the delta.

token: str

A possible text token.

logprob: float

The log probability of this token.

top_logprobs: Optional[List[LogprobTopLogprob]]

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

token: Optional[str]

A possible text token.

logprob: Optional[float]

The log probability of this token.

output_index: int

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

sequence_number: int

The sequence number for this event.

type: Literal["response.output_text.delta"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseTextDoneEvent: …

Emitted when text content is finalized.

content_index: int

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

item_id: str

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

logprobs: List[Logprob]

The log probabilities of the tokens in the delta.

token: str

A possible text token.

logprob: float

The log probability of this token.

top_logprobs: Optional[List[LogprobTopLogprob]]

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

token: Optional[str]

A possible text token.

logprob: Optional[float]

The log probability of this token.

output_index: int

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

sequence_number: int

The sequence number for this event.

text: str

The text content that is finalized.

type: Literal["response.output_text.done"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseWebSearchCallCompletedEvent: …

Emitted when a web search call is completed.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of the web search call being processed.

type: Literal["response.web_search_call.completed"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseWebSearchCallInProgressEvent: …

Emitted when a web search call is initiated.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of the web search call being processed.

type: Literal["response.web_search_call.in_progress"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseWebSearchCallSearchingEvent: …

Emitted when a web search call is executing.

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of the web search call being processed.

type: Literal["response.web_search_call.searching"]

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

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseImageGenCallCompletedEvent: …

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

item_id: str

The unique identifier of the image generation item being processed.

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.image_generation_call.completed"]

The type of the event. Always ‘response.image_generation_call.completed’.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseImageGenCallGeneratingEvent: …

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

item_id: str

The unique identifier of the image generation item being processed.

output_index: int

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

sequence_number: int

The sequence number of the image generation item being processed.

type: Literal["response.image_generation_call.generating"]

The type of the event. Always ‘response.image_generation_call.generating’.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseImageGenCallInProgressEvent: …

Emitted when an image generation tool call is in progress.

item_id: str

The unique identifier of the image generation item being processed.

output_index: int

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

sequence_number: int

The sequence number of the image generation item being processed.

type: Literal["response.image_generation_call.in_progress"]

The type of the event. Always ‘response.image_generation_call.in_progress’.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

class BetaResponseImageGenCallPartialImageEvent: …

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

item_id: str

The unique identifier of the image generation item being processed.

output_index: int

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

partial_image_b64: str

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

partial_image_index: int

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

sequence_number: int

The sequence number of the image generation item being processed.

type: Literal["response.image_generation_call.partial_image"]

The type of the event. Always ‘response.image_generation_call.partial_image’.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

agent_name: str

The canonical name of the agent that produced this item.

background: Optional[str]

The background setting that was used.

output_format: Optional[str]

The output format that was used.

quality: Optional[str]

The image quality that was used.

size: Optional[str]

The image size that was used.

class BetaResponseMcpCallArgumentsDeltaEvent: …

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

delta: str

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

item_id: str

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

output_index: int

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

sequence_number: int

The sequence number of this event.

type: Literal["response.mcp_call_arguments.delta"]

The type of the event. Always ‘response.mcp_call_arguments.delta’.

agent: Optional[Agent]

The agent that owns this multi-agent streaming event.

class BetaResponseMcpCallArgumentsDoneEvent: …

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

class BetaResponseMcpCallCompletedEvent: …

Emitted when an MCP tool call has completed successfully.

class BetaResponseMcpCallFailedEvent: …

Emitted when an MCP tool call has failed.

class BetaResponseMcpCallInProgressEvent: …

Emitted when an MCP tool call is in progress.

class BetaResponseMcpListToolsCompletedEvent: …

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

class BetaResponseMcpListToolsFailedEvent: …

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

class BetaResponseMcpListToolsInProgressEvent: …

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

class BetaResponseOutputTextAnnotationAddedEvent: …

Emitted when an annotation is added to output text content.

class BetaResponseQueuedEvent: …

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

class BetaResponseCustomToolCallInputDeltaEvent: …

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

class BetaResponseCustomToolCallInputDoneEvent: …

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