Responses
responses
Methods
Responses
Domain types
A tool call representing a request to create, delete, or update files using diff patches.
The streamed output emitted by an apply patch tool call.
Allows the assistant to create, delete, or update files using unified diffs.
A tool that controls a virtual computer.
Learn more about the computer tool.
The conversation that this response belonged to.
Input items and output items from this response were automatically added to this conversation.
A custom tool that processes input using a specified format.
Learn more about custom tools
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.
A tool that searches for relevant content from uploaded files.
Learn more about the file search tool.
A tool that allows the model to execute shell commands.
Defines a function in your own code the model can choose to call.
Learn more about function calling.
Details about why the response is incomplete.
A request for human approval of a tool invocation.
A tool call to run code.
A tool call to a computer use tool.
See the computer use guide for more information.
A call to a custom tool created by the model.
The output of a custom tool call from your code, being sent back to the model.
An error object returned when the model fails to generate a Response.
The results of a file search tool call.
See the file search guide for more information.
A tool call to run a function.
See the function calling guide for more information.
The results of a web search tool call.
See the web search guide for more information.
A file input to the model.
A file input to the model.
An image input to the model.
Learn about image inputs.
An image input to the model.
Learn about image inputs.
A text input to the model.
A text input to the model.
An output message from the model.
A refusal from the model.
A text output from the model.
Reference to a prompt template and its variables. Learn more.
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.
Configuration options for a text response from the model.
Can be plain text or structured JSON data. Learn more:
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
The output of a computer tool call.
The output of a function tool call.
An image generation request made by the model.
An internal identifier for an item to reference.
A tool call to run a command on the local shell.
The output of a local shell tool call.
A response to an MCP approval request.
An invocation of a tool on an MCP server.
A list of tools available on an MCP server.
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.
An image generation request made by the model.
A tool call to run a command on the local shell.
An invocation of a tool on an MCP server.
A list of tools available on an MCP server.
Reasoning text from the model.
gpt-5 and o-series models only
Configuration options for reasoning models.
A tool call that applies file diffs by creating, deleting, or updating files.
The output emitted by an apply patch tool call.
A compaction item generated by the v1/responses/compact API.
A compaction item generated by the v1/responses/compact API.
A computer screenshot image used with the computer use tool.
Emitted when there is a partial audio response.
A tool call that executes one or more shell commands in a managed environment.
The output of a shell tool call that was emitted.
A tool representing a request to execute one or more shell commands.
The streamed output items emitted by a shell tool call.
Constrains the tools available to the model to a pre-defined set.
Forces the model to call the apply_patch tool when executing a tool call.
Use this option to force the model to call a specific custom tool.
Use this option to force the model to call a specific function.
Use this option to force the model to call a specific tool on a remote MCP server.
Forces the model to call the shell tool when a tool call is required.
Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
This tool searches the web for relevant results to use in a response.
Learn more about the web search tool.
Search the Internet for sources related to the prompt.
Learn more about the web search tool.