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.

agent_name: str

The canonical name of the agent that produced this item.

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.

sequence_number: int

The sequence number for this event.

steer: Steer

The accepted steering submission.

id: str

The ID assigned to the steering submission.

previous_response_id: str

The ID of the response being steered.

type: Literal["response.steer.accepted"]

The event discriminator. Always response.steer.accepted.

stream_id: Optional[str]

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

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.

An extensible enum describing why accepted steering input is still queued. Clients should handle unknown values because additional reasons may be introduced. Known values include:

  • waiting_for_required_input: The response is waiting for the tool results or approval decisions identified by required_input.
required_input: List[BetaResponseSteerRequiredInput]

Input stubs identifying outstanding client-owned tool results or approval decisions. Each stub contains identifying fields only; the client supplies the result before including it in response.create.

One of the following:
class FunctionCallOutput: …

Supply output using the function tool call output input schema.

call_id: str
name: str
type: Literal["function_call_output"]
class CustomToolCallOutput: …

Supply output using the custom tool call output input schema. The original custom tool call supplies the tool’s name.

call_id: str
type: Literal["custom_tool_call_output"]
class ComputerCallOutput: …

Supply output using the computer tool call output input schema, including any required acknowledged_safety_checks.

call_id: str
type: Literal["computer_call_output"]
class ShellCallOutput: …

Supply output using the shell tool call output input schema. Each output entry includes stdout, stderr, and outcome.

call_id: str
type: Literal["shell_call_output"]
class ApplyPatchCallOutput: …

Supply status and optional output using the apply patch tool call output input schema.

call_id: str
type: Literal["apply_patch_call_output"]
class ToolSearchOutput: …

Supply tools using the tool search output input schema, retaining execution: "client".

call_id: str
execution: Literal["client"]
type: Literal["tool_search_output"]
class McpApprovalResponse: …

Supply approve using the MCP approval response input schema. An optional reason can be supplied when denying the request. The original approval request identifies the tool and server.

approval_request_id: str
type: Literal["mcp_approval_response"]
sequence_number: int

The sequence number for this event.

steer: Steer

The steering submission that remains queued.

id: str

The ID assigned to the steering submission.

previous_response_id: str

The ID of the response being steered.

type: Literal["response.steer.pending"]

The event discriminator. Always response.steer.pending.

stream_id: Optional[str]

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

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.

error: Error

Information about why the input could not be committed.

A machine-readable steering error code. Clients should handle unknown values because additional codes may be introduced. Known values include:

  • response_not_found: The target response is not available on this connection.
  • invalid_input: The event or input failed validation.
  • steering_not_supported: The model or response execution mode does not support steering.
  • too_many_pending_steers: Too much steering input is pending for the response.
  • response_already_completed: The response completed and is no longer accepting steering input.
  • response_not_active: The response is no longer accepting steering input.
  • successor_creation_failed: The successor response could not be created.
message: str

A human-readable description of the error.

type: Literal["invalid_request_error"]

The error type. Always invalid_request_error.

sequence_number: int

The sequence number for this event.

steer: Steer

The steering submission that could not be committed.

Input to queue for a continuation of the response. Uses the same string or input-item shape as response.create.input, with a non-empty array when supplying input items.

Steering accepts only messages with the user role. Each message may contain only type, role, and content, with content as a string or an array of input_text, input_image, and input_file parts. The optional type must be message. Other roles, tool outputs, and item types are not supported for steering.

previous_response_id: str

The ID of the response that was targeted for steering.

id: Optional[str]

The ID assigned to the steering submission, if one was allocated.

type: Literal["response.steer.failed"]

The event discriminator. Always response.steer.failed.

stream_id: Optional[str]

The WebSocket lane that emitted this event, when the target response is available and its response.create event supplied a stream_id.

class BetaResponseInjectCreatedEvent: …

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

response_id: str

The ID of the response that accepted the input.

sequence_number: int

The sequence number for this event.

type: Literal["response.inject.created"]

The event discriminator. Always response.inject.created.

stream_id: Optional[str]

The multiplexed WebSocket stream that emitted the event. This field is present only when WebSocket multiplexing is enabled separately.

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.

error: Error

Information about why the input was not committed.

code: Literal["response_already_completed", "response_not_found"]

A machine-readable error code.

One of the following:
"response_already_completed"
"response_not_found"
message: str

A human-readable description of the error.

The raw input items that were not committed.

One of the following:
class BetaEasyInputMessage: …

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions.

Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.

One of the following:
str

A text input to the model.

One of the following:
class BetaResponseInputText: …

A text input to the model.

text: str

The text input to the model.

type: Literal["input_text"]

The type of the input item. Always input_text.

prompt_cache_breakpoint: Optional[PromptCacheBreakpoint]

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode: Literal["explicit"]

The breakpoint mode. Always explicit.

class BetaResponseInputImage: …

An image input to the model. Learn about image inputs.

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

type: Literal["input_image"]

The type of the input item. Always input_image.

file_id: Optional[str]

The ID of the file to be sent to the model.

image_url: Optional[str]

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

formaturi
prompt_cache_breakpoint: Optional[PromptCacheBreakpoint]

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode: Literal["explicit"]

The breakpoint mode. Always explicit.

class BetaResponseInputFile: …

A file input to the model.

type: Literal["input_file"]

The type of the input item. Always input_file.

detail: Optional[Literal["auto", "low", "high"]]

The detail level of the file to be sent to the model. Use auto to let the system select the detail level; for GPT-5.6 and later models, auto uses high-quality rendering, which may increase input token usage. Use low for lower-cost rendering, or high to render the file at higher quality. Defaults to auto.

One of the following:
"auto"
"low"
"high"
file_data: Optional[str]

The content of the file to be sent to the model.

file_id: Optional[str]

The ID of the file to be sent to the model.

file_url: Optional[str]

The URL of the file to be sent to the model.

formaturi
filename: Optional[str]

The name of the file to be sent to the model.

prompt_cache_breakpoint: Optional[PromptCacheBreakpoint]

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode: Literal["explicit"]

The breakpoint mode. Always explicit.

role: Literal["user", "assistant", "system", "developer"]

The role of the message input. One of user, assistant, system, or developer.

One of the following:
"user"
"assistant"
"system"
"developer"
phase: Optional[Literal["commentary", "final_answer"]]

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). For models like gpt-5.3-codex and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

One of the following:
"commentary"
"final_answer"
type: Optional[Literal["message"]]

The type of the message input. Always message.

class Message: …

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role.

A list of one or many input items to the model, containing different content types.

role: Literal["user", "system", "developer"]

The role of the message input. One of user, system, or developer.

One of the following:
"user"
"system"
"developer"
agent: Optional[MessageAgent]

The agent that produced this item.

agent_name: str

The canonical name of the agent that produced this item.

status: Optional[Literal["in_progress", "completed", "incomplete"]]

The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

One of the following:
"in_progress"
"completed"
"incomplete"
type: Optional[Literal["message"]]

The type of the message input. Always set to message.

class BetaResponseOutputMessage: …

An output message from the model.

id: str

The unique ID of the output message.

content: List[Content]

The content of the output message.

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.

role: Literal["assistant"]

The role of the output message. Always assistant.

status: Literal["in_progress", "completed", "incomplete"]

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

One of the following:
"in_progress"
"completed"
"incomplete"
type: Literal["message"]

The type of the output message. Always message.

agent: Optional[Agent]

The agent that produced this item.

agent_name: str

The canonical name of the agent that produced this item.

phase: Optional[Literal["commentary", "final_answer"]]

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). For models like gpt-5.3-codex and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

One of the following:
"commentary"
"final_answer"
class BetaResponseFileSearchToolCall: …

The results of a file search tool call. See the file search guide for more information.

id: str

The unique ID of the file search tool call.

queries: List[str]

The queries used to search for files.

status: Literal["in_progress", "searching", "completed", 2 more]

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

One of the following:
"in_progress"
"searching"
"completed"
"incomplete"
"failed"
type: Literal["file_search_call"]

The type of the file search tool call. Always file_search_call.

agent: Optional[Agent]

The agent that produced this item.

agent_name: str

The canonical name of the agent that produced this item.

results: Optional[List[Result]]

The results of the file search tool call.

attributes: Optional[Dict[str, Union[str, float, bool]]]

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

One of the following:
str
float
bool
file_id: Optional[str]

The unique ID of the file.

filename: Optional[str]

The name of the file.

score: Optional[float]

The relevance score of the file - a value between 0 and 1.

formatfloat
text: Optional[str]

The text that was retrieved from the file.

class BetaResponseComputerToolCall: …

A tool call to a computer use tool. See the computer use guide for more information.

id: str

The unique ID of the computer call.

call_id: str

An identifier used when responding to the tool call with output.

pending_safety_checks: List[PendingSafetyCheck]

The pending safety checks for the computer call.

id: str

The ID of the pending safety check.

code: Optional[str]

The type of the pending safety check.

message: Optional[str]

Details about the pending safety check.

status: Literal["in_progress", "completed", "incomplete"]

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

One of the following:
"in_progress"
"completed"
"incomplete"
type: Literal["computer_call"]

The type of the computer call. Always computer_call.

action: Optional[BetaComputerAction]

A click action.

actions: Optional[BetaComputerActionList]

Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

agent: Optional[Agent]

The agent that produced this item.

agent_name: str

The canonical name of the agent that produced this item.

class ComputerCallOutput: …

The output of a computer tool call.

call_id: str

The ID of the computer tool call that produced the output.

minLength1
maxLength64

A computer screenshot image used with the computer use tool.

type: Literal["computer_call_output"]

The type of the computer tool call output. Always computer_call_output.

id: Optional[str]

The ID of the computer tool call output.

acknowledged_safety_checks: Optional[List[ComputerCallOutputAcknowledgedSafetyCheck]]

The safety checks reported by the API that have been acknowledged by the developer.

id: str

The ID of the pending safety check.

code: Optional[str]

The type of the pending safety check.

message: Optional[str]

Details about the pending safety check.

agent: Optional[ComputerCallOutputAgent]

The agent that produced this item.

agent_name: str

The canonical name of the agent that produced this item.

status: Optional[Literal["in_progress", "completed", "incomplete"]]

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

One of the following:
"in_progress"
"completed"
"incomplete"
class BetaResponseFunctionToolCall: …

A tool call to run a function. See the function calling guide for more information.

class FunctionCallOutput: …

The output of a function tool call.

class AgentMessage: …

A message routed between agents.

class MultiAgentCall: …
class MultiAgentCallOutput: …
class ToolSearchCall: …
class BetaResponseToolSearchOutputItemParam: …
class AdditionalTools: …
class BetaResponseConfigurationUpdateItemParam: …

An update to the conversation’s response configuration. The configuration remains in effect for subsequent responses until it is replaced by another configuration update.

class BetaResponseReasoningItem: …

A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.

class BetaResponseCompactionItemParam: …

A compaction item generated by the v1/responses/compact API.

class ImageGenerationCall: …

An image generation request made by the model.

class BetaResponseCodeInterpreterToolCall: …

A tool call to run code.

class LocalShellCall: …

A tool call to run a command on the local shell.

class LocalShellCallOutput: …

The output of a local shell tool call.

class ShellCall: …

A tool representing a request to execute one or more shell commands.

class ShellCallOutput: …

The streamed output items emitted by a shell tool call.

class ApplyPatchCall: …

A tool call representing a request to create, delete, or update files using diff patches.

class ApplyPatchCallOutput: …

The streamed output emitted by an apply patch tool call.

class McpListTools: …

A list of tools available on an MCP server.

class McpApprovalRequest: …

A request for human approval of a tool invocation.

class McpApprovalResponse: …

A response to an MCP approval request.

class McpCall: …

An invocation of a tool on an MCP server.

class BetaResponseCustomToolCallOutput: …

The output of a custom tool call from your code, being sent back to the model.

class BetaResponseCustomToolCall: …

A call to a custom tool created by the model.

class CompactionTrigger: …

Compacts the current context. Must be the final input item.

class ItemReference: …

An internal identifier for an item to reference.

class Program: …
class ProgramOutput: …
response_id: str

The ID of the response that rejected the input.

sequence_number: int

The sequence number for this event.

type: Literal["response.inject.failed"]

The event discriminator. Always response.inject.failed.

stream_id: Optional[str]

The multiplexed WebSocket stream that emitted the event. This field is present only when WebSocket multiplexing is enabled separately.