Responses
Cancel a response
Compact a response
Create a model response
Delete a model response
Get a model response
ModelsExpand Collapse
BetaComputerTool { type } A tool that controls a virtual computer. Learn more about the computer tool.
A tool that controls a virtual computer. Learn more about the computer tool.
BetaComputerUsePreviewTool { display_height, display_width, environment, type } A tool that controls a virtual computer. Learn more about the computer tool.
A tool that controls a virtual computer. Learn more about the computer tool.
BetaCustomTool { name, type, allowed_callers, 3 more } A custom tool that processes input using a specified format. Learn more about custom tools
A custom tool that processes input using a specified format. Learn more about custom tools
BetaEasyInputMessage { content, role, phase, type } 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 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.
BetaFileSearchTool { type, vector_store_ids, filters, 2 more } A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
BetaFunctionTool { name, parameters, strict, 5 more } Defines a function in your own code the model can choose to call. Learn more about function calling.
Defines a function in your own code the model can choose to call. Learn more about function calling.
BetaResponseCompactionItem { id, encrypted_content, type, 2 more } A compaction item generated by the v1/responses/compact API.
A compaction item generated by the v1/responses/compact API.
BetaResponseCompactionItemParam { encrypted_content, type, id, agent } A compaction item generated by the v1/responses/compact API.
A compaction item generated by the v1/responses/compact API.
BetaResponseComputerToolCall { id, call_id, pending_safety_checks, 5 more } A tool call to a computer use tool. See the
computer use guide for more information.
A tool call to a computer use tool. See the computer use guide for more information.
BetaResponseContent = BetaResponseInputText { text, type, prompt_cache_breakpoint } | BetaResponseInputImage { detail, type, file_id, 2 more } | BetaResponseInputFile { type, detail, file_data, 4 more } | 3 moreMulti-modal input and output contents.
Multi-modal input and output contents.
BetaResponseCustomToolCallItem extends BetaResponseCustomToolCall { call_id, input, name, 5 more } { id, status, created_by } A call to a custom tool created by the model.
A call to a custom tool created by the model.
BetaResponseCustomToolCallOutputItem extends BetaResponseCustomToolCallOutput { call_id, output, type, 3 more } { id, status, created_by } The output of a custom tool call from your code, being sent back to the model.
The output of a custom tool call from your code, being sent back to the model.
BetaResponseFileSearchToolCall { id, queries, status, 3 more } The results of a file search tool call. See the
file search guide for more information.
The results of a file search tool call. See the file search guide for more information.
BetaResponseFormatTextConfig = Text { type } | BetaResponseFormatTextJSONSchemaConfig { name, schema, type, 2 more } | JSONObject { type } An object specifying the format that the model must output.
Configuring { "type": "json_schema" } enables Structured Outputs,
which ensures the model will match your supplied JSON schema. Learn more in the
Structured Outputs guide.
The default format is { "type": "text" } with no additional options.
Not recommended for gpt-4o and newer models:
Setting to { "type": "json_object" } enables the older JSON mode, which
ensures the message the model generates is valid JSON. Using json_schema
is preferred for models that support it.
An object specifying the format that the model must output.
Configuring { "type": "json_schema" } enables Structured Outputs,
which ensures the model will match your supplied JSON schema. Learn more in the
Structured Outputs guide.
The default format is { "type": "text" } with no additional options.
Not recommended for gpt-4o and newer models:
Setting to { "type": "json_object" } enables the older JSON mode, which
ensures the message the model generates is valid JSON. Using json_schema
is preferred for models that support it.
BetaResponseFormatTextJSONSchemaConfig { name, schema, type, 2 more } JSON Schema response format. Used to generate structured JSON responses.
Learn more about Structured Outputs.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
BetaResponseFunctionCallOutputItem = BetaResponseInputTextContent { text, type, prompt_cache_breakpoint } | BetaResponseInputImageContent { type, detail, file_id, 2 more } | BetaResponseInputFileContent { type, detail, file_data, 4 more } A piece of message content, such as text, an image, or a file.
A piece of message content, such as text, an image, or a file.
BetaResponseFunctionToolCall { arguments, call_id, name, 6 more } A tool call to run a function. See the
function calling guide for more information.
A tool call to run a function. See the function calling guide for more information.
BetaResponseFunctionToolCallItem extends BetaResponseFunctionToolCall { arguments, call_id, name, 6 more } { id, status, created_by } A tool call to run a function. See the
function calling guide for more information.
A tool call to run a function. See the function calling guide for more information.
BetaResponseFunctionWebSearch { id, action, status, 2 more } The results of a web search tool call. See the
web search guide for more information.
The results of a web search tool call. See the web search guide for more information.
BetaResponseIncludable = "file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | 5 moreSpecify additional output data to include in the model response. Currently supported values are:
web_search_call.results: Include the search results of the web search tool call.
web_search_call.action.sources: Include the sources of the web search tool call.
code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.
computer_call_output.output.image_url: Include image urls from the computer call output.
file_search_call.results: Include the search results of the file search tool call.
message.input_image.image_url: Include image urls from the input message.
message.output_text.logprobs: Include logprobs with assistant messages.
reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program).
Specify additional output data to include in the model response. Currently supported values are:
web_search_call.results: Include the search results of the web search tool call.web_search_call.action.sources: Include the sources of the web search tool call.code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.computer_call_output.output.image_url: Include image urls from the computer call output.file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.message.output_text.logprobs: Include logprobs with assistant messages.reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when thestoreparameter is set tofalse, or when an organization is enrolled in the zero data retention program).
BetaResponseInputContent = BetaResponseInputText { text, type, prompt_cache_breakpoint } | BetaResponseInputImage { detail, type, file_id, 2 more } | BetaResponseInputFile { type, detail, file_data, 4 more } A text input to the model.
A text input to the model.
BetaResponseInputImage { detail, type, file_id, 2 more } An image input to the model. Learn about image inputs.
An image input to the model. Learn about image inputs.
BetaResponseInputImageContent { type, detail, file_id, 2 more } An image input to the model. Learn about image inputs
An image input to the model. Learn about image inputs
BetaResponseInputItem = BetaEasyInputMessage { content, role, phase, type } | Message { content, role, agent, 2 more } | BetaResponseOutputMessage { id, content, role, 4 more } | 32 moreA 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 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.
BetaResponseItem = BetaResponseInputMessageItem { id, content, role, 3 more } | BetaResponseOutputMessage { id, content, role, 4 more } | BetaResponseFileSearchToolCall { id, queries, status, 3 more } | 29 moreContent item used to generate a response.
Content item used to generate a response.
BetaResponseOutputItem = BetaResponseOutputMessage { id, content, role, 4 more } | BetaResponseFileSearchToolCall { id, queries, status, 3 more } | BetaResponseFunctionToolCall { arguments, call_id, name, 6 more } | 28 moreAn output message from the model.
An output message from the model.
BetaResponsePrompt { id, variables, version } Reference to a prompt template and its variables.
Learn more.
Reference to a prompt template and its variables. Learn more.
BetaResponseReasoningItem { id, summary, type, 4 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.
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.
BetaResponseStreamEvent = BetaResponseAudioDeltaEvent { delta, sequence_number, type, agent } | BetaResponseAudioDoneEvent { sequence_number, type, agent } | BetaResponseAudioTranscriptDeltaEvent { delta, sequence_number, type, agent } | 55 moreEvent emitted while a response is streamed.
Event emitted while a response is streamed.
BetaResponsesClientEvent = ResponseCreate { type, background, context_management, 31 more } | BetaResponseInjectEvent { input, response_id, type } Client events accepted by the Responses WebSocket server.
Client events accepted by the Responses WebSocket server.
BetaServiceTier = "auto" | "default" | "flex" | 4 more | nullSpecifies the processing type used for serving the request.
- If set to ‘auto’, then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use ‘default’.
- If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model.
- If set to ‘flex’, then the request will be processed with the Flex Processing service tier.
- To opt-in to Fast mode at the request level, include the
service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request.
- If set to ‘ultrafast’, then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for
gpt-5.6-sol; a response served through it will show service_tier=ultrafast.
- When not set, the default behavior is ‘auto’.
When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
Specifies the processing type used for serving the request.
- If set to ‘auto’, then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use ‘default’.
- If set to ‘default’, then the request will be processed with the standard pricing and performance for the selected model.
- If set to ‘flex’, then the request will be processed with the Flex Processing service tier.
- To opt-in to Fast mode at the request level, include the
service_tier=fastorservice_tier=priorityparameter for Responses or Chat Completions. The response will showservice_tier=priorityregardless of if you specifyservice_tier=fastorpriorityin your request. - If set to ‘ultrafast’, then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for
gpt-5.6-sol; a response served through it will showservice_tier=ultrafast. - When not set, the default behavior is ‘auto’.
When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
BetaTool = BetaFunctionTool { name, parameters, strict, 5 more } | BetaFileSearchTool { type, vector_store_ids, filters, 2 more } | BetaComputerTool { type } | 13 moreA tool that can be used to generate a response.
A tool that can be used to generate a response.
BetaToolChoiceOptions = "none" | "auto" | "required"Controls which (if any) tool is called by the model.
none means the model will not call any tool and instead generates a message.
auto means the model can pick between generating a message or calling one or
more tools.
required means the model must call one or more tools.
Controls which (if any) tool is called by the model.
none means the model will not call any tool and instead generates a message.
auto means the model can pick between generating a message or calling one or
more tools.
required means the model must call one or more tools.
BetaToolChoiceTypes { type } Indicates that the model should use a built-in tool to generate a response.
Learn more about built-in tools.
Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
BetaWebSearchPreviewTool { type, search_content_types, search_context_size, user_location } This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
BetaWebSearchTool { type, external_web_access, filters, 2 more } Search the Internet for sources related to the prompt. Learn more about the
web search tool.
Search the Internet for sources related to the prompt. Learn more about the web search tool.