One of the following:
class BetaResponseAudioWsDelta: …

Emitted when there is a partial audio response.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseAudioWsDone: …

Emitted when the audio response is complete.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseAudioTranscriptWsDelta: …

Emitted when there is a partial transcript of audio.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseAudioTranscriptWsDone: …

Emitted when the full audio transcript is completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCodeInterpreterCallCodeWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCodeInterpreterCallCodeWsDone: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCodeInterpreterCallWsCompleted: …

Emitted when the code interpreter call is completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCodeInterpreterCallInWsProgress: …

Emitted when a code interpreter call is in progress.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCodeInterpreterCallWsInterpreting: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCompactionWsCompacting: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWsCompleted: …

Emitted when the model response is complete.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseContentPartWsAdded: …

Emitted when a new content part is added.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseContentPartWsDone: …

Emitted when a content part is done.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWsCreated: …

An event that is emitted when a response is created.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseFileSearchCallWsCompleted: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseFileSearchCallInWsProgress: …

Emitted when a file search call is initiated.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseFileSearchCallWsSearching: …

Emitted when a file search is currently searching.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseFunctionCallArgumentsWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseFunctionCallArgumentsWsDone: …

Emitted when function-call arguments are finalized.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseShellCallCommandWsAdded: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseShellCallCommandWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseShellCallCommandWsDone: …

A streaming event that indicated a shell command was completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseShellCallOutputContentWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseShellCallOutputContentWsDone: …

A streaming event that indicated shell call output was completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseInWsProgress: …

Emitted when the response is in progress.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWsFailed: …

An event that is emitted when a response fails.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWsIncomplete: …

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.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseOutputItemWsAdded: …

Emitted when a new output item is added.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseOutputItemWsDone: …

Emitted when an output item is marked done.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseReasoningSummaryPartWsAdded: …

Emitted when a new reasoning summary part is added.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseReasoningSummaryPartWsDone: …

Emitted when a reasoning summary part is completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseReasoningSummaryTextWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseReasoningSummaryTextWsDone: …

Emitted when a reasoning summary text is completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseReasoningTextWsDelta: …

Emitted when a delta is added to a reasoning text.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseReasoningTextWsDone: …

Emitted when a reasoning text is completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseRefusalWsDelta: …

Emitted when there is a partial refusal text.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseRefusalWsDone: …

Emitted when refusal text is finalized.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseTextWsDelta: …

Emitted when there is an additional text delta.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseTextWsDone: …

Emitted when text content is finalized.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWebSearchCallWsCompleted: …

Emitted when a web search call is completed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWebSearchCallInWsProgress: …

Emitted when a web search call is initiated.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWebSearchCallWsSearching: …

Emitted when a web search call is executing.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseImageGenCallWsCompleted: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseImageGenCallWsGenerating: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseImageGenCallInWsProgress: …

Emitted when an image generation tool call is in progress.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseImageGenCallPartialWsImage: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpCallArgumentsWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpCallArgumentsWsDone: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpCallWsCompleted: …

Emitted when an MCP tool call has completed successfully.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpCallWsFailed: …

Emitted when an MCP tool call has failed.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpCallInWsProgress: …

Emitted when an MCP tool call is in progress.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpListToolsWsCompleted: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpListToolsWsFailed: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseMcpListToolsInWsProgress: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseOutputTextAnnotationWsAdded: …

Emitted when an annotation is added to output text content.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWsQueued: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCustomToolCallInputWsDelta: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseCustomToolCallInputWsDone: …

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

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseWsError: …

Emitted when an error occurs while processing a Responses WebSocket request.

error: BetaResponseWsErrorError

Details about the error.

code: Optional[str]

The error code that was emitted, if any.

message: str

The human-readable error message that was emitted.

param: Optional[str]

The parameter name that was associated with the error, if any.

type: str

The error type that was emitted.

headers: Optional[Dict[str, str]]

The response headers that were emitted with the error, if any.

misalignment: Optional[BetaResponseWsErrorErrorMisalignment]
detailed_explanation: Optional[str]

The public explanation for this block.

error_type: Optional[Union[str, Literal["potentially_unintended_data_transfer", "potentially_unintended_data_access", "potentially_unintended_destructive_activity", "other"], null]]

An optional classification; clients must accept additional values.

One of the following:
str
Literal["potentially_unintended_data_transfer", "potentially_unintended_data_access", "potentially_unintended_destructive_activity", "other"]

An optional classification; clients must accept additional values.

One of the following:
"potentially_unintended_data_transfer"
"potentially_unintended_data_access"
"potentially_unintended_destructive_activity"
"other"
review_target: Optional[str]

An opaque target for explicitly continuing this review, or null when unavailable.

minLength1
maxLength96
steer: Optional[BetaResponseWsErrorErrorMisalignmentSteer]

An optional public continuation instruction.

message: str

The public continuation instruction.

type: Literal["error"]

The type of the event. Always error.

agent: Optional[BetaResponseWsErrorAgent]

The agent that owns this multi-agent streaming event.

sequence_number: Optional[int]

The sequence number of an error emitted by the response stream.

status: Optional[int]

The HTTP status code associated with a WebSocket protocol error.

stream_id: Optional[str]

The WebSocket lane that emitted this event. This field is present when the originating response.create event supplied a stream_id.

class BetaResponseSteerAcceptedEvent: …

Emitted when steering input has been validated and queued. Acceptance means the server owns the input, not that it has been applied. The successor’s response.created event is the commit point. If accepted input cannot be committed, response.steer.failed returns it with the same steering ID.

When the response stops for client-owned tool output or approval, the input remains queued and response.steer.pending is emitted after response.completed. Fill the pending event’s required_input stubs with saved results and send one matching explicit response.create per parent. Do not resend accepted input while it is still queued.

class BetaResponseSteerPendingEvent: …

Emitted when accepted steering input remains queued after the target response completes. The server still owns the input. Do not resend it. The successor’s response.created event is the commit point.

When reason is waiting_for_required_input, this event follows response.completed while the response waits for the tool results or approval decisions identified by required_input. Copy those stubs, fill their result fields using the ordinary response.create input schemas, and submit one continuation per parent with the same previous_response_id and WebSocket lane. Use saved results without rerunning tools. The queued steering input is prepended in submission order to the continuation’s input. That explicit request retains its own settings.

This notification is emitted at most once per steering submission. Multiple submissions for the same parent can report the same required inputs; they do not each require a separate continuation.

class BetaResponseSteerFailedEvent: …

Emitted when steering input is rejected or cannot be committed to a successor response. Returns the original, uncommitted input so the client can carry it into response.create when appropriate. Invalid input must be corrected before retrying.

Failures after acceptance include the same steering ID. Failures before an ID is allocated omit steer.id. A lost connection or missing acknowledgement leaves the outcome unknown; it is not proof that the input was rejected.

class BetaResponseInjectCreatedEvent: …

Emitted when all injected input items were validated and committed to the active response.

class BetaResponseInjectFailedEvent: …

Emitted when injected input could not be committed to a response. The event returns the uncommitted raw input so the client can retry it in another response when appropriate.