diff --git a/en/resources/beta/subresources/responses/index.md b/en/resources/beta/subresources/responses/index.md index 24c5d84f..3290698b 100644 --- a/en/resources/beta/subresources/responses/index.md +++ b/en/resources/beta/subresources/responses/index.md @@ -4,7 +4,13 @@ **post** `/responses?beta=true` -Create a model response +Creates a model response. Provide [text](/docs/guides/text) or +[image](/docs/guides/images) inputs to generate [text](/docs/guides/text) +or [JSON](/docs/guides/structured-outputs) outputs. Have the model call +your own [custom code](/docs/guides/function-calling) or use built-in +[tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search) +or [file search](/docs/guides/tools-file-search) to use your own data +as input for the model's response. ### Header Parameters @@ -17,7 +23,7 @@ Create a model response - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `context_management: optional array of object { type, compact_threshold }` @@ -76,24 +82,24 @@ Create a model response - `"message.output_text.logprobs"` -- `input: optional string or BetaResponseInput` +- `input: optional string or array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` Text, image, or file inputs to the model, used to generate a response. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](/docs/guides/text) + - [Image inputs](/docs/guides/images) + - [File inputs](/docs/guides/pdf-files) + - [Conversation state](/docs/guides/conversation-state) + - [Function calling](/docs/guides/function-calling) - `TextInput = string` A text input to the model, equivalent to a text input with the `user` role. - - `BetaResponseInput = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + - `InputItemList = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` A list of one or many input items to the model, containing different content types. @@ -146,7 +152,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -317,7 +323,7 @@ Create a model response The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -421,17 +427,7 @@ Create a model response - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -447,6 +443,16 @@ Create a model response - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -505,7 +511,7 @@ Create a model response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -581,7 +587,7 @@ Create a model response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -942,7 +948,7 @@ Create a model response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -1046,7 +1052,7 @@ Create a model response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -1121,7 +1127,7 @@ Create a model response The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -1129,7 +1135,7 @@ Create a model response A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -1159,7 +1165,7 @@ Create a model response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -1313,7 +1319,7 @@ Create a model response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -1838,7 +1844,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -1898,7 +1904,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -1950,7 +1956,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -2174,19 +2180,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -2215,13 +2210,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -2229,14 +2224,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -2451,7 +2440,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -2565,7 +2554,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -3046,7 +3035,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -3106,7 +3095,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -3158,7 +3147,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -3350,19 +3339,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -3391,13 +3369,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -3405,14 +3383,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -3509,7 +3481,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -3623,7 +3595,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -3814,7 +3786,7 @@ Create a model response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -3880,7 +3852,7 @@ Create a model response - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -4689,7 +4661,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -4913,7 +4885,7 @@ Create a model response - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -4932,14 +4904,14 @@ Create a model response Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -5187,12 +5159,12 @@ Create a model response The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -5212,7 +5184,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -5224,11 +5196,11 @@ Create a model response - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` - Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/docs/guides/prompt-caching) for current details. - `mode: optional "implicit" or "explicit"` @@ -5248,7 +5220,7 @@ Create a model response Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -5355,7 +5327,7 @@ Create a model response - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -5363,7 +5335,7 @@ Create a model response - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -5387,7 +5359,7 @@ Create a model response If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](/docs/api-reference/responses-streaming) for more information. - `stream_options: optional object { include_obfuscation }` @@ -5414,8 +5386,8 @@ Create a model response Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -5423,7 +5395,7 @@ Create a model response Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -5446,7 +5418,7 @@ Create a model response - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -5475,7 +5447,7 @@ Create a model response If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -5565,12 +5537,12 @@ Create a model response - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -5680,16 +5652,16 @@ Create a model response We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -5953,7 +5925,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -6013,7 +5985,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -6065,7 +6037,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -6257,19 +6229,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -6298,13 +6259,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -6312,14 +6273,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -6416,7 +6371,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -6530,7 +6485,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -6732,11 +6687,11 @@ Create a model response This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). ### Returns -- `BetaResponse object { id, created_at, error, 31 more }` +- `BetaResponse object { id, created_at, error, 32 more }` - `id: string` @@ -6874,7 +6829,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -7045,7 +7000,7 @@ Create a model response The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -7149,17 +7104,7 @@ Create a model response - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -7175,6 +7120,16 @@ Create a model response - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -7233,7 +7188,7 @@ Create a model response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -7309,7 +7264,7 @@ Create a model response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -7670,7 +7625,7 @@ Create a model response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -7774,7 +7729,7 @@ Create a model response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -7849,7 +7804,7 @@ Create a model response The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -7857,7 +7812,7 @@ Create a model response A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -7887,7 +7842,7 @@ Create a model response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -8041,7 +7996,7 @@ Create a model response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -8566,7 +8521,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -8626,7 +8581,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -8678,7 +8633,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -8902,19 +8857,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -8943,13 +8887,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -8957,14 +8901,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -9179,7 +9117,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -9293,7 +9231,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -9774,7 +9712,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -9834,7 +9772,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -9886,7 +9824,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -10078,19 +10016,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -10119,13 +10046,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -10133,14 +10060,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -10237,7 +10158,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -10351,7 +10272,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -10542,7 +10463,7 @@ Create a model response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -10608,7 +10529,7 @@ Create a model response - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -11417,7 +11338,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -11644,14 +11565,14 @@ Create a model response Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -11870,7 +11791,7 @@ Create a model response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -11946,7 +11867,7 @@ Create a model response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -12042,7 +11963,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -12119,7 +12040,7 @@ Create a model response A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -12167,7 +12088,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -12323,6 +12244,8 @@ Create a model response The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -12331,8 +12254,6 @@ Create a model response The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -12350,7 +12271,7 @@ Create a model response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -12454,7 +12375,7 @@ Create a model response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -12581,7 +12502,7 @@ Create a model response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -13056,7 +12977,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -13116,7 +13037,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -13168,7 +13089,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -13360,19 +13281,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -13401,13 +13311,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -13415,14 +13325,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -13519,7 +13423,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -13633,7 +13537,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -14110,7 +14014,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -14170,7 +14074,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -14222,7 +14126,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -14414,19 +14318,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -14455,13 +14348,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -14469,14 +14362,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -14573,7 +14460,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -14687,7 +14574,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -14871,7 +14758,7 @@ Create a model response - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -15764,7 +15651,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -15895,12 +15782,12 @@ Create a model response - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -16010,16 +15897,16 @@ Create a model response We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -16283,7 +16170,7 @@ Create a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -16343,7 +16230,7 @@ Create a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -16395,7 +16282,7 @@ Create a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -16587,19 +16474,8 @@ Create a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -16628,13 +16504,13 @@ Create a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -16642,14 +16518,8 @@ Create a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -16746,7 +16616,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -16860,7 +16730,7 @@ Create a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -17040,7 +16910,7 @@ Create a model response - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -17057,7 +16927,7 @@ Create a model response - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -17179,16 +17049,22 @@ Create a model response - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -17208,7 +17084,7 @@ Create a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -17220,7 +17096,7 @@ Create a model response - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -17244,7 +17120,7 @@ Create a model response Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -17351,7 +17227,7 @@ Create a model response - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -17359,7 +17235,7 @@ Create a model response - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -17396,8 +17272,8 @@ Create a model response Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -17405,7 +17281,7 @@ Create a model response Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -17428,7 +17304,7 @@ Create a model response - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -17457,7 +17333,7 @@ Create a model response If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -17525,7 +17401,7 @@ Create a model response - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -17547,14 +17423,13 @@ Create a model response This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). ### Example ```http curl https://api.openai.com/v1/responses \ -H 'Content-Type: application/json' \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "model": "gpt-5.1", @@ -17598,8 +17473,6 @@ curl https://api.openai.com/v1/responses \ "type": "file_citation" } ], - "text": "text", - "type": "output_text", "logprobs": [ { "token": "token", @@ -17617,7 +17490,9 @@ curl https://api.openai.com/v1/responses \ } ] } - ] + ], + "text": "text", + "type": "output_text" } ], "role": "assistant", @@ -18499,7 +18374,7 @@ curl https://api.openai.com/v1/responses \ **get** `/responses/{response_id}?beta=true` -Get a model response +Retrieves a model response with the given ID. ### Path Parameters @@ -18546,7 +18421,7 @@ Get a model response If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](/docs/api-reference/responses-streaming) for more information. - `false` @@ -18559,7 +18434,7 @@ Get a model response ### Returns -- `BetaResponse object { id, created_at, error, 31 more }` +- `BetaResponse object { id, created_at, error, 32 more }` - `id: string` @@ -18697,7 +18572,7 @@ Get a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -18868,7 +18743,7 @@ Get a model response The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -18972,17 +18847,7 @@ Get a model response - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -18998,6 +18863,16 @@ Get a model response - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -19056,7 +18931,7 @@ Get a model response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -19132,7 +19007,7 @@ Get a model response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -19493,7 +19368,7 @@ Get a model response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -19597,7 +19472,7 @@ Get a model response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -19672,7 +19547,7 @@ Get a model response The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -19680,7 +19555,7 @@ Get a model response A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -19710,7 +19585,7 @@ Get a model response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -19864,7 +19739,7 @@ Get a model response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -20389,7 +20264,7 @@ Get a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -20449,7 +20324,7 @@ Get a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -20501,7 +20376,7 @@ Get a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -20725,19 +20600,8 @@ Get a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -20766,13 +20630,13 @@ Get a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -20780,14 +20644,8 @@ Get a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -21002,7 +20860,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -21116,7 +20974,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -21597,7 +21455,7 @@ Get a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -21657,7 +21515,7 @@ Get a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -21709,7 +21567,7 @@ Get a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -21901,19 +21759,8 @@ Get a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -21942,13 +21789,13 @@ Get a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -21956,14 +21803,8 @@ Get a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -22060,7 +21901,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -22174,7 +22015,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -22365,7 +22206,7 @@ Get a model response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -22431,7 +22272,7 @@ Get a model response - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -23240,7 +23081,7 @@ Get a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -23467,14 +23308,14 @@ Get a model response Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -23693,7 +23534,7 @@ Get a model response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -23769,7 +23610,7 @@ Get a model response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -23865,7 +23706,7 @@ Get a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -23942,7 +23783,7 @@ Get a model response A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -23990,7 +23831,7 @@ Get a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -24146,6 +23987,8 @@ Get a model response The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -24154,8 +23997,6 @@ Get a model response The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -24173,7 +24014,7 @@ Get a model response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -24277,7 +24118,7 @@ Get a model response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -24404,7 +24245,7 @@ Get a model response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -24879,7 +24720,7 @@ Get a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -24939,7 +24780,7 @@ Get a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -24991,7 +24832,7 @@ Get a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -25183,19 +25024,8 @@ Get a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -25224,13 +25054,13 @@ Get a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -25238,14 +25068,8 @@ Get a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -25342,7 +25166,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -25456,7 +25280,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -25933,7 +25757,7 @@ Get a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -25993,7 +25817,7 @@ Get a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -26045,7 +25869,7 @@ Get a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -26237,19 +26061,8 @@ Get a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -26278,13 +26091,13 @@ Get a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -26292,14 +26105,8 @@ Get a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -26396,7 +26203,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -26510,7 +26317,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -26694,7 +26501,7 @@ Get a model response - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -27587,7 +27394,7 @@ Get a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -27718,12 +27525,12 @@ Get a model response - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -27833,16 +27640,16 @@ Get a model response We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -28106,7 +27913,7 @@ Get a model response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -28166,7 +27973,7 @@ Get a model response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -28218,7 +28025,7 @@ Get a model response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -28410,19 +28217,8 @@ Get a model response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -28451,13 +28247,13 @@ Get a model response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -28465,14 +28261,8 @@ Get a model response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -28569,7 +28359,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -28683,7 +28473,7 @@ Get a model response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -28863,7 +28653,7 @@ Get a model response - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -28880,7 +28670,7 @@ Get a model response - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -29002,16 +28792,22 @@ Get a model response - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -29031,7 +28827,7 @@ Get a model response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -29043,7 +28839,7 @@ Get a model response - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -29067,7 +28863,7 @@ Get a model response Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -29174,7 +28970,7 @@ Get a model response - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -29182,7 +28978,7 @@ Get a model response - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -29219,8 +29015,8 @@ Get a model response Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -29228,7 +29024,7 @@ Get a model response Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -29251,7 +29047,7 @@ Get a model response - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -29280,7 +29076,7 @@ Get a model response If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -29348,7 +29144,7 @@ Get a model response - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -29370,13 +29166,12 @@ Get a model response This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). ### Example ```http curl https://api.openai.com/v1/responses/$RESPONSE_ID \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" ``` @@ -29412,8 +29207,6 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID \ "type": "file_citation" } ], - "text": "text", - "type": "output_text", "logprobs": [ { "token": "token", @@ -29431,7 +29224,9 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID \ } ] } - ] + ], + "text": "text", + "type": "output_text" } ], "role": "assistant", @@ -29629,7 +29424,7 @@ curl https://api.openai.com/v1/responses/resp_123 \ **delete** `/responses/{response_id}?beta=true` -Delete a model response +Deletes a model response with the given ID. ### Path Parameters @@ -29646,7 +29441,6 @@ Delete a model response ```http curl https://api.openai.com/v1/responses/$RESPONSE_ID \ -X DELETE \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" ``` @@ -29672,7 +29466,9 @@ curl -X DELETE https://api.openai.com/v1/responses/resp_123 \ **post** `/responses/{response_id}/cancel?beta=true` -Cancel a response +Cancels a model response with the given ID. Only responses created with +the `background` parameter set to `true` can be cancelled. +[Learn more](/docs/guides/background). ### Path Parameters @@ -29686,7 +29482,7 @@ Cancel a response ### Returns -- `BetaResponse object { id, created_at, error, 31 more }` +- `BetaResponse object { id, created_at, error, 32 more }` - `id: string` @@ -29824,7 +29620,7 @@ Cancel a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -29995,7 +29791,7 @@ Cancel a response The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -30099,17 +29895,7 @@ Cancel a response - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -30125,6 +29911,16 @@ Cancel a response - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -30183,7 +29979,7 @@ Cancel a response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -30259,7 +30055,7 @@ Cancel a response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -30620,7 +30416,7 @@ Cancel a response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -30724,7 +30520,7 @@ Cancel a response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -30799,7 +30595,7 @@ Cancel a response The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -30807,7 +30603,7 @@ Cancel a response A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -30837,7 +30633,7 @@ Cancel a response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -30991,7 +30787,7 @@ Cancel a response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -31516,7 +31312,7 @@ Cancel a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -31576,7 +31372,7 @@ Cancel a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -31628,7 +31424,7 @@ Cancel a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -31852,19 +31648,8 @@ Cancel a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -31893,13 +31678,13 @@ Cancel a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -31907,14 +31692,8 @@ Cancel a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -32129,7 +31908,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -32243,7 +32022,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -32724,7 +32503,7 @@ Cancel a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -32784,7 +32563,7 @@ Cancel a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -32836,7 +32615,7 @@ Cancel a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -33028,19 +32807,8 @@ Cancel a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -33069,13 +32837,13 @@ Cancel a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -33083,14 +32851,8 @@ Cancel a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -33187,7 +32949,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -33301,7 +33063,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -33492,7 +33254,7 @@ Cancel a response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -33558,7 +33320,7 @@ Cancel a response - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -34367,7 +34129,7 @@ Cancel a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -34594,14 +34356,14 @@ Cancel a response Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -34820,7 +34582,7 @@ Cancel a response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -34896,7 +34658,7 @@ Cancel a response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -34992,7 +34754,7 @@ Cancel a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -35069,7 +34831,7 @@ Cancel a response A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -35117,7 +34879,7 @@ Cancel a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -35273,6 +35035,8 @@ Cancel a response The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -35281,8 +35045,6 @@ Cancel a response The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -35300,7 +35062,7 @@ Cancel a response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -35404,7 +35166,7 @@ Cancel a response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -35531,7 +35293,7 @@ Cancel a response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -36006,7 +35768,7 @@ Cancel a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -36066,7 +35828,7 @@ Cancel a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -36118,7 +35880,7 @@ Cancel a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -36310,19 +36072,8 @@ Cancel a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -36351,13 +36102,13 @@ Cancel a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -36365,14 +36116,8 @@ Cancel a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -36469,7 +36214,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -36583,7 +36328,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -37060,7 +36805,7 @@ Cancel a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -37120,7 +36865,7 @@ Cancel a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -37172,7 +36917,7 @@ Cancel a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -37364,19 +37109,8 @@ Cancel a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -37405,13 +37139,13 @@ Cancel a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -37419,14 +37153,8 @@ Cancel a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -37523,7 +37251,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -37637,7 +37365,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -37821,7 +37549,7 @@ Cancel a response - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -38714,7 +38442,7 @@ Cancel a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -38845,12 +38573,12 @@ Cancel a response - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -38960,16 +38688,16 @@ Cancel a response We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -39233,7 +38961,7 @@ Cancel a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -39293,7 +39021,7 @@ Cancel a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -39345,7 +39073,7 @@ Cancel a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -39537,19 +39265,8 @@ Cancel a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -39578,13 +39295,13 @@ Cancel a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -39592,14 +39309,8 @@ Cancel a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -39696,7 +39407,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -39810,7 +39521,7 @@ Cancel a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -39990,7 +39701,7 @@ Cancel a response - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -40007,7 +39718,7 @@ Cancel a response - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -40129,16 +39840,22 @@ Cancel a response - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -40158,7 +39875,7 @@ Cancel a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -40170,7 +39887,7 @@ Cancel a response - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -40194,7 +39911,7 @@ Cancel a response Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -40301,7 +40018,7 @@ Cancel a response - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -40309,7 +40026,7 @@ Cancel a response - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -40346,8 +40063,8 @@ Cancel a response Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -40355,7 +40072,7 @@ Cancel a response Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -40378,7 +40095,7 @@ Cancel a response - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -40407,7 +40124,7 @@ Cancel a response If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -40475,7 +40192,7 @@ Cancel a response - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -40497,14 +40214,13 @@ Cancel a response This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). ### Example ```http curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \ -X POST \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" ``` @@ -40540,8 +40256,6 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \ "type": "file_citation" } ], - "text": "text", - "type": "output_text", "logprobs": [ { "token": "token", @@ -40559,7 +40273,9 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \ } ] } - ] + ], + "text": "text", + "type": "output_text" } ], "role": "assistant", @@ -40748,7 +40464,9 @@ curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \ **post** `/responses/compact?beta=true` -Compact a response +Compact a conversation. Returns a compacted response object. + +Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced). ### Header Parameters @@ -40760,11 +40478,11 @@ Compact a response - `model: "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more or string` - Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` - Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -41018,7 +40736,7 @@ Compact a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -41189,7 +40907,7 @@ Compact a response The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -41293,17 +41011,7 @@ Compact a response - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -41319,6 +41027,16 @@ Compact a response - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -41377,7 +41095,7 @@ Compact a response - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -41453,7 +41171,7 @@ Compact a response - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -41814,7 +41532,7 @@ Compact a response - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -41918,7 +41636,7 @@ Compact a response - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -41993,7 +41711,7 @@ Compact a response The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -42001,7 +41719,7 @@ Compact a response A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -42031,7 +41749,7 @@ Compact a response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -42185,7 +41903,7 @@ Compact a response - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -42710,7 +42428,7 @@ Compact a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -42770,7 +42488,7 @@ Compact a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -42822,7 +42540,7 @@ Compact a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -43046,19 +42764,8 @@ Compact a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -43087,13 +42794,13 @@ Compact a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -43101,14 +42808,8 @@ Compact a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -43323,7 +43024,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -43437,7 +43138,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -43918,7 +43619,7 @@ Compact a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -43978,7 +43679,7 @@ Compact a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -44030,7 +43731,7 @@ Compact a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -44222,19 +43923,8 @@ Compact a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -44263,13 +43953,13 @@ Compact a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -44277,14 +43967,8 @@ Compact a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -44381,7 +44065,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -44495,7 +44179,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -44686,7 +44370,7 @@ Compact a response 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -44752,7 +44436,7 @@ Compact a response - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -45561,7 +45245,7 @@ Compact a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -45782,7 +45466,7 @@ Compact a response - `previous_response_id: optional string` - The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt_cache_key: optional string` @@ -45790,7 +45474,7 @@ Compact a response - `prompt_cache_options: optional object { mode, ttl }` - Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/docs/guides/prompt-caching) for current details. - `mode: optional "implicit" or "explicit"` @@ -45844,23 +45528,47 @@ Compact a response - `"response.compaction"` - - `output: array of BetaResponseOutputItem` + - `output: array of object { id, content, role, 4 more } or object { id, call_id, code, 3 more } or object { id, call_id, result, 3 more } or 28 more` - The compacted list of output items. This is a list of all user messages, followed by a single compaction item. + The compacted list of output items. - - `BetaResponseOutputMessage object { id, content, role, 4 more }` + - `Message object { id, content, role, 4 more }` - An output message from the model. + A message to or from the model. - `id: string` - The unique ID of the output message. + The unique ID of the message. - - `content: array of BetaResponseOutputText or BetaResponseOutputRefusal` + - `content: array of BetaResponseInputText or BetaResponseOutputText or object { text, type } or 7 more` - The content of the output message. + The content of the message + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `text: string` + + The text input to the model. + + - `type: "input_text"` + + The type of the input item. Always `input_text`. + + - `"input_text"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -45964,17 +45672,7 @@ Compact a response - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -45990,243 +45688,97 @@ Compact a response - `logprob: number` - - `BetaResponseOutputRefusal object { refusal, type }` - - A refusal from the model. - - - `refusal: string` - - The refusal explanation from the model. - - - `type: "refusal"` - - The type of the refusal. Always `refusal`. - - - `"refusal"` - - - `role: "assistant"` - - The role of the output message. Always `assistant`. - - - `"assistant"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + - `text: string` - - `"in_progress"` + The text output from the model. - - `"completed"` + - `type: "output_text"` - - `"incomplete"` + The type of the output text. Always `output_text`. - - `type: "message"` + - `"output_text"` - The type of the output message. Always `message`. + - `Text object { text, type }` - - `"message"` + A text content. - - `agent: optional object { agent_name }` + - `text: string` - The agent that produced this item. + - `type: "text"` - - `agent_name: string` + - `"text"` - The canonical name of the agent that produced this item. + - `SummaryText object { text, type }` - - `phase: optional "commentary" or "final_answer"` + A summary text from the model. - 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. + - `text: string` - - `"commentary"` + A summary of the reasoning output from the model so far. - - `"final_answer"` + - `type: "summary_text"` - - `FileSearchCall object { id, queries, status, 3 more }` + The type of the object. Always `summary_text`. - The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + - `"summary_text"` - - `id: string` + - `ReasoningText object { text, type }` - The unique ID of the file search tool call. + Reasoning text from the model. - - `queries: array of string` + - `text: string` - The queries used to search for files. + The reasoning text from the model. - - `status: "in_progress" or "searching" or "completed" or 2 more` + - `type: "reasoning_text"` - The status of the file search tool call. One of `in_progress`, - `searching`, `incomplete` or `failed`, + The type of the reasoning text. Always `reasoning_text`. - - `"in_progress"` + - `"reasoning_text"` - - `"searching"` + - `BetaResponseOutputRefusal object { refusal, type }` - - `"completed"` + A refusal from the model. - - `"incomplete"` + - `refusal: string` - - `"failed"` + The refusal explanation from the model. - - `type: "file_search_call"` + - `type: "refusal"` - The type of the file search tool call. Always `file_search_call`. + The type of the refusal. Always `refusal`. - - `"file_search_call"` + - `"refusal"` - - `agent: optional object { agent_name }` + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - The agent that produced this item. + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `agent_name: string` + - `detail: "low" or "high" or "auto" or "original"` - The canonical name of the agent that produced this item. + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - `results: optional array of object { attributes, file_id, filename, 2 more }` + - `"low"` - The results of the file search tool call. + - `"high"` - - `attributes: optional map[string or number or boolean]` + - `"auto"` - 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. + - `"original"` - - `string` + - `type: "input_image"` - - `number` + The type of the input item. Always `input_image`. - - `boolean` + - `"input_image"` - `file_id: optional string` - The unique ID of the file. - - - `filename: optional string` - - The name of the file. - - - `score: optional number` - - The relevance score of the file - a value between 0 and 1. - - - `text: optional string` - - The text that was retrieved from the file. - - - `FunctionCall object { arguments, call_id, name, 6 more }` - - A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `caller: optional object { type } or object { caller_id, type }` - - The execution context that produced this tool call. - - - `Direct object { type }` - - - `type: "direct"` - - - `"direct"` - - - `Program object { caller_id, type }` - - - `caller_id: string` - - The call ID of the program item that produced this tool call. - - - `type: "program"` - - - `"program"` - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput object { id, call_id, output, 5 more }` - - - `id: string` - - The unique ID of the function call tool output. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` - - The output from the function call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the function call. - - - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` - - Text, image, or file output of the function call. - - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `text: string` - - The text input to the model. - - - `type: "input_text"` + The ID of the file to be sent to the model. - The type of the input item. Always `input_text`. + - `image_url: optional string` - - `"input_text"` + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - `prompt_cache_breakpoint: optional object { mode }` @@ -46238,13 +45790,13 @@ Compact a response - `"explicit"` - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + A screenshot of a computer. - `detail: "low" or "high" or "auto" or "original"` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - `"low"` @@ -46254,19 +45806,19 @@ Compact a response - `"original"` - - `type: "input_image"` + - `file_id: string` - The type of the input item. Always `input_image`. + The identifier of an uploaded file that contains the screenshot. - - `"input_image"` + - `image_url: string` - - `file_id: optional string` + The URL of the screenshot image. - The ID of the file to be sent to the model. + - `type: "computer_screenshot"` - - `image_url: optional string` + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `"computer_screenshot"` - `prompt_cache_breakpoint: optional object { mode }` @@ -46324,202 +45876,209 @@ Compact a response - `"explicit"` - - `status: "in_progress" or "completed" or "incomplete"` + - `EncryptedContent object { encrypted_content, type }` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + Opaque encrypted content that Responses API decrypts inside trusted model execution. - - `"in_progress"` + - `encrypted_content: string` - - `"completed"` + Opaque encrypted content. - - `"incomplete"` + - `type: "encrypted_content"` - - `type: "function_call_output"` + The type of the input item. Always `encrypted_content`. - The type of the function tool call output. Always `function_call_output`. + - `"encrypted_content"` - - `"function_call_output"` + - `role: "unknown" or "user" or "assistant" or 5 more` - - `agent: optional object { agent_name }` + The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. - The agent that produced this item. + - `"unknown"` - - `agent_name: string` + - `"user"` - The canonical name of the agent that produced this item. + - `"assistant"` - - `caller: optional object { type } or object { caller_id, type }` + - `"system"` - The execution context that produced this tool call. + - `"critic"` - - `Direct object { type }` + - `"discriminator"` - - `type: "direct"` + - `"developer"` - The caller type. Always `direct`. + - `"tool"` - - `"direct"` + - `status: "in_progress" or "completed" or "incomplete"` - - `Program object { caller_id, type }` + The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - - `caller_id: string` + - `"in_progress"` - The call ID of the program item that produced this tool call. + - `"completed"` - - `type: "program"` + - `"incomplete"` - The caller type. Always `program`. + - `type: "message"` - - `"program"` + The type of the message. Always set to `message`. - - `created_by: optional string` + - `"message"` - The identifier of the actor that created the item. + - `agent: optional object { agent_name }` - - `AgentMessage object { id, author, content, 3 more }` + The agent that produced this item. - - `id: string` + - `agent_name: string` - The unique ID of the agent message. + The canonical name of the agent that produced this item. - - `author: string` + - `phase: optional "commentary" or "final_answer"` - The sending agent identity. + 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. - - `content: array of BetaResponseInputText or BetaResponseOutputText or object { text, type } or 7 more` + - `"commentary"` - Encrypted content sent between agents. + - `"final_answer"` - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + - `Program object { id, call_id, code, 3 more }` - A text input to the model. + - `id: string` - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + The unique ID of the program item. - A text output from the model. + - `call_id: string` - - `Text object { text, type }` + The stable call ID of the program item. - A text content. + - `code: string` - - `text: string` + The JavaScript source executed by programmatic tool calling. - - `type: "text"` + - `fingerprint: string` - - `"text"` + Opaque program replay fingerprint that must be round-tripped. - - `SummaryText object { text, type }` + - `type: "program"` - A summary text from the model. + The type of the item. Always `program`. - - `text: string` + - `"program"` - A summary of the reasoning output from the model so far. + - `agent: optional object { agent_name }` - - `type: "summary_text"` + The agent that produced this item. - The type of the object. Always `summary_text`. + - `agent_name: string` - - `"summary_text"` + The canonical name of the agent that produced this item. - - `ReasoningText object { text, type }` + - `ProgramOutput object { id, call_id, result, 3 more }` - Reasoning text from the model. + - `id: string` - - `text: string` + The unique ID of the program output item. - The reasoning text from the model. + - `call_id: string` - - `type: "reasoning_text"` + The call ID of the program item. - The type of the reasoning text. Always `reasoning_text`. + - `result: string` - - `"reasoning_text"` + The result produced by the program item. - - `BetaResponseOutputRefusal object { refusal, type }` + - `status: "completed" or "incomplete"` - A refusal from the model. + The terminal status of the program output item. - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + - `"completed"` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + - `"incomplete"` - - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` + - `type: "program_output"` - A screenshot of a computer. + The type of the item. Always `program_output`. - - `detail: "low" or "high" or "auto" or "original"` + - `"program_output"` - The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + - `agent: optional object { agent_name }` - - `"low"` + The agent that produced this item. - - `"high"` + - `agent_name: string` - - `"auto"` + The canonical name of the agent that produced this item. - - `"original"` + - `FunctionCall object { arguments, call_id, name, 6 more }` - - `file_id: string` + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. - The identifier of an uploaded file that contains the screenshot. + - `arguments: string` - - `image_url: string` + A JSON string of the arguments to pass to the function. - The URL of the screenshot image. + - `call_id: string` - - `type: "computer_screenshot"` + The unique ID of the function tool call generated by the model. - Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + - `name: string` - - `"computer_screenshot"` + The name of the function to run. - - `prompt_cache_breakpoint: optional object { mode }` + - `type: "function_call"` - 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. + The type of the function tool call. Always `function_call`. - - `mode: "explicit"` + - `"function_call"` - The breakpoint mode. Always `explicit`. + - `id: optional string` - - `"explicit"` + The unique ID of the function tool call. - - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + - `agent: optional object { agent_name }` - A file input to the model. + The agent that produced this item. - - `EncryptedContent object { encrypted_content, type }` + - `agent_name: string` - Opaque encrypted content that Responses API decrypts inside trusted model execution. + The canonical name of the agent that produced this item. - - `encrypted_content: string` + - `caller: optional object { type } or object { caller_id, type }` - Opaque encrypted content. + The execution context that produced this tool call. - - `type: "encrypted_content"` + - `Direct object { type }` - The type of the input item. Always `encrypted_content`. + - `type: "direct"` - - `"encrypted_content"` + - `"direct"` - - `recipient: string` + - `Program object { caller_id, type }` - The destination agent identity. + - `caller_id: string` - - `type: "agent_message"` + The call ID of the program item that produced this tool call. - The type of the item. Always `agent_message`. + - `type: "program"` - - `"agent_message"` + - `"program"` - - `agent: optional object { agent_name }` + - `namespace: optional string` - The agent that produced this item. + The namespace of the function to run. - - `agent_name: string` + - `status: optional "in_progress" or "completed" or "incomplete"` - The canonical name of the agent that produced this item. + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` - `MultiAgentCall object { id, action, arguments, 3 more }` @@ -46599,6 +46158,8 @@ Compact a response The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -46607,8 +46168,6 @@ Compact a response The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -46623,1158 +46182,550 @@ Compact a response The canonical name of the agent that produced this item. - - `WebSearchCall object { id, action, status, 2 more }` - - The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + - `ToolSearchCall object { id, arguments, call_id, 5 more }` - `id: string` - The unique ID of the web search tool call. - - - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }` - - An object describing the specific action taken in this web search call. - Includes details on how the model used the web (search, open_page, find_in_page). - - - `Search object { type, queries, query, sources }` + The unique ID of the tool search call item. - Action type "search" - Performs a web search query. + - `arguments: unknown` - - `type: "search"` + Arguments used for the tool search call. - The action type. + - `call_id: string` - - `"search"` + The unique ID of the tool search call generated by the model. - - `queries: optional array of string` + - `execution: "server" or "client"` - The search queries. + Whether tool search was executed by the server or by the client. - - `query: optional string` + - `"server"` - The search query. + - `"client"` - - `sources: optional array of object { type, url }` + - `status: "in_progress" or "completed" or "incomplete"` - The sources used in the search. + The status of the tool search call item that was recorded. - - `type: "url"` + - `"in_progress"` - The type of source. Always `url`. + - `"completed"` - - `"url"` + - `"incomplete"` - - `url: string` + - `type: "tool_search_call"` - The URL of the source. + The type of the item. Always `tool_search_call`. - - `OpenPage object { type, url }` + - `"tool_search_call"` - Action type "open_page" - Opens a specific URL from search results. + - `agent: optional object { agent_name }` - - `type: "open_page"` + The agent that produced this item. - The action type. + - `agent_name: string` - - `"open_page"` + The canonical name of the agent that produced this item. - - `url: optional string` + - `created_by: optional string` - The URL opened by the model. + The identifier of the actor that created the item. - - `FindInPage object { pattern, type, url }` + - `ToolSearchOutput object { id, call_id, execution, 5 more }` - Action type "find_in_page": Searches for a pattern within a loaded page. + - `id: string` - - `pattern: string` + The unique ID of the tool search output item. - The pattern or text to search for within the page. + - `call_id: string` - - `type: "find_in_page"` + The unique ID of the tool search call generated by the model. - The action type. + - `execution: "server" or "client"` - - `"find_in_page"` + Whether tool search was executed by the server or by the client. - - `url: string` + - `"server"` - The URL of the page searched for the pattern. + - `"client"` - - `status: "in_progress" or "searching" or "completed" or "failed"` + - `status: "in_progress" or "completed" or "incomplete"` - The status of the web search tool call. + The status of the tool search output item that was recorded. - `"in_progress"` - - `"searching"` - - `"completed"` - - `"failed"` + - `"incomplete"` - - `type: "web_search_call"` + - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` - The type of the web search tool call. Always `web_search_call`. + The loaded tool definitions returned by tool search. - - `"web_search_call"` + - `Function object { name, parameters, strict, 5 more }` - - `agent: optional object { agent_name }` + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). - The agent that produced this item. + - `name: string` - - `agent_name: string` + The name of the function to call. - The canonical name of the agent that produced this item. + - `parameters: map[unknown]` - - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` + A JSON schema object describing the parameters of the function. - A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + - `strict: boolean` - - `id: string` + Whether strict parameter validation is enforced for this function tool. - The unique ID of the computer call. + - `type: "function"` - - `call_id: string` + The type of the function tool. Always `function`. - An identifier used when responding to the tool call with output. + - `"function"` - - `pending_safety_checks: array of object { id, code, message }` + - `allowed_callers: optional array of "direct" or "programmatic"` - The pending safety checks for the computer call. + The tool invocation context(s). - - `id: string` + - `"direct"` - The ID of the pending safety check. + - `"programmatic"` - - `code: optional string` + - `defer_loading: optional boolean` - The type of the pending safety check. + Whether this function is deferred and loaded via tool search. - - `message: optional string` + - `description: optional string` - Details about the pending safety check. + A description of the function. Used by the model to determine whether or not to call the function. - - `status: "in_progress" or "completed" or "incomplete"` + - `output_schema: optional map[unknown]` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + A JSON schema object describing the JSON value encoded in string outputs for this function. - - `"in_progress"` + - `FileSearch object { type, vector_store_ids, filters, 2 more }` - - `"completed"` + A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). - - `"incomplete"` + - `type: "file_search"` - - `type: "computer_call"` + The type of the file search tool. Always `file_search`. - The type of the computer call. Always `computer_call`. + - `"file_search"` - - `"computer_call"` + - `vector_store_ids: array of string` - - `action: optional BetaComputerAction` + The IDs of the vector stores to search. - A click action. + - `filters: optional object { key, type, value } or object { filters, type }` - - `Click object { button, type, x, 2 more }` + A filter to apply. - A click action. + - `ComparisonFilter object { key, type, value }` - - `button: "left" or "right" or "wheel" or 2 more` + A filter used to compare a specified attribute key to a given value using a defined comparison operation. - Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + - `key: string` - - `"left"` + The key to compare against the value. - - `"right"` + - `type: "eq" or "ne" or "gt" or 5 more` - - `"wheel"` + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - `"back"` + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in - - `"forward"` + - `"eq"` - - `type: "click"` + - `"ne"` - Specifies the event type. For a click action, this property is always `click`. + - `"gt"` - - `"click"` + - `"gte"` - - `x: number` + - `"lt"` - The x-coordinate where the click occurred. + - `"lte"` - - `y: number` + - `"in"` - The y-coordinate where the click occurred. + - `"nin"` - - `keys: optional array of string` + - `value: string or number or boolean or array of string or number` - The keys being held while clicking. + The value to compare against the attribute key; supports string, number, or boolean types. - - `DoubleClick object { keys, type, x, y }` + - `string` - A double click action. + - `number` - - `keys: array of string` + - `boolean` - The keys being held while double-clicking. + - `array of string or number` - - `type: "double_click"` + - `string` - Specifies the event type. For a double click action, this property is always set to `double_click`. + - `number` - - `"double_click"` + - `CompoundFilter object { filters, type }` - - `x: number` + Combine multiple filters using `and` or `or`. - The x-coordinate where the double click occurred. + - `filters: array of object { key, type, value } or unknown` - - `y: number` + Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - The y-coordinate where the double click occurred. + - `ComparisonFilter object { key, type, value }` - - `Drag object { path, type, keys }` + A filter used to compare a specified attribute key to a given value using a defined comparison operation. - A drag action. + - `key: string` - - `path: array of object { x, y }` + The key to compare against the value. - An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + - `type: "eq" or "ne" or "gt" or 5 more` - ``` - [ - { x: 100, y: 200 }, - { x: 200, y: 300 } - ] - ``` + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - `x: number` + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in - The x-coordinate. + - `"eq"` - - `y: number` + - `"ne"` - The y-coordinate. + - `"gt"` - - `type: "drag"` + - `"gte"` - Specifies the event type. For a drag action, this property is always set to `drag`. + - `"lt"` - - `"drag"` + - `"lte"` - - `keys: optional array of string` + - `"in"` - The keys being held while dragging the mouse. + - `"nin"` - - `Keypress object { keys, type }` + - `value: string or number or boolean or array of string or number` - A collection of keypresses the model would like to perform. + The value to compare against the attribute key; supports string, number, or boolean types. - - `keys: array of string` + - `string` - The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + - `number` - - `type: "keypress"` + - `boolean` - Specifies the event type. For a keypress action, this property is always set to `keypress`. + - `array of string or number` - - `"keypress"` + - `string` - - `Move object { type, x, y, keys }` + - `number` - A mouse move action. + - `unknown` - - `type: "move"` + - `type: "and" or "or"` - Specifies the event type. For a move action, this property is always set to `move`. + Type of operation: `and` or `or`. - - `"move"` + - `"and"` - - `x: number` + - `"or"` - The x-coordinate to move to. + - `max_num_results: optional number` - - `y: number` + The maximum number of results to return. This number should be between 1 and 50 inclusive. - The y-coordinate to move to. + - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - `keys: optional array of string` + Ranking options for search. - The keys being held while moving the mouse. + - `hybrid_search: optional object { embedding_weight, text_weight }` - - `Screenshot object { type }` + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - A screenshot action. + - `embedding_weight: number` - - `type: "screenshot"` + The weight of the embedding in the reciprocal ranking fusion. - Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + - `text_weight: number` - - `"screenshot"` + The weight of the text in the reciprocal ranking fusion. - - `Scroll object { scroll_x, scroll_y, type, 3 more }` + - `ranker: optional "auto" or "default-2024-11-15"` - A scroll action. + The ranker to use for the file search. - - `scroll_x: number` + - `"auto"` - The horizontal scroll distance. + - `"default-2024-11-15"` - - `scroll_y: number` + - `score_threshold: optional number` - The vertical scroll distance. + The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - `type: "scroll"` + - `Computer object { type }` - Specifies the event type. For a scroll action, this property is always set to `scroll`. + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - `"scroll"` + - `type: "computer"` - - `x: number` + The type of the computer tool. Always `computer`. - The x-coordinate where the scroll occurred. + - `"computer"` - - `y: number` + - `ComputerUsePreview object { display_height, display_width, environment, type }` - The y-coordinate where the scroll occurred. + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - `keys: optional array of string` + - `display_height: number` - The keys being held while scrolling. + The height of the computer display. - - `Type object { text, type }` + - `display_width: number` - An action to type in text. + The width of the computer display. - - `text: string` + - `environment: "windows" or "mac" or "linux" or 2 more` - The text to type. + The type of computer environment to control. - - `type: "type"` + - `"windows"` - Specifies the event type. For a type action, this property is always set to `type`. + - `"mac"` - - `"type"` + - `"linux"` - - `Wait object { type }` + - `"ubuntu"` - A wait action. + - `"browser"` - - `type: "wait"` + - `type: "computer_use_preview"` - Specifies the event type. For a wait action, this property is always set to `wait`. + The type of the computer use tool. Always `computer_use_preview`. - - `"wait"` + - `"computer_use_preview"` - - `actions: optional BetaComputerActionList` + - `WebSearch object { type, filters, search_context_size, user_location }` - Flattened batched actions for `computer_use`. Each action includes an - `type` discriminator and action-specific fields. + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](/docs/guides/tools-web-search). - - `Click object { button, type, x, 2 more }` + - `type: "web_search" or "web_search_2025_08_26"` - A click action. + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - `DoubleClick object { keys, type, x, y }` + - `"web_search"` - A double click action. + - `"web_search_2025_08_26"` - - `Drag object { path, type, keys }` + - `filters: optional object { allowed_domains }` - A drag action. + Filters for the search. - - `Keypress object { keys, type }` + - `allowed_domains: optional array of string` - A collection of keypresses the model would like to perform. + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. - - `Move object { type, x, y, keys }` + Example: `["pubmed.ncbi.nlm.nih.gov"]` - A mouse move action. + - `search_context_size: optional "low" or "medium" or "high"` - - `Screenshot object { type }` + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - A screenshot action. + - `"low"` - - `Scroll object { scroll_x, scroll_y, type, 3 more }` + - `"medium"` - A scroll action. + - `"high"` - - `Type object { text, type }` + - `user_location: optional object { city, country, region, 2 more }` - An action to type in text. + The approximate location of the user. - - `Wait object { type }` + - `city: optional string` - A wait action. + Free text input for the city of the user, e.g. `San Francisco`. - - `agent: optional object { agent_name }` + - `country: optional string` - The agent that produced this item. + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - `agent_name: string` + - `region: optional string` - The canonical name of the agent that produced this item. + Free text input for the region of the user, e.g. `California`. - - `ComputerCallOutput object { id, call_id, output, 5 more }` + - `timezone: optional string` - - `id: string` + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - The unique ID of the computer call tool output. + - `type: optional "approximate"` - - `call_id: string` + The type of location approximation. Always `approximate`. - The ID of the computer tool call that produced the output. + - `"approximate"` - - `output: BetaResponseComputerToolCallOutputScreenshot` + - `Mcp object { server_label, type, allowed_callers, 9 more }` - A computer screenshot image used with the computer use tool. + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - `type: "computer_screenshot"` + - `server_label: string` - Specifies the event type. For a computer screenshot, this property is - always set to `computer_screenshot`. + A label for this MCP server, used to identify it in tool calls. - - `"computer_screenshot"` + - `type: "mcp"` - - `file_id: optional string` + The type of the MCP tool. Always `mcp`. - The identifier of an uploaded file that contains the screenshot. + - `"mcp"` - - `image_url: optional string` + - `allowed_callers: optional array of "direct" or "programmatic"` - The URL of the screenshot image. + The tool invocation context(s). - - `status: "completed" or "incomplete" or "failed" or "in_progress"` + - `"direct"` - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + - `"programmatic"` - - `"completed"` + - `allowed_tools: optional array of string or object { read_only, tool_names }` - - `"incomplete"` + List of allowed tool names or a filter object. - - `"failed"` + - `McpAllowedTools = array of string` - - `"in_progress"` + A string array of allowed tool names - - `type: "computer_call_output"` + - `McpToolFilter object { read_only, tool_names }` - The type of the computer tool call output. Always `computer_call_output`. + A filter object to specify which tools are allowed. - - `"computer_call_output"` + - `read_only: optional boolean` - - `acknowledged_safety_checks: optional array of object { id, code, message }` + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. - The safety checks reported by the API that have been acknowledged by the - developer. + - `tool_names: optional array of string` - - `id: string` + List of allowed tool names. - The ID of the pending safety check. + - `authorization: optional string` - - `code: optional string` + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. - The type of the pending safety check. + - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` - - `message: optional string` + Identifier for service connectors, like those available in ChatGPT. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). - Details about the pending safety check. + Currently supported `connector_id` values are: - - `agent: optional object { agent_name }` + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` - The agent that produced this item. + - `"connector_dropbox"` - - `agent_name: string` + - `"connector_gmail"` - The canonical name of the agent that produced this item. + - `"connector_googlecalendar"` - - `created_by: optional string` + - `"connector_googledrive"` - The identifier of the actor that created the item. + - `"connector_microsoftteams"` - - `Reasoning object { id, summary, type, 4 more }` + - `"connector_outlookcalendar"` - 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](https://platform.openai.com/docs/guides/conversation-state). + - `"connector_outlookemail"` - - `id: string` + - `"connector_sharepoint"` - The unique identifier of the reasoning content. + - `defer_loading: optional boolean` - - `summary: array of object { text, type }` + Whether this MCP tool is deferred and discovered via tool search. - Reasoning summary content. + - `headers: optional map[string]` - - `text: string` + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. - A summary of the reasoning output from the model so far. + - `require_approval: optional object { always, never } or "always" or "never"` - - `type: "summary_text"` + Specify which of the MCP server's tools require approval. - The type of the object. Always `summary_text`. + - `McpToolApprovalFilter object { always, never }` - - `"summary_text"` + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. - - `type: "reasoning"` + - `always: optional object { read_only, tool_names }` - The type of the object. Always `reasoning`. + A filter object to specify which tools are allowed. - - `"reasoning"` + - `read_only: optional boolean` - - `agent: optional object { agent_name }` + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. - The agent that produced this item. + - `tool_names: optional array of string` - - `agent_name: string` + List of allowed tool names. - The canonical name of the agent that produced this item. + - `never: optional object { read_only, tool_names }` - - `content: optional array of object { text, type }` + A filter object to specify which tools are allowed. - Reasoning text content. + - `read_only: optional boolean` - - `text: string` + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. - The reasoning text from the model. + - `tool_names: optional array of string` - - `type: "reasoning_text"` + List of allowed tool names. - The type of the reasoning text. Always `reasoning_text`. + - `McpToolApprovalSetting = "always" or "never"` - - `"reasoning_text"` + Specify a single approval policy for all tools. One of `always` or + `never`. When set to `always`, all tools will require approval. When + set to `never`, all tools will not require approval. - - `encrypted_content: optional string` + - `"always"` - The encrypted content of the reasoning item - populated when a response is - generated with `reasoning.encrypted_content` in the `include` parameter. + - `"never"` - - `status: optional "in_progress" or "completed" or "incomplete"` + - `server_description: optional string` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `Program object { id, call_id, code, 3 more }` - - - `id: string` - - The unique ID of the program item. - - - `call_id: string` - - The stable call ID of the program item. - - - `code: string` - - The JavaScript source executed by programmatic tool calling. - - - `fingerprint: string` - - Opaque program replay fingerprint that must be round-tripped. - - - `type: "program"` - - The type of the item. Always `program`. - - - `"program"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `ProgramOutput object { id, call_id, result, 3 more }` - - - `id: string` - - The unique ID of the program output item. - - - `call_id: string` - - The call ID of the program item. - - - `result: string` - - The result produced by the program item. - - - `status: "completed" or "incomplete"` - - The terminal status of the program output item. - - - `"completed"` - - - `"incomplete"` - - - `type: "program_output"` - - The type of the item. Always `program_output`. - - - `"program_output"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `ToolSearchCall object { id, arguments, call_id, 5 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput object { id, call_id, execution, 5 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` - - The loaded tool definitions returned by tool search. - - - `Function object { name, parameters, strict, 5 more }` - - Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). - - - `name: string` - - The name of the function to call. - - - `parameters: map[unknown]` - - A JSON schema object describing the parameters of the function. - - - `strict: boolean` - - Whether strict parameter validation is enforced for this function tool. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `allowed_callers: optional array of "direct" or "programmatic"` - - The tool invocation context(s). - - - `"direct"` - - - `"programmatic"` - - - `defer_loading: optional boolean` - - Whether this function is deferred and loaded via tool search. - - - `description: optional string` - - A description of the function. Used by the model to determine whether or not to call the function. - - - `output_schema: optional map[unknown]` - - A JSON schema object describing the JSON value encoded in string outputs for this function. - - - `FileSearch object { type, vector_store_ids, filters, 2 more }` - - A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). - - - `type: "file_search"` - - The type of the file search tool. Always `file_search`. - - - `"file_search"` - - - `vector_store_ids: array of string` - - The IDs of the vector stores to search. - - - `filters: optional object { key, type, value } or object { filters, type }` - - A filter to apply. - - - `ComparisonFilter object { key, type, value }` - - A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `CompoundFilter object { filters, type }` - - Combine multiple filters using `and` or `or`. - - - `filters: array of object { key, type, value } or unknown` - - Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - - `ComparisonFilter object { key, type, value }` - - A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp object { server_label, type, allowed_callers, 9 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_callers: optional array of "direct" or "programmatic"` - - The tool invocation context(s). - - - `"direct"` - - - `"programmatic"` - - - `allowed_tools: optional array of string or object { read_only, tool_names }` - - List of allowed tool names or a filter object. - - - `McpAllowedTools = array of string` - - A string array of allowed tool names - - - `McpToolFilter object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `authorization: optional string` - - An OAuth access token that can be used with a remote MCP server, either - with a custom MCP server URL or a service connector. Your application - must handle the OAuth authorization flow and provide the token here. - - - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` - - Identifier for service connectors, like those available in ChatGPT. One of - `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. + Optional description of the MCP server, used to provide more context. - `server_url: optional string` @@ -47910,19 +46861,8 @@ Compact a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -47951,13 +46891,13 @@ Compact a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -47965,14 +46905,8 @@ Compact a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -48187,7 +47121,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -48301,7 +47235,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -48778,7 +47712,7 @@ Compact a response - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -48838,7 +47772,7 @@ Compact a response - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -48890,7 +47824,7 @@ Compact a response Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -49082,19 +48016,8 @@ Compact a response - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -49123,13 +48046,13 @@ Compact a response Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -49137,14 +48060,8 @@ Compact a response - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -49241,7 +48158,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -49355,7 +48272,7 @@ Compact a response - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -49537,23 +48454,141 @@ Compact a response The canonical name of the agent that produced this item. - - `Compaction object { id, encrypted_content, type, 2 more }` - - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + - `AgentMessage object { id, author, content, 3 more }` - `id: string` - The unique ID of the compaction item. + The unique ID of the agent message. + + - `author: string` + + The sending agent identity. + + - `content: array of BetaResponseInputText or BetaResponseOutputText or object { text, type } or 7 more` + + Encrypted content sent between agents. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseOutputText object { annotations, logprobs, text, type }` + + A text output from the model. + + - `Text object { text, type }` + + A text content. + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `SummaryText object { text, type }` + + A summary text from the model. + + - `text: string` + + A summary of the reasoning output from the model so far. + + - `type: "summary_text"` + + The type of the object. Always `summary_text`. + + - `"summary_text"` + + - `ReasoningText object { text, type }` + + Reasoning text from the model. + + - `text: string` + + The reasoning text from the model. + + - `type: "reasoning_text"` + + The type of the reasoning text. Always `reasoning_text`. + + - `"reasoning_text"` + + - `BetaResponseOutputRefusal object { refusal, type }` + + A refusal from the model. + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` + + A screenshot of a computer. + + - `detail: "low" or "high" or "auto" or "original"` + + The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `file_id: string` + + The identifier of an uploaded file that contains the screenshot. + + - `image_url: string` + + The URL of the screenshot image. + + - `type: "computer_screenshot"` + + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + + - `"computer_screenshot"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `EncryptedContent object { encrypted_content, type }` + + Opaque encrypted content that Responses API decrypts inside trusted model execution. - `encrypted_content: string` - The encrypted content that was produced by compaction. + Opaque encrypted content. - - `type: "compaction"` + - `type: "encrypted_content"` - The type of the item. Always `compaction`. + The type of the input item. Always `encrypted_content`. - - `"compaction"` + - `"encrypted_content"` + + - `recipient: string` + + The destination agent identity. + + - `type: "agent_message"` + + The type of the item. Always `agent_message`. + + - `"agent_message"` - `agent: optional object { agent_name }` @@ -49563,9 +48598,272 @@ Compact a response The canonical name of the agent that produced this item. - - `created_by: optional string` + - `FunctionCallOutput object { call_id, output, type, 4 more }` - The identifier of the actor that created the item. + The output of a function tool call. + + - `call_id: string` + + The unique ID of the function tool call generated by the model. + + - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + + The output from the function call generated by your code. + Can be a string or an list of output content. + + - `StringOutput = string` + + A string of the output of the function call. + + - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + + Text, image, or file output of the function call. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `type: "function_call_output"` + + The type of the function tool call output. Always `function_call_output`. + + - `"function_call_output"` + + - `id: optional string` + + The unique ID of the function tool call output. Populated when this item + is returned via API. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. + + - `Direct object { type }` + + - `type: "direct"` + + The caller type. Always `direct`. + + - `"direct"` + + - `Program object { caller_id, type }` + + - `caller_id: string` + + The call ID of the program item that produced this tool call. + + - `type: "program"` + + The caller type. Always `program`. + + - `"program"` + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `FileSearchCall object { id, queries, status, 3 more }` + + The results of a file search tool call. See the + [file search guide](/docs/guides/tools-file-search) for more information. + + - `id: string` + + The unique ID of the file search tool call. + + - `queries: array of string` + + The queries used to search for files. + + - `status: "in_progress" or "searching" or "completed" or 2 more` + + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, + + - `"in_progress"` + + - `"searching"` + + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `type: "file_search_call"` + + The type of the file search tool call. Always `file_search_call`. + + - `"file_search_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `results: optional array of object { attributes, file_id, filename, 2 more }` + + The results of the file search tool call. + + - `attributes: optional map[string or number or boolean]` + + 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. + + - `string` + + - `number` + + - `boolean` + + - `file_id: optional string` + + The unique ID of the file. + + - `filename: optional string` + + The name of the file. + + - `score: optional number` + + The relevance score of the file - a value between 0 and 1. + + - `text: optional string` + + The text that was retrieved from the file. + + - `WebSearchCall object { id, action, status, 2 more }` + + The results of a web search tool call. See the + [web search guide](/docs/guides/tools-web-search) for more information. + + - `id: string` + + The unique ID of the web search tool call. + + - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }` + + An object describing the specific action taken in this web search call. + Includes details on how the model used the web (search, open_page, find_in_page). + + - `Search object { type, queries, query, sources }` + + Action type "search" - Performs a web search query. + + - `type: "search"` + + The action type. + + - `"search"` + + - `queries: optional array of string` + + The search queries. + + - `query: optional string` + + The search query. + + - `sources: optional array of object { type, url }` + + The sources used in the search. + + - `type: "url"` + + The type of source. Always `url`. + + - `"url"` + + - `url: string` + + The URL of the source. + + - `OpenPage object { type, url }` + + Action type "open_page" - Opens a specific URL from search results. + + - `type: "open_page"` + + The action type. + + - `"open_page"` + + - `url: optional string` + + The URL opened by the model. + + - `FindInPage object { pattern, type, url }` + + Action type "find_in_page": Searches for a pattern within a loaded page. + + - `pattern: string` + + The pattern or text to search for within the page. + + - `type: "find_in_page"` + + The action type. + + - `"find_in_page"` + + - `url: string` + + The URL of the page searched for the pattern. + + - `status: "in_progress" or "searching" or "completed" or "failed"` + + The status of the web search tool call. + + - `"in_progress"` + + - `"searching"` + + - `"completed"` + + - `"failed"` + + - `type: "web_search_call"` + + The type of the web search tool call. Always `web_search_call`. + + - `"web_search_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. - `ImageGenerationCall object { id, result, status, 2 more }` @@ -49605,6 +48903,472 @@ Compact a response The canonical name of the agent that produced this item. + - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` + + A tool call to a computer use tool. See the + [computer use guide](/docs/guides/tools-computer-use) for more information. + + - `id: string` + + The unique ID of the computer call. + + - `call_id: string` + + An identifier used when responding to the tool call with output. + + - `pending_safety_checks: array of object { id, code, message }` + + The pending safety checks for the computer call. + + - `id: string` + + The ID of the pending safety check. + + - `code: optional string` + + The type of the pending safety check. + + - `message: optional string` + + Details about the pending safety check. + + - `status: "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: "computer_call"` + + The type of the computer call. Always `computer_call`. + + - `"computer_call"` + + - `action: optional BetaComputerAction` + + A click action. + + - `Click object { button, type, x, 2 more }` + + A click action. + + - `button: "left" or "right" or "wheel" or 2 more` + + Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + + - `"left"` + + - `"right"` + + - `"wheel"` + + - `"back"` + + - `"forward"` + + - `type: "click"` + + Specifies the event type. For a click action, this property is always `click`. + + - `"click"` + + - `x: number` + + The x-coordinate where the click occurred. + + - `y: number` + + The y-coordinate where the click occurred. + + - `keys: optional array of string` + + The keys being held while clicking. + + - `DoubleClick object { keys, type, x, y }` + + A double click action. + + - `keys: array of string` + + The keys being held while double-clicking. + + - `type: "double_click"` + + Specifies the event type. For a double click action, this property is always set to `double_click`. + + - `"double_click"` + + - `x: number` + + The x-coordinate where the double click occurred. + + - `y: number` + + The y-coordinate where the double click occurred. + + - `Drag object { path, type, keys }` + + A drag action. + + - `path: array of object { x, y }` + + An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + + ``` + [ + { x: 100, y: 200 }, + { x: 200, y: 300 } + ] + ``` + + - `x: number` + + The x-coordinate. + + - `y: number` + + The y-coordinate. + + - `type: "drag"` + + Specifies the event type. For a drag action, this property is always set to `drag`. + + - `"drag"` + + - `keys: optional array of string` + + The keys being held while dragging the mouse. + + - `Keypress object { keys, type }` + + A collection of keypresses the model would like to perform. + + - `keys: array of string` + + The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + + - `type: "keypress"` + + Specifies the event type. For a keypress action, this property is always set to `keypress`. + + - `"keypress"` + + - `Move object { type, x, y, keys }` + + A mouse move action. + + - `type: "move"` + + Specifies the event type. For a move action, this property is always set to `move`. + + - `"move"` + + - `x: number` + + The x-coordinate to move to. + + - `y: number` + + The y-coordinate to move to. + + - `keys: optional array of string` + + The keys being held while moving the mouse. + + - `Screenshot object { type }` + + A screenshot action. + + - `type: "screenshot"` + + Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + + - `"screenshot"` + + - `Scroll object { scroll_x, scroll_y, type, 3 more }` + + A scroll action. + + - `scroll_x: number` + + The horizontal scroll distance. + + - `scroll_y: number` + + The vertical scroll distance. + + - `type: "scroll"` + + Specifies the event type. For a scroll action, this property is always set to `scroll`. + + - `"scroll"` + + - `x: number` + + The x-coordinate where the scroll occurred. + + - `y: number` + + The y-coordinate where the scroll occurred. + + - `keys: optional array of string` + + The keys being held while scrolling. + + - `Type object { text, type }` + + An action to type in text. + + - `text: string` + + The text to type. + + - `type: "type"` + + Specifies the event type. For a type action, this property is always set to `type`. + + - `"type"` + + - `Wait object { type }` + + A wait action. + + - `type: "wait"` + + Specifies the event type. For a wait action, this property is always set to `wait`. + + - `"wait"` + + - `actions: optional BetaComputerActionList` + + Flattened batched actions for `computer_use`. Each action includes an + `type` discriminator and action-specific fields. + + - `Click object { button, type, x, 2 more }` + + A click action. + + - `DoubleClick object { keys, type, x, y }` + + A double click action. + + - `Drag object { path, type, keys }` + + A drag action. + + - `Keypress object { keys, type }` + + A collection of keypresses the model would like to perform. + + - `Move object { type, x, y, keys }` + + A mouse move action. + + - `Screenshot object { type }` + + A screenshot action. + + - `Scroll object { scroll_x, scroll_y, type, 3 more }` + + A scroll action. + + - `Type object { text, type }` + + An action to type in text. + + - `Wait object { type }` + + A wait action. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `ComputerCallOutput object { id, call_id, output, 5 more }` + + - `id: string` + + The unique ID of the computer call tool output. + + - `call_id: string` + + The ID of the computer tool call that produced the output. + + - `output: BetaResponseComputerToolCallOutputScreenshot` + + A computer screenshot image used with the computer use tool. + + - `type: "computer_screenshot"` + + Specifies the event type. For a computer screenshot, this property is + always set to `computer_screenshot`. + + - `"computer_screenshot"` + + - `file_id: optional string` + + The identifier of an uploaded file that contains the screenshot. + + - `image_url: optional string` + + The URL of the screenshot image. + + - `status: "completed" or "incomplete" or "failed" or "in_progress"` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `"in_progress"` + + - `type: "computer_call_output"` + + The type of the computer tool call output. Always `computer_call_output`. + + - `"computer_call_output"` + + - `acknowledged_safety_checks: optional array of object { id, code, message }` + + The safety checks reported by the API that have been acknowledged by the + developer. + + - `id: string` + + The ID of the pending safety check. + + - `code: optional string` + + The type of the pending safety check. + + - `message: optional string` + + Details about the pending safety check. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `created_by: optional string` + + The identifier of the actor that created the item. + + - `Reasoning object { 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](/docs/guides/conversation-state). + + - `id: string` + + The unique identifier of the reasoning content. + + - `summary: array of object { text, type }` + + Reasoning summary content. + + - `text: string` + + A summary of the reasoning output from the model so far. + + - `type: "summary_text"` + + The type of the object. Always `summary_text`. + + - `"summary_text"` + + - `type: "reasoning"` + + The type of the object. Always `reasoning`. + + - `"reasoning"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `content: optional array of object { text, type }` + + Reasoning text content. + + - `text: string` + + The reasoning text from the model. + + - `type: "reasoning_text"` + + The type of the reasoning text. Always `reasoning_text`. + + - `"reasoning_text"` + + - `encrypted_content: optional string` + + The encrypted content of the reasoning item - populated when a response is + generated with `reasoning.encrypted_content` in the `include` parameter. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `Compaction object { id, encrypted_content, type, 2 more }` + + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + + - `id: string` + + The unique ID of the compaction item. + + - `encrypted_content: string` + + The encrypted content that was produced by compaction. + + - `type: "compaction"` + + The type of the item. Always `compaction`. + + - `"compaction"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `created_by: optional string` + + The identifier of the actor that created the item. + - `CodeInterpreterCall object { id, code, container_id, 4 more }` A tool call to run code. @@ -50166,67 +49930,6 @@ Compact a response Optional textual output returned by the apply patch tool. - - `McpCall object { id, arguments, name, 7 more }` - - An invocation of a tool on an MCP server. - - - `id: string` - - The unique ID of the tool call. - - - `arguments: string` - - A JSON string of the arguments passed to the tool. - - - `name: string` - - The name of the tool that was run. - - - `server_label: string` - - The label of the MCP server running the tool. - - - `type: "mcp_call"` - - The type of the item. Always `mcp_call`. - - - `"mcp_call"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `approval_request_id: optional string` - - Unique identifier for the MCP tool call approval request. - Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. - - - `error: optional string` - - The error from the tool call, if any. - - - `output: optional string` - - The output from the tool call. - - - `status: optional "in_progress" or "completed" or "incomplete" or 2 more` - - The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `"calling"` - - - `"failed"` - - `McpListTools object { id, server_label, tools, 3 more }` A list of tools available on an MCP server. @@ -50345,6 +50048,67 @@ Compact a response Optional reason for the decision. + - `McpCall object { id, arguments, name, 7 more }` + + An invocation of a tool on an MCP server. + + - `id: string` + + The unique ID of the tool call. + + - `arguments: string` + + A JSON string of the arguments passed to the tool. + + - `name: string` + + The name of the tool that was run. + + - `server_label: string` + + The label of the MCP server running the tool. + + - `type: "mcp_call"` + + The type of the item. Always `mcp_call`. + + - `"mcp_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `approval_request_id: optional string` + + Unique identifier for the MCP tool call approval request. + Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. + + - `error: optional string` + + The error from the tool call, if any. + + - `output: optional string` + + The output from the tool call. + + - `status: optional "in_progress" or "completed" or "incomplete" or 2 more` + + The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `"calling"` + + - `"failed"` + - `CustomToolCall object { call_id, input, name, 5 more }` A call to a custom tool created by the model. @@ -50403,11 +50167,9 @@ Compact a response The namespace of the custom tool being called. - - `CustomToolCallOutput object { id, call_id, output, 5 more }` - - - `id: string` + - `CustomToolCallOutput object { call_id, output, type, 3 more }` - The unique ID of the custom tool call output item. + The output of a custom tool call from your code, being sent back to the model. - `call_id: string` @@ -50432,29 +50194,22 @@ Compact a response - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` A file input to the model. - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. - `"custom_tool_call_output"` + - `id: optional string` + + The unique ID of the custom tool call output in the OpenAI platform. + - `agent: optional object { agent_name }` The agent that produced this item. @@ -50487,10 +50242,6 @@ Compact a response - `"program"` - - `created_by: optional string` - - The identifier of the actor that created the item. - - `usage: BetaResponseUsage` Token accounting for the compaction pass, including cached, reasoning, and total tokens. @@ -50510,7 +50261,7 @@ Compact a response - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -50533,7 +50284,6 @@ Compact a response ```http curl https://api.openai.com/v1/responses/compact \ -H 'Content-Type: application/json' \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "model": "gpt-5.6-sol", @@ -50553,37 +50303,14 @@ curl https://api.openai.com/v1/responses/compact \ "id": "id", "content": [ { - "annotations": [ - { - "file_id": "file_id", - "filename": "filename", - "index": 0, - "type": "file_citation" + "text": "text", + "type": "input_text", + "prompt_cache_breakpoint": { + "mode": "explicit" + } } ], - "text": "text", - "type": "output_text", - "logprobs": [ - { - "token": "token", - "bytes": [ - 0 - ], - "logprob": 0, - "top_logprobs": [ - { - "token": "token", - "bytes": [ - 0 - ], - "logprob": 0 - } - ] - } - ] - } - ], - "role": "assistant", + "role": "unknown", "status": "in_progress", "type": "message", "agent": { @@ -50698,23 +50425,47 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.compaction"` - - `output: array of BetaResponseOutputItem` + - `output: array of object { id, content, role, 4 more } or object { id, call_id, code, 3 more } or object { id, call_id, result, 3 more } or 28 more` - The compacted list of output items. This is a list of all user messages, followed by a single compaction item. + The compacted list of output items. - - `BetaResponseOutputMessage object { id, content, role, 4 more }` + - `Message object { id, content, role, 4 more }` - An output message from the model. + A message to or from the model. - `id: string` - The unique ID of the output message. + The unique ID of the message. - - `content: array of BetaResponseOutputText or BetaResponseOutputRefusal` + - `content: array of BetaResponseInputText or BetaResponseOutputText or object { text, type } or 7 more` - The content of the output message. + The content of the message + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `text: string` + + The text input to the model. + + - `type: "input_text"` + + The type of the input item. Always `input_text`. + + - `"input_text"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -50818,17 +50569,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -50844,243 +50585,97 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` - - `BetaResponseOutputRefusal object { refusal, type }` - - A refusal from the model. - - - `refusal: string` - - The refusal explanation from the model. - - - `type: "refusal"` - - The type of the refusal. Always `refusal`. - - - `"refusal"` - - - `role: "assistant"` - - The role of the output message. Always `assistant`. - - - `"assistant"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + - `text: string` - - `"in_progress"` + The text output from the model. - - `"completed"` + - `type: "output_text"` - - `"incomplete"` + The type of the output text. Always `output_text`. - - `type: "message"` + - `"output_text"` - The type of the output message. Always `message`. + - `Text object { text, type }` - - `"message"` + A text content. - - `agent: optional object { agent_name }` + - `text: string` - The agent that produced this item. + - `type: "text"` - - `agent_name: string` + - `"text"` - The canonical name of the agent that produced this item. + - `SummaryText object { text, type }` - - `phase: optional "commentary" or "final_answer"` + A summary text from the model. - 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. + - `text: string` - - `"commentary"` + A summary of the reasoning output from the model so far. - - `"final_answer"` + - `type: "summary_text"` - - `FileSearchCall object { id, queries, status, 3 more }` + The type of the object. Always `summary_text`. - The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + - `"summary_text"` - - `id: string` + - `ReasoningText object { text, type }` - The unique ID of the file search tool call. + Reasoning text from the model. - - `queries: array of string` + - `text: string` - The queries used to search for files. + The reasoning text from the model. - - `status: "in_progress" or "searching" or "completed" or 2 more` + - `type: "reasoning_text"` - The status of the file search tool call. One of `in_progress`, - `searching`, `incomplete` or `failed`, + The type of the reasoning text. Always `reasoning_text`. - - `"in_progress"` + - `"reasoning_text"` - - `"searching"` + - `BetaResponseOutputRefusal object { refusal, type }` - - `"completed"` + A refusal from the model. - - `"incomplete"` + - `refusal: string` - - `"failed"` + The refusal explanation from the model. - - `type: "file_search_call"` + - `type: "refusal"` - The type of the file search tool call. Always `file_search_call`. + The type of the refusal. Always `refusal`. - - `"file_search_call"` + - `"refusal"` - - `agent: optional object { agent_name }` + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - The agent that produced this item. + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `agent_name: string` + - `detail: "low" or "high" or "auto" or "original"` - The canonical name of the agent that produced this item. + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - `results: optional array of object { attributes, file_id, filename, 2 more }` + - `"low"` - The results of the file search tool call. + - `"high"` - - `attributes: optional map[string or number or boolean]` + - `"auto"` - 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. + - `"original"` - - `string` + - `type: "input_image"` - - `number` + The type of the input item. Always `input_image`. - - `boolean` + - `"input_image"` - `file_id: optional string` - The unique ID of the file. - - - `filename: optional string` - - The name of the file. - - - `score: optional number` - - The relevance score of the file - a value between 0 and 1. - - - `text: optional string` - - The text that was retrieved from the file. - - - `FunctionCall object { arguments, call_id, name, 6 more }` - - A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `caller: optional object { type } or object { caller_id, type }` - - The execution context that produced this tool call. - - - `Direct object { type }` - - - `type: "direct"` - - - `"direct"` - - - `Program object { caller_id, type }` - - - `caller_id: string` - - The call ID of the program item that produced this tool call. - - - `type: "program"` - - - `"program"` - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput object { id, call_id, output, 5 more }` - - - `id: string` - - The unique ID of the function call tool output. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` - - The output from the function call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the function call. - - - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` - - Text, image, or file output of the function call. - - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `text: string` - - The text input to the model. - - - `type: "input_text"` + The ID of the file to be sent to the model. - The type of the input item. Always `input_text`. + - `image_url: optional string` - - `"input_text"` + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - `prompt_cache_breakpoint: optional object { mode }` @@ -51092,13 +50687,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"explicit"` - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + A screenshot of a computer. - `detail: "low" or "high" or "auto" or "original"` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - `"low"` @@ -51108,19 +50703,19 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"original"` - - `type: "input_image"` + - `file_id: string` - The type of the input item. Always `input_image`. + The identifier of an uploaded file that contains the screenshot. - - `"input_image"` + - `image_url: string` - - `file_id: optional string` + The URL of the screenshot image. - The ID of the file to be sent to the model. + - `type: "computer_screenshot"` - - `image_url: optional string` + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `"computer_screenshot"` - `prompt_cache_breakpoint: optional object { mode }` @@ -51178,202 +50773,209 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"explicit"` - - `status: "in_progress" or "completed" or "incomplete"` + - `EncryptedContent object { encrypted_content, type }` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + Opaque encrypted content that Responses API decrypts inside trusted model execution. - - `"in_progress"` + - `encrypted_content: string` - - `"completed"` + Opaque encrypted content. - - `"incomplete"` + - `type: "encrypted_content"` - - `type: "function_call_output"` + The type of the input item. Always `encrypted_content`. - The type of the function tool call output. Always `function_call_output`. + - `"encrypted_content"` - - `"function_call_output"` + - `role: "unknown" or "user" or "assistant" or 5 more` - - `agent: optional object { agent_name }` + The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. - The agent that produced this item. + - `"unknown"` - - `agent_name: string` + - `"user"` - The canonical name of the agent that produced this item. + - `"assistant"` - - `caller: optional object { type } or object { caller_id, type }` + - `"system"` - The execution context that produced this tool call. + - `"critic"` - - `Direct object { type }` + - `"discriminator"` - - `type: "direct"` + - `"developer"` - The caller type. Always `direct`. + - `"tool"` - - `"direct"` + - `status: "in_progress" or "completed" or "incomplete"` - - `Program object { caller_id, type }` + The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - - `caller_id: string` + - `"in_progress"` - The call ID of the program item that produced this tool call. + - `"completed"` - - `type: "program"` + - `"incomplete"` - The caller type. Always `program`. + - `type: "message"` - - `"program"` + The type of the message. Always set to `message`. - - `created_by: optional string` + - `"message"` - The identifier of the actor that created the item. + - `agent: optional object { agent_name }` - - `AgentMessage object { id, author, content, 3 more }` + The agent that produced this item. - - `id: string` + - `agent_name: string` - The unique ID of the agent message. + The canonical name of the agent that produced this item. - - `author: string` + - `phase: optional "commentary" or "final_answer"` - The sending agent identity. + 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. - - `content: array of BetaResponseInputText or BetaResponseOutputText or object { text, type } or 7 more` + - `"commentary"` - Encrypted content sent between agents. + - `"final_answer"` - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + - `Program object { id, call_id, code, 3 more }` - A text input to the model. + - `id: string` - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + The unique ID of the program item. - A text output from the model. + - `call_id: string` - - `Text object { text, type }` + The stable call ID of the program item. - A text content. + - `code: string` - - `text: string` + The JavaScript source executed by programmatic tool calling. - - `type: "text"` + - `fingerprint: string` - - `"text"` + Opaque program replay fingerprint that must be round-tripped. - - `SummaryText object { text, type }` + - `type: "program"` - A summary text from the model. + The type of the item. Always `program`. - - `text: string` + - `"program"` - A summary of the reasoning output from the model so far. + - `agent: optional object { agent_name }` - - `type: "summary_text"` + The agent that produced this item. - The type of the object. Always `summary_text`. + - `agent_name: string` - - `"summary_text"` + The canonical name of the agent that produced this item. - - `ReasoningText object { text, type }` + - `ProgramOutput object { id, call_id, result, 3 more }` - Reasoning text from the model. + - `id: string` - - `text: string` + The unique ID of the program output item. - The reasoning text from the model. + - `call_id: string` - - `type: "reasoning_text"` + The call ID of the program item. - The type of the reasoning text. Always `reasoning_text`. + - `result: string` - - `"reasoning_text"` + The result produced by the program item. - - `BetaResponseOutputRefusal object { refusal, type }` + - `status: "completed" or "incomplete"` - A refusal from the model. + The terminal status of the program output item. - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + - `"completed"` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + - `"incomplete"` - - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` + - `type: "program_output"` - A screenshot of a computer. + The type of the item. Always `program_output`. - - `detail: "low" or "high" or "auto" or "original"` + - `"program_output"` - The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + - `agent: optional object { agent_name }` - - `"low"` + The agent that produced this item. - - `"high"` + - `agent_name: string` - - `"auto"` + The canonical name of the agent that produced this item. - - `"original"` + - `FunctionCall object { arguments, call_id, name, 6 more }` - - `file_id: string` + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. - The identifier of an uploaded file that contains the screenshot. + - `arguments: string` - - `image_url: string` + A JSON string of the arguments to pass to the function. - The URL of the screenshot image. + - `call_id: string` - - `type: "computer_screenshot"` + The unique ID of the function tool call generated by the model. - Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + - `name: string` - - `"computer_screenshot"` + The name of the function to run. - - `prompt_cache_breakpoint: optional object { mode }` + - `type: "function_call"` - 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. + The type of the function tool call. Always `function_call`. - - `mode: "explicit"` + - `"function_call"` - The breakpoint mode. Always `explicit`. + - `id: optional string` - - `"explicit"` + The unique ID of the function tool call. - - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + - `agent: optional object { agent_name }` - A file input to the model. + The agent that produced this item. - - `EncryptedContent object { encrypted_content, type }` + - `agent_name: string` - Opaque encrypted content that Responses API decrypts inside trusted model execution. + The canonical name of the agent that produced this item. - - `encrypted_content: string` + - `caller: optional object { type } or object { caller_id, type }` - Opaque encrypted content. + The execution context that produced this tool call. - - `type: "encrypted_content"` + - `Direct object { type }` - The type of the input item. Always `encrypted_content`. + - `type: "direct"` - - `"encrypted_content"` + - `"direct"` - - `recipient: string` + - `Program object { caller_id, type }` - The destination agent identity. + - `caller_id: string` - - `type: "agent_message"` + The call ID of the program item that produced this tool call. - The type of the item. Always `agent_message`. + - `type: "program"` - - `"agent_message"` + - `"program"` - - `agent: optional object { agent_name }` + - `namespace: optional string` - The agent that produced this item. + The namespace of the function to run. - - `agent_name: string` + - `status: optional "in_progress" or "completed" or "incomplete"` - The canonical name of the agent that produced this item. + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` - `MultiAgentCall object { id, action, arguments, 3 more }` @@ -51453,6 +51055,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -51461,8 +51065,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -51477,1112 +51079,504 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. - - `WebSearchCall object { id, action, status, 2 more }` - - The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + - `ToolSearchCall object { id, arguments, call_id, 5 more }` - `id: string` - The unique ID of the web search tool call. - - - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }` - - An object describing the specific action taken in this web search call. - Includes details on how the model used the web (search, open_page, find_in_page). - - - `Search object { type, queries, query, sources }` + The unique ID of the tool search call item. - Action type "search" - Performs a web search query. + - `arguments: unknown` - - `type: "search"` + Arguments used for the tool search call. - The action type. + - `call_id: string` - - `"search"` + The unique ID of the tool search call generated by the model. - - `queries: optional array of string` + - `execution: "server" or "client"` - The search queries. + Whether tool search was executed by the server or by the client. - - `query: optional string` + - `"server"` - The search query. + - `"client"` - - `sources: optional array of object { type, url }` + - `status: "in_progress" or "completed" or "incomplete"` - The sources used in the search. + The status of the tool search call item that was recorded. - - `type: "url"` + - `"in_progress"` - The type of source. Always `url`. + - `"completed"` - - `"url"` + - `"incomplete"` - - `url: string` + - `type: "tool_search_call"` - The URL of the source. + The type of the item. Always `tool_search_call`. - - `OpenPage object { type, url }` + - `"tool_search_call"` - Action type "open_page" - Opens a specific URL from search results. + - `agent: optional object { agent_name }` - - `type: "open_page"` + The agent that produced this item. - The action type. + - `agent_name: string` - - `"open_page"` + The canonical name of the agent that produced this item. - - `url: optional string` + - `created_by: optional string` - The URL opened by the model. + The identifier of the actor that created the item. - - `FindInPage object { pattern, type, url }` + - `ToolSearchOutput object { id, call_id, execution, 5 more }` - Action type "find_in_page": Searches for a pattern within a loaded page. + - `id: string` - - `pattern: string` + The unique ID of the tool search output item. - The pattern or text to search for within the page. + - `call_id: string` - - `type: "find_in_page"` + The unique ID of the tool search call generated by the model. - The action type. + - `execution: "server" or "client"` - - `"find_in_page"` + Whether tool search was executed by the server or by the client. - - `url: string` + - `"server"` - The URL of the page searched for the pattern. + - `"client"` - - `status: "in_progress" or "searching" or "completed" or "failed"` + - `status: "in_progress" or "completed" or "incomplete"` - The status of the web search tool call. + The status of the tool search output item that was recorded. - `"in_progress"` - - `"searching"` - - `"completed"` - - `"failed"` + - `"incomplete"` - - `type: "web_search_call"` + - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` - The type of the web search tool call. Always `web_search_call`. + The loaded tool definitions returned by tool search. - - `"web_search_call"` + - `Function object { name, parameters, strict, 5 more }` - - `agent: optional object { agent_name }` + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). - The agent that produced this item. + - `name: string` - - `agent_name: string` + The name of the function to call. - The canonical name of the agent that produced this item. + - `parameters: map[unknown]` - - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` + A JSON schema object describing the parameters of the function. - A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + - `strict: boolean` - - `id: string` + Whether strict parameter validation is enforced for this function tool. - The unique ID of the computer call. + - `type: "function"` - - `call_id: string` + The type of the function tool. Always `function`. - An identifier used when responding to the tool call with output. + - `"function"` - - `pending_safety_checks: array of object { id, code, message }` + - `allowed_callers: optional array of "direct" or "programmatic"` - The pending safety checks for the computer call. + The tool invocation context(s). - - `id: string` + - `"direct"` - The ID of the pending safety check. + - `"programmatic"` - - `code: optional string` + - `defer_loading: optional boolean` - The type of the pending safety check. + Whether this function is deferred and loaded via tool search. - - `message: optional string` + - `description: optional string` - Details about the pending safety check. + A description of the function. Used by the model to determine whether or not to call the function. - - `status: "in_progress" or "completed" or "incomplete"` + - `output_schema: optional map[unknown]` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + A JSON schema object describing the JSON value encoded in string outputs for this function. - - `"in_progress"` + - `FileSearch object { type, vector_store_ids, filters, 2 more }` - - `"completed"` + A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). - - `"incomplete"` + - `type: "file_search"` - - `type: "computer_call"` + The type of the file search tool. Always `file_search`. - The type of the computer call. Always `computer_call`. + - `"file_search"` - - `"computer_call"` + - `vector_store_ids: array of string` - - `action: optional BetaComputerAction` + The IDs of the vector stores to search. - A click action. + - `filters: optional object { key, type, value } or object { filters, type }` - - `Click object { button, type, x, 2 more }` + A filter to apply. - A click action. + - `ComparisonFilter object { key, type, value }` - - `button: "left" or "right" or "wheel" or 2 more` + A filter used to compare a specified attribute key to a given value using a defined comparison operation. - Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + - `key: string` - - `"left"` + The key to compare against the value. - - `"right"` + - `type: "eq" or "ne" or "gt" or 5 more` - - `"wheel"` + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - `"back"` + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in - - `"forward"` + - `"eq"` - - `type: "click"` + - `"ne"` - Specifies the event type. For a click action, this property is always `click`. + - `"gt"` - - `"click"` + - `"gte"` - - `x: number` + - `"lt"` - The x-coordinate where the click occurred. + - `"lte"` - - `y: number` + - `"in"` - The y-coordinate where the click occurred. + - `"nin"` - - `keys: optional array of string` + - `value: string or number or boolean or array of string or number` - The keys being held while clicking. + The value to compare against the attribute key; supports string, number, or boolean types. - - `DoubleClick object { keys, type, x, y }` + - `string` - A double click action. + - `number` - - `keys: array of string` + - `boolean` - The keys being held while double-clicking. + - `array of string or number` - - `type: "double_click"` + - `string` - Specifies the event type. For a double click action, this property is always set to `double_click`. + - `number` - - `"double_click"` + - `CompoundFilter object { filters, type }` - - `x: number` + Combine multiple filters using `and` or `or`. - The x-coordinate where the double click occurred. + - `filters: array of object { key, type, value } or unknown` - - `y: number` + Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - The y-coordinate where the double click occurred. + - `ComparisonFilter object { key, type, value }` - - `Drag object { path, type, keys }` + A filter used to compare a specified attribute key to a given value using a defined comparison operation. - A drag action. + - `key: string` - - `path: array of object { x, y }` + The key to compare against the value. - An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + - `type: "eq" or "ne" or "gt" or 5 more` - ``` - [ - { x: 100, y: 200 }, - { x: 200, y: 300 } - ] - ``` + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - `x: number` + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in - The x-coordinate. + - `"eq"` - - `y: number` + - `"ne"` - The y-coordinate. + - `"gt"` - - `type: "drag"` + - `"gte"` - Specifies the event type. For a drag action, this property is always set to `drag`. + - `"lt"` - - `"drag"` + - `"lte"` - - `keys: optional array of string` + - `"in"` - The keys being held while dragging the mouse. + - `"nin"` - - `Keypress object { keys, type }` + - `value: string or number or boolean or array of string or number` - A collection of keypresses the model would like to perform. + The value to compare against the attribute key; supports string, number, or boolean types. - - `keys: array of string` + - `string` - The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + - `number` - - `type: "keypress"` + - `boolean` - Specifies the event type. For a keypress action, this property is always set to `keypress`. + - `array of string or number` - - `"keypress"` + - `string` - - `Move object { type, x, y, keys }` + - `number` - A mouse move action. + - `unknown` - - `type: "move"` + - `type: "and" or "or"` - Specifies the event type. For a move action, this property is always set to `move`. + Type of operation: `and` or `or`. - - `"move"` + - `"and"` - - `x: number` + - `"or"` - The x-coordinate to move to. + - `max_num_results: optional number` - - `y: number` + The maximum number of results to return. This number should be between 1 and 50 inclusive. - The y-coordinate to move to. + - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - `keys: optional array of string` + Ranking options for search. - The keys being held while moving the mouse. + - `hybrid_search: optional object { embedding_weight, text_weight }` - - `Screenshot object { type }` + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - A screenshot action. + - `embedding_weight: number` - - `type: "screenshot"` + The weight of the embedding in the reciprocal ranking fusion. - Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + - `text_weight: number` - - `"screenshot"` + The weight of the text in the reciprocal ranking fusion. - - `Scroll object { scroll_x, scroll_y, type, 3 more }` + - `ranker: optional "auto" or "default-2024-11-15"` - A scroll action. + The ranker to use for the file search. - - `scroll_x: number` + - `"auto"` - The horizontal scroll distance. + - `"default-2024-11-15"` - - `scroll_y: number` + - `score_threshold: optional number` - The vertical scroll distance. + The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - `type: "scroll"` + - `Computer object { type }` - Specifies the event type. For a scroll action, this property is always set to `scroll`. + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - `"scroll"` + - `type: "computer"` - - `x: number` + The type of the computer tool. Always `computer`. - The x-coordinate where the scroll occurred. + - `"computer"` - - `y: number` + - `ComputerUsePreview object { display_height, display_width, environment, type }` - The y-coordinate where the scroll occurred. + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - `keys: optional array of string` + - `display_height: number` - The keys being held while scrolling. + The height of the computer display. - - `Type object { text, type }` + - `display_width: number` - An action to type in text. + The width of the computer display. - - `text: string` + - `environment: "windows" or "mac" or "linux" or 2 more` - The text to type. + The type of computer environment to control. - - `type: "type"` + - `"windows"` - Specifies the event type. For a type action, this property is always set to `type`. + - `"mac"` - - `"type"` + - `"linux"` - - `Wait object { type }` + - `"ubuntu"` - A wait action. + - `"browser"` - - `type: "wait"` + - `type: "computer_use_preview"` - Specifies the event type. For a wait action, this property is always set to `wait`. + The type of the computer use tool. Always `computer_use_preview`. - - `"wait"` + - `"computer_use_preview"` - - `actions: optional BetaComputerActionList` + - `WebSearch object { type, filters, search_context_size, user_location }` - Flattened batched actions for `computer_use`. Each action includes an - `type` discriminator and action-specific fields. + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](/docs/guides/tools-web-search). - - `Click object { button, type, x, 2 more }` + - `type: "web_search" or "web_search_2025_08_26"` - A click action. + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - `DoubleClick object { keys, type, x, y }` + - `"web_search"` - A double click action. + - `"web_search_2025_08_26"` - - `Drag object { path, type, keys }` + - `filters: optional object { allowed_domains }` - A drag action. + Filters for the search. - - `Keypress object { keys, type }` + - `allowed_domains: optional array of string` - A collection of keypresses the model would like to perform. + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. - - `Move object { type, x, y, keys }` + Example: `["pubmed.ncbi.nlm.nih.gov"]` - A mouse move action. + - `search_context_size: optional "low" or "medium" or "high"` - - `Screenshot object { type }` + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - A screenshot action. + - `"low"` - - `Scroll object { scroll_x, scroll_y, type, 3 more }` + - `"medium"` - A scroll action. + - `"high"` - - `Type object { text, type }` + - `user_location: optional object { city, country, region, 2 more }` - An action to type in text. + The approximate location of the user. - - `Wait object { type }` + - `city: optional string` - A wait action. + Free text input for the city of the user, e.g. `San Francisco`. - - `agent: optional object { agent_name }` + - `country: optional string` - The agent that produced this item. + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - `agent_name: string` + - `region: optional string` - The canonical name of the agent that produced this item. + Free text input for the region of the user, e.g. `California`. - - `ComputerCallOutput object { id, call_id, output, 5 more }` + - `timezone: optional string` - - `id: string` + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - The unique ID of the computer call tool output. + - `type: optional "approximate"` - - `call_id: string` + The type of location approximation. Always `approximate`. - The ID of the computer tool call that produced the output. + - `"approximate"` - - `output: BetaResponseComputerToolCallOutputScreenshot` + - `Mcp object { server_label, type, allowed_callers, 9 more }` - A computer screenshot image used with the computer use tool. + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - `type: "computer_screenshot"` + - `server_label: string` - Specifies the event type. For a computer screenshot, this property is - always set to `computer_screenshot`. + A label for this MCP server, used to identify it in tool calls. - - `"computer_screenshot"` + - `type: "mcp"` - - `file_id: optional string` + The type of the MCP tool. Always `mcp`. - The identifier of an uploaded file that contains the screenshot. + - `"mcp"` - - `image_url: optional string` + - `allowed_callers: optional array of "direct" or "programmatic"` - The URL of the screenshot image. + The tool invocation context(s). - - `status: "completed" or "incomplete" or "failed" or "in_progress"` + - `"direct"` - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + - `"programmatic"` - - `"completed"` + - `allowed_tools: optional array of string or object { read_only, tool_names }` - - `"incomplete"` + List of allowed tool names or a filter object. - - `"failed"` + - `McpAllowedTools = array of string` - - `"in_progress"` + A string array of allowed tool names - - `type: "computer_call_output"` + - `McpToolFilter object { read_only, tool_names }` - The type of the computer tool call output. Always `computer_call_output`. + A filter object to specify which tools are allowed. - - `"computer_call_output"` + - `read_only: optional boolean` - - `acknowledged_safety_checks: optional array of object { id, code, message }` + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. - The safety checks reported by the API that have been acknowledged by the - developer. + - `tool_names: optional array of string` - - `id: string` + List of allowed tool names. - The ID of the pending safety check. + - `authorization: optional string` - - `code: optional string` + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. - The type of the pending safety check. + - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` - - `message: optional string` + Identifier for service connectors, like those available in ChatGPT. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). - Details about the pending safety check. + Currently supported `connector_id` values are: - - `agent: optional object { agent_name }` + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` - The agent that produced this item. + - `"connector_dropbox"` - - `agent_name: string` + - `"connector_gmail"` - The canonical name of the agent that produced this item. + - `"connector_googlecalendar"` - - `created_by: optional string` + - `"connector_googledrive"` - The identifier of the actor that created the item. + - `"connector_microsoftteams"` - - `Reasoning object { id, summary, type, 4 more }` + - `"connector_outlookcalendar"` - 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](https://platform.openai.com/docs/guides/conversation-state). + - `"connector_outlookemail"` - - `id: string` + - `"connector_sharepoint"` - The unique identifier of the reasoning content. + - `defer_loading: optional boolean` - - `summary: array of object { text, type }` + Whether this MCP tool is deferred and discovered via tool search. - Reasoning summary content. + - `headers: optional map[string]` - - `text: string` + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. - A summary of the reasoning output from the model so far. + - `require_approval: optional object { always, never } or "always" or "never"` - - `type: "summary_text"` + Specify which of the MCP server's tools require approval. - The type of the object. Always `summary_text`. - - - `"summary_text"` - - - `type: "reasoning"` - - The type of the object. Always `reasoning`. - - - `"reasoning"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `content: optional array of object { text, type }` - - Reasoning text content. - - - `text: string` - - The reasoning text from the model. - - - `type: "reasoning_text"` - - The type of the reasoning text. Always `reasoning_text`. - - - `"reasoning_text"` - - - `encrypted_content: optional string` - - The encrypted content of the reasoning item - populated when a response is - generated with `reasoning.encrypted_content` in the `include` parameter. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `Program object { id, call_id, code, 3 more }` - - - `id: string` - - The unique ID of the program item. - - - `call_id: string` - - The stable call ID of the program item. - - - `code: string` - - The JavaScript source executed by programmatic tool calling. - - - `fingerprint: string` - - Opaque program replay fingerprint that must be round-tripped. - - - `type: "program"` - - The type of the item. Always `program`. - - - `"program"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `ProgramOutput object { id, call_id, result, 3 more }` - - - `id: string` - - The unique ID of the program output item. - - - `call_id: string` - - The call ID of the program item. - - - `result: string` - - The result produced by the program item. - - - `status: "completed" or "incomplete"` - - The terminal status of the program output item. - - - `"completed"` - - - `"incomplete"` - - - `type: "program_output"` - - The type of the item. Always `program_output`. - - - `"program_output"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `ToolSearchCall object { id, arguments, call_id, 5 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput object { id, call_id, execution, 5 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` - - The loaded tool definitions returned by tool search. - - - `Function object { name, parameters, strict, 5 more }` - - Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). - - - `name: string` - - The name of the function to call. - - - `parameters: map[unknown]` - - A JSON schema object describing the parameters of the function. - - - `strict: boolean` - - Whether strict parameter validation is enforced for this function tool. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `allowed_callers: optional array of "direct" or "programmatic"` - - The tool invocation context(s). - - - `"direct"` - - - `"programmatic"` - - - `defer_loading: optional boolean` - - Whether this function is deferred and loaded via tool search. - - - `description: optional string` - - A description of the function. Used by the model to determine whether or not to call the function. - - - `output_schema: optional map[unknown]` - - A JSON schema object describing the JSON value encoded in string outputs for this function. - - - `FileSearch object { type, vector_store_ids, filters, 2 more }` - - A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). - - - `type: "file_search"` - - The type of the file search tool. Always `file_search`. - - - `"file_search"` - - - `vector_store_ids: array of string` - - The IDs of the vector stores to search. - - - `filters: optional object { key, type, value } or object { filters, type }` - - A filter to apply. - - - `ComparisonFilter object { key, type, value }` - - A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `CompoundFilter object { filters, type }` - - Combine multiple filters using `and` or `or`. - - - `filters: array of object { key, type, value } or unknown` - - Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - - `ComparisonFilter object { key, type, value }` - - A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp object { server_label, type, allowed_callers, 9 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_callers: optional array of "direct" or "programmatic"` - - The tool invocation context(s). - - - `"direct"` - - - `"programmatic"` - - - `allowed_tools: optional array of string or object { read_only, tool_names }` - - List of allowed tool names or a filter object. - - - `McpAllowedTools = array of string` - - A string array of allowed tool names - - - `McpToolFilter object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `authorization: optional string` - - An OAuth access token that can be used with a remote MCP server, either - with a custom MCP server URL or a service connector. Your application - must handle the OAuth authorization flow and provide the token here. - - - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` - - Identifier for service connectors, like those available in ChatGPT. One of - `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -52764,19 +51758,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -52805,13 +51788,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -52819,14 +51802,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -53041,7 +52018,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -53155,7 +52132,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -53632,7 +52609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -53692,7 +52669,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -53744,7 +52721,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -53936,19 +52913,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -53977,13 +52943,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -53991,14 +52957,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -54095,7 +53055,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -54209,7 +53169,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -54391,23 +53351,141 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. - - `Compaction object { id, encrypted_content, type, 2 more }` - - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + - `AgentMessage object { id, author, content, 3 more }` - `id: string` - The unique ID of the compaction item. + The unique ID of the agent message. + + - `author: string` + + The sending agent identity. + + - `content: array of BetaResponseInputText or BetaResponseOutputText or object { text, type } or 7 more` + + Encrypted content sent between agents. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseOutputText object { annotations, logprobs, text, type }` + + A text output from the model. + + - `Text object { text, type }` + + A text content. + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `SummaryText object { text, type }` + + A summary text from the model. + + - `text: string` + + A summary of the reasoning output from the model so far. + + - `type: "summary_text"` + + The type of the object. Always `summary_text`. + + - `"summary_text"` + + - `ReasoningText object { text, type }` + + Reasoning text from the model. + + - `text: string` + + The reasoning text from the model. + + - `type: "reasoning_text"` + + The type of the reasoning text. Always `reasoning_text`. + + - `"reasoning_text"` + + - `BetaResponseOutputRefusal object { refusal, type }` + + A refusal from the model. + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` + + A screenshot of a computer. + + - `detail: "low" or "high" or "auto" or "original"` + + The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `file_id: string` + + The identifier of an uploaded file that contains the screenshot. + + - `image_url: string` + + The URL of the screenshot image. + + - `type: "computer_screenshot"` + + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + + - `"computer_screenshot"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `EncryptedContent object { encrypted_content, type }` + + Opaque encrypted content that Responses API decrypts inside trusted model execution. - `encrypted_content: string` - The encrypted content that was produced by compaction. + Opaque encrypted content. - - `type: "compaction"` + - `type: "encrypted_content"` - The type of the item. Always `compaction`. + The type of the input item. Always `encrypted_content`. - - `"compaction"` + - `"encrypted_content"` + + - `recipient: string` + + The destination agent identity. + + - `type: "agent_message"` + + The type of the item. Always `agent_message`. + + - `"agent_message"` - `agent: optional object { agent_name }` @@ -54417,9 +53495,272 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. - - `created_by: optional string` + - `FunctionCallOutput object { call_id, output, type, 4 more }` - The identifier of the actor that created the item. + The output of a function tool call. + + - `call_id: string` + + The unique ID of the function tool call generated by the model. + + - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + + The output from the function call generated by your code. + Can be a string or an list of output content. + + - `StringOutput = string` + + A string of the output of the function call. + + - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + + Text, image, or file output of the function call. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `type: "function_call_output"` + + The type of the function tool call output. Always `function_call_output`. + + - `"function_call_output"` + + - `id: optional string` + + The unique ID of the function tool call output. Populated when this item + is returned via API. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. + + - `Direct object { type }` + + - `type: "direct"` + + The caller type. Always `direct`. + + - `"direct"` + + - `Program object { caller_id, type }` + + - `caller_id: string` + + The call ID of the program item that produced this tool call. + + - `type: "program"` + + The caller type. Always `program`. + + - `"program"` + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `FileSearchCall object { id, queries, status, 3 more }` + + The results of a file search tool call. See the + [file search guide](/docs/guides/tools-file-search) for more information. + + - `id: string` + + The unique ID of the file search tool call. + + - `queries: array of string` + + The queries used to search for files. + + - `status: "in_progress" or "searching" or "completed" or 2 more` + + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, + + - `"in_progress"` + + - `"searching"` + + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `type: "file_search_call"` + + The type of the file search tool call. Always `file_search_call`. + + - `"file_search_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `results: optional array of object { attributes, file_id, filename, 2 more }` + + The results of the file search tool call. + + - `attributes: optional map[string or number or boolean]` + + 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. + + - `string` + + - `number` + + - `boolean` + + - `file_id: optional string` + + The unique ID of the file. + + - `filename: optional string` + + The name of the file. + + - `score: optional number` + + The relevance score of the file - a value between 0 and 1. + + - `text: optional string` + + The text that was retrieved from the file. + + - `WebSearchCall object { id, action, status, 2 more }` + + The results of a web search tool call. See the + [web search guide](/docs/guides/tools-web-search) for more information. + + - `id: string` + + The unique ID of the web search tool call. + + - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }` + + An object describing the specific action taken in this web search call. + Includes details on how the model used the web (search, open_page, find_in_page). + + - `Search object { type, queries, query, sources }` + + Action type "search" - Performs a web search query. + + - `type: "search"` + + The action type. + + - `"search"` + + - `queries: optional array of string` + + The search queries. + + - `query: optional string` + + The search query. + + - `sources: optional array of object { type, url }` + + The sources used in the search. + + - `type: "url"` + + The type of source. Always `url`. + + - `"url"` + + - `url: string` + + The URL of the source. + + - `OpenPage object { type, url }` + + Action type "open_page" - Opens a specific URL from search results. + + - `type: "open_page"` + + The action type. + + - `"open_page"` + + - `url: optional string` + + The URL opened by the model. + + - `FindInPage object { pattern, type, url }` + + Action type "find_in_page": Searches for a pattern within a loaded page. + + - `pattern: string` + + The pattern or text to search for within the page. + + - `type: "find_in_page"` + + The action type. + + - `"find_in_page"` + + - `url: string` + + The URL of the page searched for the pattern. + + - `status: "in_progress" or "searching" or "completed" or "failed"` + + The status of the web search tool call. + + - `"in_progress"` + + - `"searching"` + + - `"completed"` + + - `"failed"` + + - `type: "web_search_call"` + + The type of the web search tool call. Always `web_search_call`. + + - `"web_search_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. - `ImageGenerationCall object { id, result, status, 2 more }` @@ -54459,6 +53800,472 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. + - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` + + A tool call to a computer use tool. See the + [computer use guide](/docs/guides/tools-computer-use) for more information. + + - `id: string` + + The unique ID of the computer call. + + - `call_id: string` + + An identifier used when responding to the tool call with output. + + - `pending_safety_checks: array of object { id, code, message }` + + The pending safety checks for the computer call. + + - `id: string` + + The ID of the pending safety check. + + - `code: optional string` + + The type of the pending safety check. + + - `message: optional string` + + Details about the pending safety check. + + - `status: "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: "computer_call"` + + The type of the computer call. Always `computer_call`. + + - `"computer_call"` + + - `action: optional BetaComputerAction` + + A click action. + + - `Click object { button, type, x, 2 more }` + + A click action. + + - `button: "left" or "right" or "wheel" or 2 more` + + Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + + - `"left"` + + - `"right"` + + - `"wheel"` + + - `"back"` + + - `"forward"` + + - `type: "click"` + + Specifies the event type. For a click action, this property is always `click`. + + - `"click"` + + - `x: number` + + The x-coordinate where the click occurred. + + - `y: number` + + The y-coordinate where the click occurred. + + - `keys: optional array of string` + + The keys being held while clicking. + + - `DoubleClick object { keys, type, x, y }` + + A double click action. + + - `keys: array of string` + + The keys being held while double-clicking. + + - `type: "double_click"` + + Specifies the event type. For a double click action, this property is always set to `double_click`. + + - `"double_click"` + + - `x: number` + + The x-coordinate where the double click occurred. + + - `y: number` + + The y-coordinate where the double click occurred. + + - `Drag object { path, type, keys }` + + A drag action. + + - `path: array of object { x, y }` + + An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + + ``` + [ + { x: 100, y: 200 }, + { x: 200, y: 300 } + ] + ``` + + - `x: number` + + The x-coordinate. + + - `y: number` + + The y-coordinate. + + - `type: "drag"` + + Specifies the event type. For a drag action, this property is always set to `drag`. + + - `"drag"` + + - `keys: optional array of string` + + The keys being held while dragging the mouse. + + - `Keypress object { keys, type }` + + A collection of keypresses the model would like to perform. + + - `keys: array of string` + + The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + + - `type: "keypress"` + + Specifies the event type. For a keypress action, this property is always set to `keypress`. + + - `"keypress"` + + - `Move object { type, x, y, keys }` + + A mouse move action. + + - `type: "move"` + + Specifies the event type. For a move action, this property is always set to `move`. + + - `"move"` + + - `x: number` + + The x-coordinate to move to. + + - `y: number` + + The y-coordinate to move to. + + - `keys: optional array of string` + + The keys being held while moving the mouse. + + - `Screenshot object { type }` + + A screenshot action. + + - `type: "screenshot"` + + Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + + - `"screenshot"` + + - `Scroll object { scroll_x, scroll_y, type, 3 more }` + + A scroll action. + + - `scroll_x: number` + + The horizontal scroll distance. + + - `scroll_y: number` + + The vertical scroll distance. + + - `type: "scroll"` + + Specifies the event type. For a scroll action, this property is always set to `scroll`. + + - `"scroll"` + + - `x: number` + + The x-coordinate where the scroll occurred. + + - `y: number` + + The y-coordinate where the scroll occurred. + + - `keys: optional array of string` + + The keys being held while scrolling. + + - `Type object { text, type }` + + An action to type in text. + + - `text: string` + + The text to type. + + - `type: "type"` + + Specifies the event type. For a type action, this property is always set to `type`. + + - `"type"` + + - `Wait object { type }` + + A wait action. + + - `type: "wait"` + + Specifies the event type. For a wait action, this property is always set to `wait`. + + - `"wait"` + + - `actions: optional BetaComputerActionList` + + Flattened batched actions for `computer_use`. Each action includes an + `type` discriminator and action-specific fields. + + - `Click object { button, type, x, 2 more }` + + A click action. + + - `DoubleClick object { keys, type, x, y }` + + A double click action. + + - `Drag object { path, type, keys }` + + A drag action. + + - `Keypress object { keys, type }` + + A collection of keypresses the model would like to perform. + + - `Move object { type, x, y, keys }` + + A mouse move action. + + - `Screenshot object { type }` + + A screenshot action. + + - `Scroll object { scroll_x, scroll_y, type, 3 more }` + + A scroll action. + + - `Type object { text, type }` + + An action to type in text. + + - `Wait object { type }` + + A wait action. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `ComputerCallOutput object { id, call_id, output, 5 more }` + + - `id: string` + + The unique ID of the computer call tool output. + + - `call_id: string` + + The ID of the computer tool call that produced the output. + + - `output: BetaResponseComputerToolCallOutputScreenshot` + + A computer screenshot image used with the computer use tool. + + - `type: "computer_screenshot"` + + Specifies the event type. For a computer screenshot, this property is + always set to `computer_screenshot`. + + - `"computer_screenshot"` + + - `file_id: optional string` + + The identifier of an uploaded file that contains the screenshot. + + - `image_url: optional string` + + The URL of the screenshot image. + + - `status: "completed" or "incomplete" or "failed" or "in_progress"` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `"in_progress"` + + - `type: "computer_call_output"` + + The type of the computer tool call output. Always `computer_call_output`. + + - `"computer_call_output"` + + - `acknowledged_safety_checks: optional array of object { id, code, message }` + + The safety checks reported by the API that have been acknowledged by the + developer. + + - `id: string` + + The ID of the pending safety check. + + - `code: optional string` + + The type of the pending safety check. + + - `message: optional string` + + Details about the pending safety check. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `created_by: optional string` + + The identifier of the actor that created the item. + + - `Reasoning object { 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](/docs/guides/conversation-state). + + - `id: string` + + The unique identifier of the reasoning content. + + - `summary: array of object { text, type }` + + Reasoning summary content. + + - `text: string` + + A summary of the reasoning output from the model so far. + + - `type: "summary_text"` + + The type of the object. Always `summary_text`. + + - `"summary_text"` + + - `type: "reasoning"` + + The type of the object. Always `reasoning`. + + - `"reasoning"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `content: optional array of object { text, type }` + + Reasoning text content. + + - `text: string` + + The reasoning text from the model. + + - `type: "reasoning_text"` + + The type of the reasoning text. Always `reasoning_text`. + + - `"reasoning_text"` + + - `encrypted_content: optional string` + + The encrypted content of the reasoning item - populated when a response is + generated with `reasoning.encrypted_content` in the `include` parameter. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `Compaction object { id, encrypted_content, type, 2 more }` + + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + + - `id: string` + + The unique ID of the compaction item. + + - `encrypted_content: string` + + The encrypted content that was produced by compaction. + + - `type: "compaction"` + + The type of the item. Always `compaction`. + + - `"compaction"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `created_by: optional string` + + The identifier of the actor that created the item. + - `CodeInterpreterCall object { id, code, container_id, 4 more }` A tool call to run code. @@ -55020,67 +54827,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional textual output returned by the apply patch tool. - - `McpCall object { id, arguments, name, 7 more }` - - An invocation of a tool on an MCP server. - - - `id: string` - - The unique ID of the tool call. - - - `arguments: string` - - A JSON string of the arguments passed to the tool. - - - `name: string` - - The name of the tool that was run. - - - `server_label: string` - - The label of the MCP server running the tool. - - - `type: "mcp_call"` - - The type of the item. Always `mcp_call`. - - - `"mcp_call"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `approval_request_id: optional string` - - Unique identifier for the MCP tool call approval request. - Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. - - - `error: optional string` - - The error from the tool call, if any. - - - `output: optional string` - - The output from the tool call. - - - `status: optional "in_progress" or "completed" or "incomplete" or 2 more` - - The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `"calling"` - - - `"failed"` - - `McpListTools object { id, server_label, tools, 3 more }` A list of tools available on an MCP server. @@ -55199,6 +54945,67 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. + - `McpCall object { id, arguments, name, 7 more }` + + An invocation of a tool on an MCP server. + + - `id: string` + + The unique ID of the tool call. + + - `arguments: string` + + A JSON string of the arguments passed to the tool. + + - `name: string` + + The name of the tool that was run. + + - `server_label: string` + + The label of the MCP server running the tool. + + - `type: "mcp_call"` + + The type of the item. Always `mcp_call`. + + - `"mcp_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `approval_request_id: optional string` + + Unique identifier for the MCP tool call approval request. + Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. + + - `error: optional string` + + The error from the tool call, if any. + + - `output: optional string` + + The output from the tool call. + + - `status: optional "in_progress" or "completed" or "incomplete" or 2 more` + + The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `"calling"` + + - `"failed"` + - `CustomToolCall object { call_id, input, name, 5 more }` A call to a custom tool created by the model. @@ -55257,11 +55064,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput object { id, call_id, output, 5 more }` - - - `id: string` + - `CustomToolCallOutput object { call_id, output, type, 3 more }` - The unique ID of the custom tool call output item. + The output of a custom tool call from your code, being sent back to the model. - `call_id: string` @@ -55286,29 +55091,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` A file input to the model. - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. - `"custom_tool_call_output"` + - `id: optional string` + + The unique ID of the custom tool call output in the OpenAI platform. + - `agent: optional object { agent_name }` The agent that produced this item. @@ -55341,10 +55139,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"program"` - - `created_by: optional string` - - The identifier of the actor that created the item. - - `usage: BetaResponseUsage` Token accounting for the compaction pass, including cached, reasoning, and total tokens. @@ -55364,7 +55158,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -56019,7 +55813,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -56236,7 +56030,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Beta Response -- `BetaResponse object { id, created_at, error, 31 more }` +- `BetaResponse object { id, created_at, error, 32 more }` - `id: string` @@ -56374,7 +56168,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -56545,7 +56339,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -56649,17 +56443,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -56675,6 +56459,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -56733,7 +56527,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -56809,7 +56603,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -57170,7 +56964,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -57274,7 +57068,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -57349,7 +57143,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -57357,7 +57151,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -57387,7 +57181,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -57541,7 +57335,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -58066,7 +57860,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -58126,7 +57920,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -58178,7 +57972,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -58402,19 +58196,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -58443,13 +58226,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -58457,14 +58240,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -58679,7 +58456,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -58793,7 +58570,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -59274,7 +59051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -59334,7 +59111,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -59386,7 +59163,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -59578,19 +59355,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -59619,13 +59385,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -59633,14 +59399,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -59737,7 +59497,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -59851,7 +59611,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -60042,7 +59802,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -60108,7 +59868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -60917,7 +60677,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -61144,14 +60904,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -61370,7 +61130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -61446,7 +61206,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -61542,7 +61302,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -61619,7 +61379,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -61667,7 +61427,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -61823,6 +61583,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -61831,8 +61593,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -61850,7 +61610,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -61954,7 +61714,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -62081,7 +61841,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -62556,7 +62316,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -62616,7 +62376,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -62668,7 +62428,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -62860,19 +62620,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -62901,13 +62650,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -62915,14 +62664,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -63019,7 +62762,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -63133,7 +62876,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -63610,7 +63353,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -63670,7 +63413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -63722,7 +63465,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -63914,19 +63657,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -63955,13 +63687,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -63969,14 +63701,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -64073,7 +63799,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -64187,7 +63913,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -64371,7 +64097,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -65264,7 +64990,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -65395,12 +65121,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -65510,16 +65236,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -65783,7 +65509,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -65843,7 +65569,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -65895,7 +65621,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -66087,19 +65813,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -66128,13 +65843,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -66142,14 +65857,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -66246,7 +65955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -66360,7 +66069,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -66540,7 +66249,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -66557,7 +66266,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -66679,16 +66388,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -66708,7 +66423,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -66720,7 +66435,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -66744,7 +66459,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -66851,7 +66566,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -66859,7 +66574,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -66896,8 +66611,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -66905,7 +66620,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -66928,7 +66643,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -66957,7 +66672,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -67025,7 +66740,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -67047,7 +66762,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). ### Beta Response Audio Delta Event @@ -67467,7 +67182,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -67638,7 +67353,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -67742,17 +67457,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -67768,6 +67473,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -67826,7 +67541,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -67902,7 +67617,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -68263,7 +67978,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -68367,7 +68082,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -68442,7 +68157,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -68450,7 +68165,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -68480,7 +68195,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -68634,7 +68349,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -69159,7 +68874,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -69219,7 +68934,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -69271,7 +68986,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -69495,19 +69210,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -69536,13 +69240,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -69550,14 +69254,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -69772,7 +69470,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -69886,7 +69584,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -70367,7 +70065,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -70427,7 +70125,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -70479,7 +70177,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -70671,19 +70369,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -70712,13 +70399,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -70726,14 +70413,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -70830,7 +70511,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -70944,7 +70625,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -71135,7 +70816,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -71201,7 +70882,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -72010,7 +71691,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -72237,14 +71918,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -72463,7 +72144,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -72539,7 +72220,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -72635,7 +72316,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -72712,7 +72393,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -72760,7 +72441,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -72916,6 +72597,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -72924,8 +72607,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -72943,7 +72624,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -73047,7 +72728,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -73174,7 +72855,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -73649,7 +73330,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -73709,7 +73390,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -73761,7 +73442,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -73953,19 +73634,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -73994,13 +73664,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -74008,14 +73678,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -74112,7 +73776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -74226,7 +73890,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -74703,7 +74367,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -74763,7 +74427,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -74815,7 +74479,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -75007,19 +74671,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -75048,13 +74701,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -75062,14 +74715,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -75166,7 +74813,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -75280,7 +74927,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -75464,7 +75111,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -76357,7 +76004,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -76488,12 +76135,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -76603,16 +76250,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -76876,7 +76523,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -76936,7 +76583,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -76988,7 +76635,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -77180,19 +76827,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -77221,13 +76857,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -77235,14 +76871,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -77339,7 +76969,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -77453,7 +77083,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -77633,7 +77263,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -77650,7 +77280,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -77772,16 +77402,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -77801,7 +77437,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -77813,7 +77449,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -77837,7 +77473,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -77944,7 +77580,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -77952,7 +77588,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -77989,8 +77625,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -77998,7 +77634,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -78021,7 +77657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -78050,7 +77686,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -78118,7 +77754,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -78140,7 +77776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -78227,7 +77863,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -78311,7 +77947,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"explicit"` - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -78415,6 +78051,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + + - `top_logprobs: array of object { token, bytes, logprob }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + - `text: string` The text output from the model. @@ -78425,187 +78077,161 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `BetaResponseOutputRefusal object { refusal, type }` - - A refusal from the model. - - - `refusal: string` - - The refusal explanation from the model. - - - `type: "refusal"` - - The type of the refusal. Always `refusal`. - - - `"refusal"` - - - `ReasoningText object { text, type }` - - Reasoning text from the model. - - - `text: string` - - The reasoning text from the model. - - - `type: "reasoning_text"` - - The type of the reasoning text. Always `reasoning_text`. - - - `"reasoning_text"` - -### Beta Response Content Part Added Event - -- `BetaResponseContentPartAddedEvent object { content_index, item_id, output_index, 4 more }` - - Emitted when a new content part is added. - - - `content_index: number` - - The index of the content part that was added. - - - `item_id: string` - - The ID of the output item that the content part was added to. - - - `output_index: number` - - The index of the output item that the content part was added to. - - - `part: BetaResponseOutputText or BetaResponseOutputRefusal or object { text, type }` - - The content part that was added. - - - `BetaResponseOutputText object { annotations, text, type, logprobs }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `BetaResponseOutputRefusal object { refusal, type }` + + A refusal from the model. + + - `refusal: string` + + The refusal explanation from the model. + + - `type: "refusal"` + + The type of the refusal. Always `refusal`. + + - `"refusal"` + + - `ReasoningText object { text, type }` + + Reasoning text from the model. + + - `text: string` + + The reasoning text from the model. + + - `type: "reasoning_text"` + + The type of the reasoning text. Always `reasoning_text`. + + - `"reasoning_text"` + +### Beta Response Content Part Added Event + +- `BetaResponseContentPartAddedEvent object { content_index, item_id, output_index, 4 more }` + + Emitted when a new content part is added. + + - `content_index: number` + + The index of the content part that was added. + + - `item_id: string` + + The ID of the output item that the content part was added to. + + - `output_index: number` + + The index of the output item that the content part was added to. + + - `part: BetaResponseOutputText or BetaResponseOutputRefusal or object { text, type }` + + The content part that was added. + + - `BetaResponseOutputText object { annotations, logprobs, text, type }` + + A text output from the model. + + - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` + + The annotations of the text output. + + - `FileCitation object { file_id, filename, index, type }` + + A citation to a file. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the file cited. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_citation"` + + The type of the file citation. Always `file_citation`. + + - `"file_citation"` + + - `URLCitation object { end_index, start_index, title, 2 more }` + + A citation for a web resource used to generate a model response. + + - `end_index: number` + + The index of the last character of the URL citation in the message. + + - `start_index: number` + + The index of the first character of the URL citation in the message. + + - `title: string` + + The title of the web resource. + + - `type: "url_citation"` + + The type of the URL citation. Always `url_citation`. + + - `"url_citation"` + + - `url: string` + + The URL of the web resource. + + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` + + A citation for a container file used to generate a model response. + + - `container_id: string` + + The ID of the container file. + + - `end_index: number` + + The index of the last character of the container file citation in the message. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the container file cited. + + - `start_index: number` + + The index of the first character of the container file citation in the message. + + - `type: "container_file_citation"` + + The type of the container file citation. Always `container_file_citation`. + + - `"container_file_citation"` + + - `FilePath object { file_id, index, type }` + + A path to a file. + + - `file_id: string` + + The ID of the file. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_path"` + + The type of the file path. Always `file_path`. + + - `"file_path"` + + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -78621,6 +78247,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -78689,7 +78325,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -78793,17 +78429,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -78819,6 +78445,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -79021,7 +78657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -79192,7 +78828,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -79296,17 +78932,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -79322,6 +78948,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -79380,7 +79016,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -79456,7 +79092,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -79817,7 +79453,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -79921,7 +79557,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -79996,7 +79632,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -80004,7 +79640,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -80034,7 +79670,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -80188,7 +79824,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -80713,7 +80349,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -80773,7 +80409,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -80825,7 +80461,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -81049,19 +80685,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -81090,13 +80715,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -81104,14 +80729,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -81326,7 +80945,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -81440,7 +81059,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -81921,7 +81540,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -81981,7 +81600,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -82033,7 +81652,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -82225,19 +81844,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -82266,13 +81874,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -82280,14 +81888,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -82384,7 +81986,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -82498,7 +82100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -82689,7 +82291,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -82755,7 +82357,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -83564,7 +83166,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -83791,14 +83393,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -84017,7 +83619,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -84093,7 +83695,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -84189,7 +83791,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -84266,7 +83868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -84314,7 +83916,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -84470,6 +84072,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -84478,8 +84082,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -84497,7 +84099,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -84601,7 +84203,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -84728,7 +84330,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -85203,7 +84805,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -85263,7 +84865,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -85315,7 +84917,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -85507,19 +85109,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -85548,13 +85139,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -85562,14 +85153,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -85666,7 +85251,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -85780,7 +85365,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -86257,7 +85842,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -86317,7 +85902,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -86369,7 +85954,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -86561,19 +86146,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -86602,13 +86176,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -86616,14 +86190,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -86720,7 +86288,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -86834,7 +86402,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -87018,7 +86586,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -87911,7 +87479,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -88042,12 +87610,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -88157,16 +87725,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -88430,7 +87998,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -88490,7 +88058,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -88542,7 +88110,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -88734,19 +88302,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -88775,13 +88332,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -88789,14 +88346,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -88893,7 +88444,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -89007,7 +88558,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -89187,7 +88738,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -89204,7 +88755,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -89326,16 +88877,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -89355,7 +88912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -89367,7 +88924,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -89391,7 +88948,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -89498,7 +89055,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -89506,7 +89063,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -89543,8 +89100,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -89552,7 +89109,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -89575,7 +89132,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -89604,7 +89161,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -89672,7 +89229,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -89694,7 +89251,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -90020,7 +89577,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -90191,7 +89748,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -90295,17 +89852,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -90321,6 +89868,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -90379,7 +89936,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -90455,7 +90012,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -90816,7 +90373,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -90920,7 +90477,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -90995,7 +90552,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -91003,7 +90560,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -91033,7 +90590,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -91187,7 +90744,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -91712,7 +91269,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -91772,7 +91329,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -91824,7 +91381,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -92048,19 +91605,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -92089,13 +91635,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -92103,14 +91649,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -92325,7 +91865,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -92439,7 +91979,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -92920,7 +92460,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -92980,7 +92520,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -93032,7 +92572,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -93224,19 +92764,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -93265,13 +92794,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -93279,14 +92808,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -93383,7 +92906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -93497,7 +93020,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -93688,7 +93211,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -93754,7 +93277,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -94563,7 +94086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -94790,14 +94313,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -95016,7 +94539,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -95092,7 +94615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -95188,7 +94711,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -95265,7 +94788,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -95313,7 +94836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -95469,6 +94992,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -95477,8 +95002,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -95496,7 +95019,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -95600,7 +95123,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -95727,7 +95250,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -96202,7 +95725,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -96262,7 +95785,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -96314,7 +95837,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -96506,19 +96029,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -96547,13 +96059,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -96561,14 +96073,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -96665,7 +96171,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -96779,7 +96285,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -97256,7 +96762,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -97316,7 +96822,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -97368,7 +96874,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -97560,19 +97066,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -97601,13 +97096,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -97615,14 +97110,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -97719,7 +97208,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -97833,7 +97322,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -98017,7 +97506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -98910,7 +98399,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -99041,12 +98530,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -99156,16 +98645,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -99429,7 +98918,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -99489,7 +98978,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -99541,7 +99030,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -99733,19 +99222,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -99774,13 +99252,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -99788,14 +99266,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -99892,7 +99364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -100006,7 +99478,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -100186,7 +99658,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -100203,7 +99675,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -100325,16 +99797,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -100354,7 +99832,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -100366,7 +99844,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -100390,7 +99868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -100497,7 +99975,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -100505,7 +99983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -100542,8 +100020,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -100551,7 +100029,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -100574,7 +100052,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -100603,7 +100081,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -100671,7 +100149,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -100693,7 +100171,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -100817,7 +100295,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -100840,7 +100318,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -100869,7 +100347,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -100889,7 +100367,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -100918,7 +100396,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). ### Beta Response Function Call Arguments Delta Event @@ -100994,238 +100472,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. -### Beta Response Function Call Output Item - -- `BetaResponseFunctionCallOutputItem = BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` - - A piece of message content, such as text, an image, or a file. - - - `BetaResponseInputTextContent object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `text: string` - - The text input to the model. - - - `type: "input_text"` - - The type of the input item. Always `input_text`. - - - `"input_text"` - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputFileContent object { type, detail, file_data, 4 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "auto" or "low" or "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`. - - - `"auto"` - - - `"low"` - - - `"high"` - - - `file_data: optional string` - - The base64-encoded data of the file to be sent to the model. - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `file_url: optional string` - - The URL of the file to be sent to the model. - - - `filename: optional string` - - The name of the file to be sent to the model. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - -### Beta Response Function Call Output Item List - -- `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` - - An array of content outputs (text, image, file) for the function tool call. - - - `BetaResponseInputTextContent object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `text: string` - - The text input to the model. - - - `type: "input_text"` - - The type of the input item. Always `input_text`. - - - `"input_text"` - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputFileContent object { type, detail, file_data, 4 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "auto" or "low" or "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`. - - - `"auto"` - - - `"low"` - - - `"high"` - - - `file_data: optional string` - - The base64-encoded data of the file to be sent to the model. - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `file_url: optional string` - - The URL of the file to be sent to the model. - - - `filename: optional string` - - The name of the file to be sent to the model. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - ### Beta Response Function Shell Call Output Content - `BetaResponseFunctionShellCallOutputContent object { outcome, stderr, stdout }` @@ -101550,7 +100796,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -101721,7 +100967,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -101825,17 +101071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -101851,6 +101087,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -101909,7 +101155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -101985,7 +101231,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -102346,7 +101592,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -102450,7 +101696,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -102525,7 +101771,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -102533,7 +101779,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -102563,7 +101809,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -102717,7 +101963,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -103242,7 +102488,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -103302,7 +102548,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -103354,7 +102600,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -103578,19 +102824,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -103619,13 +102854,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -103633,14 +102868,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -103855,7 +103084,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -103969,7 +103198,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -104450,7 +103679,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -104510,7 +103739,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -104562,7 +103791,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -104754,19 +103983,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -104795,13 +104013,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -104809,14 +104027,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -104913,7 +104125,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -105027,7 +104239,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -105218,7 +104430,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -105284,7 +104496,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -106093,7 +105305,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -106320,14 +105532,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -106546,7 +105758,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -106622,7 +105834,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -106718,7 +105930,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -106795,7 +106007,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -106843,7 +106055,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -106999,6 +106211,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -107007,8 +106221,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -107026,7 +106238,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -107130,7 +106342,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -107257,7 +106469,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -107732,7 +106944,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -107792,7 +107004,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -107844,7 +107056,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -108036,19 +107248,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -108077,13 +107278,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -108091,14 +107292,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -108195,7 +107390,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -108309,7 +107504,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -108786,7 +107981,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -108846,7 +108041,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -108898,7 +108093,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -109090,19 +108285,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -109131,13 +108315,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -109145,14 +108329,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -109249,7 +108427,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -109363,7 +108541,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -109547,7 +108725,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -110440,7 +109618,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -110571,12 +109749,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -110686,16 +109864,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -110959,7 +110137,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -111019,7 +110197,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -111071,7 +110249,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -111263,19 +110441,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -111304,13 +110471,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -111318,14 +110485,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -111422,7 +110583,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -111536,7 +110697,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -111716,7 +110877,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -111733,7 +110894,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -111855,16 +111016,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -111884,7 +111051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -111896,7 +111063,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -111920,7 +111087,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -112027,7 +111194,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -112035,7 +111202,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -112072,8 +111239,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -112081,7 +111248,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -112104,7 +111271,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -112133,7 +111300,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -112201,7 +111368,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -112223,7 +111390,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -112420,7 +111587,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -112591,7 +111758,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -112695,17 +111862,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -112721,6 +111878,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -112779,7 +111946,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -112855,7 +112022,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -113216,7 +112383,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -113320,7 +112487,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -113395,7 +112562,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -113403,7 +112570,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -113433,7 +112600,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -113587,7 +112754,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -114112,7 +113279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -114172,7 +113339,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -114224,7 +113391,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -114448,19 +113615,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -114489,13 +113645,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -114503,14 +113659,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -114725,7 +113875,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -114839,7 +113989,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -115320,7 +114470,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -115380,7 +114530,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -115432,7 +114582,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -115624,19 +114774,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -115665,13 +114804,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -115679,14 +114818,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -115783,7 +114916,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -115897,7 +115030,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -116088,7 +115221,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -116154,7 +115287,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -116963,7 +116096,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -117190,14 +116323,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -117416,7 +116549,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -117492,7 +116625,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -117588,7 +116721,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -117665,7 +116798,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -117713,7 +116846,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -117869,6 +117002,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -117877,8 +117012,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -117896,7 +117029,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -118000,7 +117133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -118127,7 +117260,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -118602,7 +117735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -118662,7 +117795,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -118714,7 +117847,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -118906,19 +118039,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -118947,13 +118069,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -118961,14 +118083,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -119065,7 +118181,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -119179,7 +118295,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -119656,7 +118772,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -119716,7 +118832,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -119768,7 +118884,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -119960,19 +119076,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -120001,13 +119106,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -120015,14 +119120,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -120119,7 +119218,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -120233,7 +119332,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -120417,7 +119516,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -121195,378 +120294,4620 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `id: string` - The unique ID of the approval response + The unique ID of the approval response + + - `approval_request_id: string` + + The ID of the approval request being answered. + + - `approve: boolean` + + Whether the request was approved. + + - `type: "mcp_approval_response"` + + The type of the item. Always `mcp_approval_response`. + + - `"mcp_approval_response"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `reason: optional string` + + Optional reason for the decision. + + - `CustomToolCall object { call_id, input, name, 5 more }` + + A call to a custom tool created by the model. + + - `call_id: string` + + An identifier used to map this custom tool call to a tool call output. + + - `input: string` + + The input for the custom tool call generated by the model. + + - `name: string` + + The name of the custom tool being called. + + - `type: "custom_tool_call"` + + The type of the custom tool call. Always `custom_tool_call`. + + - `"custom_tool_call"` + + - `id: optional string` + + The unique ID of the custom tool call in the OpenAI platform. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. + + - `Direct object { type }` + + - `type: "direct"` + + - `"direct"` + + - `Program object { caller_id, type }` + + - `caller_id: string` + + The call ID of the program item that produced this tool call. + + - `type: "program"` + + - `"program"` + + - `namespace: optional string` + + The namespace of the custom tool being called. + + - `CustomToolCallOutput object { id, call_id, output, 5 more }` + + - `id: string` + + The unique ID of the custom tool call output item. + + - `call_id: string` + + The call ID, used to map this custom tool call output to a custom tool call. + + - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + + The output from the custom tool call generated by your code. + Can be a string or an list of output content. + + - `StringOutput = string` + + A string of the output of the custom tool call. + + - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + + Text, image, or file output of the custom tool call. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `status: "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: "custom_tool_call_output"` + + The type of the custom tool call output. Always `custom_tool_call_output`. + + - `"custom_tool_call_output"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. + + - `Direct object { type }` + + - `type: "direct"` + + The caller type. Always `direct`. + + - `"direct"` + + - `Program object { caller_id, type }` + + - `caller_id: string` + + The call ID of the program item that produced this tool call. + + - `type: "program"` + + The caller type. Always `program`. + + - `"program"` + + - `created_by: optional string` + + The identifier of the actor that created the item. + + - `parallel_tool_calls: boolean` + + Whether to allow the model to run tool calls in parallel. + + - `temperature: number` + + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + We generally recommend altering this or `top_p` but not both. + + - `tool_choice: BetaToolChoiceOptions or BetaToolChoiceAllowed or BetaToolChoiceTypes or 6 more` + + How the model should select which tool (or tools) to use when generating + a response. See the `tools` parameter to see how to specify which tools + the model can call. + + - `BetaToolChoiceOptions = "none" or "auto" or "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. + + - `"none"` + + - `"auto"` + + - `"required"` + + - `BetaToolChoiceAllowed object { mode, tools, type }` + + Constrains the tools available to the model to a pre-defined set. + + - `mode: "auto" or "required"` + + Constrains the tools available to the model to a pre-defined set. + + `auto` allows the model to pick from among the allowed tools and generate a + message. + + `required` requires the model to call one or more of the allowed tools. + + - `"auto"` + + - `"required"` + + - `tools: array of map[unknown]` + + A list of tool definitions that the model should be allowed to call. + + For the Responses API, the list of tool definitions might look like: + + ```json + [ + { "type": "function", "name": "get_weather" }, + { "type": "mcp", "server_label": "deepwiki" }, + { "type": "image_generation" } + ] + ``` + + - `type: "allowed_tools"` + + Allowed tool configuration type. Always `allowed_tools`. + + - `"allowed_tools"` + + - `BetaToolChoiceTypes object { type }` + + Indicates that the model should use a built-in tool to generate a response. + [Learn more about built-in tools](/docs/guides/tools). + + - `type: "file_search" or "web_search_preview" or "computer" or 5 more` + + The type of hosted tool the model should to use. Learn more about + [built-in tools](/docs/guides/tools). + + Allowed values are: + + - `file_search` + - `web_search_preview` + - `computer` + - `computer_use_preview` + - `computer_use` + - `code_interpreter` + - `image_generation` + + - `"file_search"` + + - `"web_search_preview"` + + - `"computer"` + + - `"computer_use_preview"` + + - `"computer_use"` + + - `"web_search_preview_2025_03_11"` + + - `"image_generation"` + + - `"code_interpreter"` + + - `BetaToolChoiceFunction object { name, type }` + + Use this option to force the model to call a specific function. + + - `name: string` + + The name of the function to call. + + - `type: "function"` + + For function calling, the type is always `function`. + + - `"function"` + + - `BetaToolChoiceMcp object { server_label, type, name }` + + Use this option to force the model to call a specific tool on a remote MCP server. + + - `server_label: string` + + The label of the MCP server to use. + + - `type: "mcp"` + + For MCP tools, the type is always `mcp`. + + - `"mcp"` + + - `name: optional string` + + The name of the tool to call on the server. + + - `BetaToolChoiceCustom object { name, type }` + + Use this option to force the model to call a specific custom tool. + + - `name: string` + + The name of the custom tool to call. + + - `type: "custom"` + + For custom tool calling, the type is always `custom`. + + - `"custom"` + + - `BetaSpecificProgrammaticToolCallingParam object { type }` + + - `type: "programmatic_tool_calling"` + + The tool to call. Always `programmatic_tool_calling`. + + - `"programmatic_tool_calling"` + + - `BetaToolChoiceApplyPatch object { type }` + + Forces the model to call the apply_patch tool when executing a tool call. + + - `type: "apply_patch"` + + The tool to call. Always `apply_patch`. + + - `"apply_patch"` + + - `BetaToolChoiceShell object { type }` + + Forces the model to call the shell tool when a tool call is required. + + - `type: "shell"` + + The tool to call. Always `shell`. + + - `"shell"` + + - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` + + An array of tools the model may call while generating a response. You + can specify which tool to use by setting the `tool_choice` parameter. + + We support the following categories of tools: + + - **Built-in tools**: Tools that are provided by OpenAI that extend the + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). + - **MCP Tools**: Integrations with third-party systems via custom MCP servers + or predefined connectors such as Google Drive and SharePoint. Learn more about + [MCP Tools](/docs/guides/tools-connectors-mcp). + - **Function calls (custom tools)**: Functions that are defined by you, + enabling the model to call your own code with strongly typed arguments + and outputs. Learn more about + [function calling](/docs/guides/function-calling). You can also use + custom tools to call your own code. + + - `Function object { name, parameters, strict, 5 more }` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `name: string` + + The name of the function to call. + + - `parameters: map[unknown]` + + A JSON schema object describing the parameters of the function. + + - `strict: boolean` + + Whether strict parameter validation is enforced for this function tool. + + - `type: "function"` + + The type of the function tool. Always `function`. + + - `"function"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this function is deferred and loaded via tool search. + + - `description: optional string` + + A description of the function. Used by the model to determine whether or not to call the function. + + - `output_schema: optional map[unknown]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + + - `FileSearch object { type, vector_store_ids, filters, 2 more }` + + A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + + - `type: "file_search"` + + The type of the file search tool. Always `file_search`. + + - `"file_search"` + + - `vector_store_ids: array of string` + + The IDs of the vector stores to search. + + - `filters: optional object { key, type, value } or object { filters, type }` + + A filter to apply. + + - `ComparisonFilter object { key, type, value }` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `key: string` + + The key to compare against the value. + + - `type: "eq" or "ne" or "gt" or 5 more` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `"eq"` + + - `"ne"` + + - `"gt"` + + - `"gte"` + + - `"lt"` + + - `"lte"` + + - `"in"` + + - `"nin"` + + - `value: string or number or boolean or array of string or number` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `number` + + - `boolean` + + - `array of string or number` + + - `string` + + - `number` + + - `CompoundFilter object { filters, type }` + + Combine multiple filters using `and` or `or`. + + - `filters: array of object { key, type, value } or unknown` + + Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + + - `ComparisonFilter object { key, type, value }` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `key: string` + + The key to compare against the value. + + - `type: "eq" or "ne" or "gt" or 5 more` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `"eq"` + + - `"ne"` + + - `"gt"` + + - `"gte"` + + - `"lt"` + + - `"lte"` + + - `"in"` + + - `"nin"` + + - `value: string or number or boolean or array of string or number` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `number` + + - `boolean` + + - `array of string or number` + + - `string` + + - `number` + + - `unknown` + + - `type: "and" or "or"` + + Type of operation: `and` or `or`. + + - `"and"` + + - `"or"` + + - `max_num_results: optional number` + + The maximum number of results to return. This number should be between 1 and 50 inclusive. + + - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` + + Ranking options for search. + + - `hybrid_search: optional object { embedding_weight, text_weight }` + + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + + - `embedding_weight: number` + + The weight of the embedding in the reciprocal ranking fusion. + + - `text_weight: number` + + The weight of the text in the reciprocal ranking fusion. + + - `ranker: optional "auto" or "default-2024-11-15"` + + The ranker to use for the file search. + + - `"auto"` + + - `"default-2024-11-15"` + + - `score_threshold: optional number` + + The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. + + - `Computer object { type }` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type: "computer"` + + The type of the computer tool. Always `computer`. + + - `"computer"` + + - `ComputerUsePreview object { display_height, display_width, environment, type }` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `display_height: number` + + The height of the computer display. + + - `display_width: number` + + The width of the computer display. + + - `environment: "windows" or "mac" or "linux" or 2 more` + + The type of computer environment to control. + + - `"windows"` + + - `"mac"` + + - `"linux"` + + - `"ubuntu"` + + - `"browser"` + + - `type: "computer_use_preview"` + + The type of the computer use tool. Always `computer_use_preview`. + + - `"computer_use_preview"` + + - `WebSearch object { type, filters, search_context_size, user_location }` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](/docs/guides/tools-web-search). + + - `type: "web_search" or "web_search_2025_08_26"` + + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + + - `"web_search"` + + - `"web_search_2025_08_26"` + + - `filters: optional object { allowed_domains }` + + Filters for the search. + + - `allowed_domains: optional array of string` + + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. + + Example: `["pubmed.ncbi.nlm.nih.gov"]` + + - `search_context_size: optional "low" or "medium" or "high"` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `user_location: optional object { city, country, region, 2 more }` + + The approximate location of the user. + + - `city: optional string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `country: optional string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `region: optional string` + + Free text input for the region of the user, e.g. `California`. + + - `timezone: optional string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `type: optional "approximate"` + + The type of location approximation. Always `approximate`. + + - `"approximate"` + + - `Mcp object { server_label, type, allowed_callers, 9 more }` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). + + - `server_label: string` + + A label for this MCP server, used to identify it in tool calls. + + - `type: "mcp"` + + The type of the MCP tool. Always `mcp`. + + - `"mcp"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `allowed_tools: optional array of string or object { read_only, tool_names }` + + List of allowed tool names or a filter object. + + - `McpAllowedTools = array of string` + + A string array of allowed tool names + + - `McpToolFilter object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `authorization: optional string` + + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. + + - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` + + Identifier for service connectors, like those available in ChatGPT. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). + + Currently supported `connector_id` values are: + + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` + + - `"connector_dropbox"` + + - `"connector_gmail"` + + - `"connector_googlecalendar"` + + - `"connector_googledrive"` + + - `"connector_microsoftteams"` + + - `"connector_outlookcalendar"` + + - `"connector_outlookemail"` + + - `"connector_sharepoint"` + + - `defer_loading: optional boolean` + + Whether this MCP tool is deferred and discovered via tool search. + + - `headers: optional map[string]` + + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. + + - `require_approval: optional object { always, never } or "always" or "never"` + + Specify which of the MCP server's tools require approval. + + - `McpToolApprovalFilter object { always, never }` + + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. + + - `always: optional object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `never: optional object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `McpToolApprovalSetting = "always" or "never"` + + Specify a single approval policy for all tools. One of `always` or + `never`. When set to `always`, all tools will require approval. When + set to `never`, all tools will not require approval. + + - `"always"` + + - `"never"` + + - `server_description: optional string` + + Optional description of the MCP server, used to provide more context. + + - `server_url: optional string` + + The URL for the MCP server. One of `server_url`, `connector_id`, or + `tunnel_id` must be provided. + + - `tunnel_id: optional string` + + The Secure MCP Tunnel ID to use instead of a direct server URL. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. + + - `CodeInterpreter object { container, type, allowed_callers }` + + A tool that runs Python code to help generate a response to a prompt. + + - `container: string or object { type, file_ids, memory_limit, network_policy }` + + The code interpreter container. Can be a container ID or an object that + specifies uploaded file IDs to make available to your code, along with an + optional `memory_limit` setting. + + - `string` + + The container ID. + + - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }` + + Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. + + - `type: "auto"` + + Always `auto`. + + - `"auto"` + + - `file_ids: optional array of string` + + An optional list of uploaded files to make available to your code. + + - `memory_limit: optional "1g" or "4g" or "16g" or "64g"` + + The memory limit for the code interpreter container. + + - `"1g"` + + - `"4g"` + + - `"16g"` + + - `"64g"` + + - `network_policy: optional BetaContainerNetworkPolicyDisabled or BetaContainerNetworkPolicyAllowlist` + + Network access policy for the container. + + - `BetaContainerNetworkPolicyDisabled object { type }` + + - `BetaContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` + + - `type: "code_interpreter"` + + The type of the code interpreter tool. Always `code_interpreter`. + + - `"code_interpreter"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `ProgrammaticToolCalling object { type }` + + - `type: "programmatic_tool_calling"` + + The type of the tool. Always `programmatic_tool_calling`. + + - `"programmatic_tool_calling"` + + - `ImageGeneration object { type, action, background, 9 more }` + + A tool that generates images using the GPT image models. + + - `type: "image_generation"` + + The type of the image generation tool. Always `image_generation`. + + - `"image_generation"` + + - `action: optional "generate" or "edit" or "auto"` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `"generate"` + + - `"edit"` + + - `"auto"` + + - `background: optional "transparent" or "opaque" or "auto"` + + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. + + - `"transparent"` + + - `"opaque"` + + - `"auto"` + + - `input_fidelity: optional "high" or "low"` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `"high"` + + - `"low"` + + - `input_image_mask: optional object { file_id, image_url }` + + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). + + - `file_id: optional string` + + File ID for the mask image. + + - `image_url: optional string` + + Base64-encoded mask image. + + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `string` + + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `"gpt-image-1"` + + - `"gpt-image-1-mini"` + + - `"gpt-image-1.5"` + + - `moderation: optional "auto" or "low"` + + Moderation level for the generated image. Default: `auto`. + + - `"auto"` + + - `"low"` + + - `output_compression: optional number` + + Compression level for the output image. Default: 100. + + - `output_format: optional "png" or "webp" or "jpeg"` + + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. + + - `"png"` + + - `"webp"` + + - `"jpeg"` + + - `partial_images: optional number` + + Number of partial images to generate in streaming mode, from 0 (default value) to 3. + + - `quality: optional "low" or "medium" or "high" or "auto"` + + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"auto"` + + - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `string` + + - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `"1024x1024"` + + - `"1024x1536"` + + - `"1536x1024"` + + - `"auto"` + + - `LocalShell object { type }` + + A tool that allows the model to execute shell commands in a local environment. + + - `type: "local_shell"` + + The type of the local shell tool. Always `local_shell`. + + - `"local_shell"` + + - `Shell object { type, allowed_callers, environment }` + + A tool that allows the model to execute shell commands. + + - `type: "shell"` + + The type of the shell tool. Always `shell`. + + - `"shell"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `environment: optional BetaContainerAuto or BetaLocalEnvironment or BetaContainerReference` + + - `BetaContainerAuto object { type, file_ids, memory_limit, 2 more }` + + - `BetaLocalEnvironment object { type, skills }` + + - `BetaContainerReference object { container_id, type }` + + - `Custom object { name, type, allowed_callers, 3 more }` + + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + + - `name: string` + + The name of the custom tool, used to identify it in tool calls. + + - `type: "custom"` + + The type of the custom tool. Always `custom`. + + - `"custom"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this tool should be deferred and discovered via tool search. + + - `description: optional string` + + Optional description of the custom tool, used to provide more context. + + - `format: optional object { type } or object { definition, syntax, type }` + + The input format for the custom tool. Default is unconstrained text. + + - `Text object { type }` + + Unconstrained free-form text. + + - `type: "text"` + + Unconstrained text format. Always `text`. + + - `"text"` + + - `Grammar object { definition, syntax, type }` + + A grammar defined by the user. + + - `definition: string` + + The grammar definition. + + - `syntax: "lark" or "regex"` + + The syntax of the grammar definition. One of `lark` or `regex`. + + - `"lark"` + + - `"regex"` + + - `type: "grammar"` + + Grammar format. Always `grammar`. + + - `"grammar"` + + - `Namespace object { description, name, tools, type }` + + Groups function/custom tools under a shared namespace. + + - `description: string` + + A description of the namespace shown to the model. + + - `name: string` + + The namespace name used in tool calls (for example, `crm`). + + - `tools: array of object { name, type, allowed_callers, 5 more } or object { name, type, allowed_callers, 3 more }` + + The function/custom tools available inside this namespace. + + - `Function object { name, type, allowed_callers, 5 more }` + + - `name: string` + + - `type: "function"` + + - `"function"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this function should be deferred and discovered via tool search. + + - `description: optional string` + + - `output_schema: optional map[unknown]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + + - `parameters: optional unknown` + + - `strict: optional boolean` + + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + + - `Custom object { name, type, allowed_callers, 3 more }` + + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + + - `name: string` + + The name of the custom tool, used to identify it in tool calls. + + - `type: "custom"` + + The type of the custom tool. Always `custom`. + + - `"custom"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this tool should be deferred and discovered via tool search. + + - `description: optional string` + + Optional description of the custom tool, used to provide more context. + + - `format: optional object { type } or object { definition, syntax, type }` + + The input format for the custom tool. Default is unconstrained text. + + - `Text object { type }` + + Unconstrained free-form text. + + - `type: "text"` + + Unconstrained text format. Always `text`. + + - `"text"` + + - `Grammar object { definition, syntax, type }` + + A grammar defined by the user. + + - `definition: string` + + The grammar definition. + + - `syntax: "lark" or "regex"` + + The syntax of the grammar definition. One of `lark` or `regex`. + + - `"lark"` + + - `"regex"` + + - `type: "grammar"` + + Grammar format. Always `grammar`. + + - `"grammar"` + + - `type: "namespace"` + + The type of the tool. Always `namespace`. + + - `"namespace"` + + - `ToolSearch object { type, description, execution, parameters }` + + Hosted or BYOT tool search configuration for deferred tools. + + - `type: "tool_search"` + + The type of the tool. Always `tool_search`. + + - `"tool_search"` + + - `description: optional string` + + Description shown to the model for a client-executed tool search tool. + + - `execution: optional "server" or "client"` + + Whether tool search is executed by the server or by the client. + + - `"server"` + + - `"client"` + + - `parameters: optional unknown` + + Parameter schema for a client-executed tool search tool. + + - `WebSearchPreview object { 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](https://platform.openai.com/docs/guides/tools-web-search). + + - `type: "web_search_preview" or "web_search_preview_2025_03_11"` + + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. + + - `"web_search_preview"` + + - `"web_search_preview_2025_03_11"` + + - `search_content_types: optional array of "text" or "image"` + + - `"text"` + + - `"image"` + + - `search_context_size: optional "low" or "medium" or "high"` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `user_location: optional object { type, city, country, 2 more }` + + The user's location. + + - `type: "approximate"` + + The type of location approximation. Always `approximate`. + + - `"approximate"` + + - `city: optional string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `country: optional string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `region: optional string` + + Free text input for the region of the user, e.g. `California`. + + - `timezone: optional string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `ApplyPatch object { type, allowed_callers }` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `type: "apply_patch"` + + The type of the tool. Always `apply_patch`. + + - `"apply_patch"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `top_p: number` + + An alternative to sampling with temperature, called nucleus sampling, + where the model considers the results of the tokens with top_p probability + mass. So 0.1 means only the tokens comprising the top 10% probability mass + are considered. + + We generally recommend altering this or `temperature` but not both. + + - `background: optional boolean` + + Whether to run the model response in the background. + [Learn more](/docs/guides/background). + + - `completed_at: optional number` + + Unix timestamp (in seconds) of when this Response was completed. + Only present when the status is `completed`. + + - `conversation: optional object { id }` + + The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. + + - `id: string` + + The unique ID of the conversation that this response was associated with. + + - `max_output_tokens: optional number` + + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). + + - `max_tool_calls: optional number` + + The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. + + - `moderation: optional object { input, output }` + + Moderation results for the response input and output, if moderated completions were requested. + + - `input: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` + + Moderation for the response input. + + - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }` + + A moderation result produced for the response input or output. + + - `categories: map[boolean]` + + A dictionary of moderation categories to booleans, True if the input is flagged under this category. + + - `category_applied_input_types: map[array of "text" or "image"]` + + Which modalities of input are reflected by the score for each category. + + - `"text"` + + - `"image"` + + - `category_scores: map[number]` + + A dictionary of moderation categories to scores. + + - `flagged: boolean` + + A boolean indicating whether the content was flagged by any category. + + - `model: string` + + The moderation model that produced this result. + + - `type: "moderation_result"` + + The object type, which was always `moderation_result` for successful moderation results. + + - `"moderation_result"` + + - `Error object { code, message, type }` + + An error produced while attempting moderation for the response input or output. + + - `code: string` + + The error code. + + - `message: string` + + The error message. + + - `type: "error"` + + The object type, which was always `error` for moderation failures. + + - `"error"` + + - `output: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` + + Moderation for the response output. + + - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }` + + A moderation result produced for the response input or output. + + - `categories: map[boolean]` + + A dictionary of moderation categories to booleans, True if the input is flagged under this category. + + - `category_applied_input_types: map[array of "text" or "image"]` + + Which modalities of input are reflected by the score for each category. + + - `"text"` + + - `"image"` + + - `category_scores: map[number]` + + A dictionary of moderation categories to scores. + + - `flagged: boolean` + + A boolean indicating whether the content was flagged by any category. + + - `model: string` + + The moderation model that produced this result. + + - `type: "moderation_result"` + + The object type, which was always `moderation_result` for successful moderation results. + + - `"moderation_result"` + + - `Error object { code, message, type }` + + An error produced while attempting moderation for the response input or output. + + - `code: string` + + The error code. + + - `message: string` + + The error message. + + - `type: "error"` + + The object type, which was always `error` for moderation failures. + + - `"error"` + + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + + - `previous_response_id: optional string` + + The unique ID of the previous response to the model. Use this to + create multi-turn conversations. Learn more about + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + + - `prompt: optional BetaResponsePrompt` + + Reference to a prompt template and its variables. + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). + + - `id: string` + + The unique identifier of the prompt template to use. + + - `variables: optional map[string or BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile]` + + Optional map of values to substitute in for variables in your + prompt. The substitution values can either be strings, or other + Response input types like images or files. + + - `string` + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `version: optional string` + + Optional version of the prompt template. + + - `prompt_cache_key: optional string` + + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). + + - `prompt_cache_options: optional object { mode, ttl }` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `mode: "implicit" or "explicit"` + + Whether implicit prompt-cache breakpoints were enabled. + + - `"implicit"` + + - `"explicit"` + + - `ttl: "30m"` + + The minimum lifetime applied to each cache breakpoint. + + - `"30m"` + + - `prompt_cache_retention: optional "in_memory" or "24h"` + + Deprecated. Use `prompt_cache_options.ttl` instead. + + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. + For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. + + For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: + + - Organizations without ZDR enabled default to `24h`. + - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified. + + - `"in_memory"` + + - `"24h"` + + - `reasoning: optional object { context, effort, generate_summary, 2 more }` + + **gpt-5 and o-series models only** + + Configuration options for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). + + - `context: optional "auto" or "current_turn" or "all_turns"` + + Controls which reasoning items are rendered back to the model on later turns. + When returned on a response, this is the effective reasoning context mode + used for the response. + + - `"auto"` + + - `"current_turn"` + + - `"all_turns"` + + - `effort: optional "none" or "minimal" or "low" or 4 more` + + Constrains effort on reasoning for reasoning models. Currently supported + values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. + Reducing reasoning effort can result in faster responses and fewer tokens + used on reasoning in a response. Not all reasoning models support every + value. See the + [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. + + - `"none"` + + - `"minimal"` + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `generate_summary: optional "auto" or "concise" or "detailed"` + + **Deprecated:** use `summary` instead. + + A summary of the reasoning performed by the model. This can be + useful for debugging and understanding the model's reasoning process. + One of `auto`, `concise`, or `detailed`. + + - `"auto"` + + - `"concise"` + + - `"detailed"` + + - `mode: optional string or "standard" or "pro"` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `string` + + - `"standard" or "pro"` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `"standard"` + + - `"pro"` + + - `summary: optional "auto" or "concise" or "detailed"` + + A summary of the reasoning performed by the model. This can be + useful for debugging and understanding the model's reasoning process. + One of `auto`, `concise`, or `detailed`. + + `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. + + - `"auto"` + + - `"concise"` + + - `"detailed"` + + - `safety_identifier: optional string` + + A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). + + - `service_tier: optional "auto" or "default" or "flex" or 2 more` + + 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](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - 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. + + - `"auto"` + + - `"default"` + + - `"flex"` + + - `"scale"` + + - `"priority"` + + - `status: optional BetaResponseStatus` + + The status of the response generation. One of `completed`, `failed`, + `in_progress`, `cancelled`, `queued`, or `incomplete`. + + - `"completed"` + + - `"failed"` + + - `"in_progress"` + + - `"cancelled"` + + - `"queued"` + + - `"incomplete"` + + - `text: optional BetaResponseTextConfig` + + Configuration options for a text response from the model. Can be plain + text or structured JSON data. Learn more: + + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) + + - `format: optional BetaResponseFormatTextConfig` + + 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](/docs/guides/structured-outputs). + + 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. + + - `Text object { type }` + + Default response format. Used to generate text responses. + + - `type: "text"` + + The type of response format being defined. Always `text`. + + - `"text"` + + - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` + + JSON Schema response format. Used to generate structured JSON responses. + Learn more about [Structured Outputs](/docs/guides/structured-outputs). + + - `name: string` + + The name of the response format. Must be a-z, A-Z, 0-9, or contain + underscores and dashes, with a maximum length of 64. + + - `schema: map[unknown]` + + The schema for the response format, described as a JSON Schema object. + Learn how to build JSON schemas [here](https://json-schema.org/). + + - `type: "json_schema"` + + The type of response format being defined. Always `json_schema`. + + - `"json_schema"` + + - `description: optional string` + + A description of what the response format is for, used by the model to + determine how to respond in the format. + + - `strict: optional boolean` + + Whether to enable strict schema adherence when generating the output. + If set to true, the model will always follow the exact schema defined + in the `schema` field. Only a subset of JSON Schema is supported when + `strict` is `true`. To learn more, read the [Structured Outputs + guide](/docs/guides/structured-outputs). + + - `JSONObject object { type }` + + JSON object response format. An older method of generating JSON responses. + Using `json_schema` is recommended for models that support it. Note that the + model will not generate JSON without a system or user message instructing it + to do so. + + - `type: "json_object"` + + The type of response format being defined. Always `json_object`. + + - `"json_object"` + + - `verbosity: optional "low" or "medium" or "high"` + + Constrains the verbosity of the model's response. Lower values will result in + more concise responses, while higher values will result in more verbose responses. + Currently supported values are `low`, `medium`, and `high`. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `top_logprobs: optional number` + + An integer between 0 and 20 specifying the maximum number of most likely + tokens to return at each token position, each with an associated log + probability. In some cases, the number of returned tokens may be fewer than + requested. + + - `truncation: optional "auto" or "disabled"` + + The truncation strategy to use for the model response. + + - `auto`: If the input to this Response exceeds + the model's context window size, the model will truncate the + response to fit the context window by dropping items from the beginning of the conversation. + - `disabled` (default): If the input size will exceed the context window + size for a model, the request will fail with a 400 error. + + - `"auto"` + + - `"disabled"` + + - `usage: optional BetaResponseUsage` + + Represents token usage details including input tokens, output tokens, + a breakdown of output tokens, and the total tokens used. + + - `input_tokens: number` + + The number of input tokens. + + - `input_tokens_details: object { cache_write_tokens, cached_tokens }` + + A detailed breakdown of the input tokens. + + - `cache_write_tokens: number` + + The number of input tokens that were written to the cache. + + - `cached_tokens: number` + + The number of tokens that were retrieved from the cache. + [More on prompt caching](/docs/guides/prompt-caching). + + - `output_tokens: number` + + The number of output tokens. + + - `output_tokens_details: object { reasoning_tokens }` + + A detailed breakdown of the output tokens. + + - `reasoning_tokens: number` + + The number of reasoning tokens. + + - `total_tokens: number` + + The total number of tokens used. + + - `user: optional string` + + This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. + A stable identifier for your end-users. + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). + + - `sequence_number: number` + + The sequence number of this event. + + - `type: "response.incomplete"` + + The type of the event. Always `response.incomplete`. + + - `"response.incomplete"` + + - `agent: optional object { agent_name }` + + The agent that owns this multi-agent streaming event. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + +### Beta Response Inject Created Event + +- `BetaResponseInjectCreatedEvent object { response_id, sequence_number, type, stream_id }` + + Emitted when all injected input items were validated and committed to the + active response. + + - `response_id: string` + + The ID of the response that accepted the input. + + - `sequence_number: number` + + The sequence number for this event. + + - `type: "response.inject.created"` + + The event discriminator. Always `response.inject.created`. + + - `"response.inject.created"` + + - `stream_id: optional string` + + The multiplexed WebSocket stream that emitted the event. This field is + present only when WebSocket multiplexing is enabled separately. + +### Beta Response Inject Event + +- `BetaResponseInjectEvent object { input, response_id, type }` + + Injects input items into an active response over a WebSocket connection. + The items are validated and committed atomically. Currently, the server + accepts client-owned tool outputs that resume a waiting agent. + + - `input: array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + + Input items to inject into the active response. + + - `BetaEasyInputMessage object { 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. + + - `content: string or BetaResponseInputMessageContentList` + + Text, image, or audio input to the model, used to generate a response. + Can also contain previous assistant responses. + + - `TextInput = string` + + A text input to the model. + + - `BetaResponseInputMessageContentList = array of BetaResponseInputContent` + + A list of one or many input items to the model, containing different content + types. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `text: string` + + The text input to the model. + + - `type: "input_text"` + + The type of the input item. Always `input_text`. + + - `"input_text"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `detail: "low" or "high" or "auto" or "original"` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `type: "input_image"` + + The type of the input item. Always `input_image`. + + - `"input_image"` + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `image_url: optional string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `type: "input_file"` + + The type of the input item. Always `input_file`. + + - `"input_file"` + + - `detail: optional "auto" or "low" or "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`. + + - `"auto"` + + - `"low"` + + - `"high"` + + - `file_data: optional string` + + The content of the file to be sent to the model. + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `file_url: optional string` + + The URL of the file to be sent to the model. + + - `filename: optional string` + + The name of the file to be sent to the model. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `role: "user" or "assistant" or "system" or "developer"` + + The role of the message input. One of `user`, `assistant`, `system`, or + `developer`. + + - `"user"` + + - `"assistant"` + + - `"system"` + + - `"developer"` + + - `phase: optional "commentary" or "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. + + - `"commentary"` + + - `"final_answer"` + + - `type: optional "message"` + + The type of the message input. Always `message`. + + - `"message"` + + - `Message object { content, role, agent, 2 more }` + + 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. + + - `content: BetaResponseInputMessageContentList` + + A list of one or many input items to the model, containing different content + types. + + - `role: "user" or "system" or "developer"` + + The role of the message input. One of `user`, `system`, or `developer`. + + - `"user"` + + - `"system"` + + - `"developer"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: optional "message"` + + The type of the message input. Always set to `message`. + + - `"message"` + + - `BetaResponseOutputMessage object { id, content, role, 4 more }` + + An output message from the model. + + - `id: string` + + The unique ID of the output message. + + - `content: array of BetaResponseOutputText or BetaResponseOutputRefusal` + + The content of the output message. + + - `BetaResponseOutputText object { annotations, logprobs, text, type }` + + A text output from the model. + + - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` + + The annotations of the text output. + + - `FileCitation object { file_id, filename, index, type }` + + A citation to a file. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the file cited. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_citation"` + + The type of the file citation. Always `file_citation`. + + - `"file_citation"` + + - `URLCitation object { end_index, start_index, title, 2 more }` + + A citation for a web resource used to generate a model response. + + - `end_index: number` + + The index of the last character of the URL citation in the message. + + - `start_index: number` + + The index of the first character of the URL citation in the message. + + - `title: string` + + The title of the web resource. + + - `type: "url_citation"` + + The type of the URL citation. Always `url_citation`. + + - `"url_citation"` + + - `url: string` + + The URL of the web resource. + + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` + + A citation for a container file used to generate a model response. + + - `container_id: string` + + The ID of the container file. + + - `end_index: number` + + The index of the last character of the container file citation in the message. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the container file cited. + + - `start_index: number` + + The index of the first character of the container file citation in the message. + + - `type: "container_file_citation"` + + The type of the container file citation. Always `container_file_citation`. + + - `"container_file_citation"` + + - `FilePath object { file_id, index, type }` + + A path to a file. + + - `file_id: string` + + The ID of the file. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_path"` + + The type of the file path. Always `file_path`. + + - `"file_path"` + + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + + - `top_logprobs: array of object { token, bytes, logprob }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + + - `BetaResponseOutputRefusal object { refusal, type }` + + A refusal from the model. + + - `refusal: string` + + The refusal explanation from the model. + + - `type: "refusal"` + + The type of the refusal. Always `refusal`. + + - `"refusal"` + + - `role: "assistant"` + + The role of the output message. Always `assistant`. + + - `"assistant"` + + - `status: "in_progress" or "completed" or "incomplete"` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: "message"` + + The type of the output message. Always `message`. + + - `"message"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `phase: optional "commentary" or "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. + + - `"commentary"` + + - `"final_answer"` + + - `FileSearchCall object { id, queries, status, 3 more }` + + The results of a file search tool call. See the + [file search guide](/docs/guides/tools-file-search) for more information. + + - `id: string` + + The unique ID of the file search tool call. + + - `queries: array of string` + + The queries used to search for files. + + - `status: "in_progress" or "searching" or "completed" or 2 more` + + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, + + - `"in_progress"` + + - `"searching"` + + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `type: "file_search_call"` + + The type of the file search tool call. Always `file_search_call`. + + - `"file_search_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `results: optional array of object { attributes, file_id, filename, 2 more }` + + The results of the file search tool call. + + - `attributes: optional map[string or number or boolean]` + + 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. + + - `string` + + - `number` + + - `boolean` + + - `file_id: optional string` + + The unique ID of the file. + + - `filename: optional string` + + The name of the file. + + - `score: optional number` + + The relevance score of the file - a value between 0 and 1. + + - `text: optional string` + + The text that was retrieved from the file. + + - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` + + A tool call to a computer use tool. See the + [computer use guide](/docs/guides/tools-computer-use) for more information. + + - `id: string` + + The unique ID of the computer call. + + - `call_id: string` + + An identifier used when responding to the tool call with output. + + - `pending_safety_checks: array of object { id, code, message }` + + The pending safety checks for the computer call. + + - `id: string` + + The ID of the pending safety check. + + - `code: optional string` + + The type of the pending safety check. + + - `message: optional string` + + Details about the pending safety check. + + - `status: "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: "computer_call"` + + The type of the computer call. Always `computer_call`. + + - `"computer_call"` + + - `action: optional BetaComputerAction` + + A click action. + + - `Click object { button, type, x, 2 more }` + + A click action. + + - `button: "left" or "right" or "wheel" or 2 more` + + Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + + - `"left"` + + - `"right"` + + - `"wheel"` + + - `"back"` + + - `"forward"` + + - `type: "click"` + + Specifies the event type. For a click action, this property is always `click`. + + - `"click"` + + - `x: number` + + The x-coordinate where the click occurred. + + - `y: number` + + The y-coordinate where the click occurred. + + - `keys: optional array of string` + + The keys being held while clicking. + + - `DoubleClick object { keys, type, x, y }` + + A double click action. + + - `keys: array of string` + + The keys being held while double-clicking. + + - `type: "double_click"` + + Specifies the event type. For a double click action, this property is always set to `double_click`. + + - `"double_click"` + + - `x: number` + + The x-coordinate where the double click occurred. + + - `y: number` + + The y-coordinate where the double click occurred. + + - `Drag object { path, type, keys }` + + A drag action. + + - `path: array of object { x, y }` + + An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + + ``` + [ + { x: 100, y: 200 }, + { x: 200, y: 300 } + ] + ``` + + - `x: number` + + The x-coordinate. + + - `y: number` + + The y-coordinate. + + - `type: "drag"` + + Specifies the event type. For a drag action, this property is always set to `drag`. + + - `"drag"` + + - `keys: optional array of string` + + The keys being held while dragging the mouse. + + - `Keypress object { keys, type }` + + A collection of keypresses the model would like to perform. + + - `keys: array of string` + + The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + + - `type: "keypress"` + + Specifies the event type. For a keypress action, this property is always set to `keypress`. + + - `"keypress"` + + - `Move object { type, x, y, keys }` + + A mouse move action. + + - `type: "move"` + + Specifies the event type. For a move action, this property is always set to `move`. + + - `"move"` + + - `x: number` + + The x-coordinate to move to. + + - `y: number` + + The y-coordinate to move to. + + - `keys: optional array of string` + + The keys being held while moving the mouse. + + - `Screenshot object { type }` + + A screenshot action. + + - `type: "screenshot"` + + Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + + - `"screenshot"` + + - `Scroll object { scroll_x, scroll_y, type, 3 more }` + + A scroll action. + + - `scroll_x: number` + + The horizontal scroll distance. + + - `scroll_y: number` + + The vertical scroll distance. + + - `type: "scroll"` + + Specifies the event type. For a scroll action, this property is always set to `scroll`. + + - `"scroll"` + + - `x: number` + + The x-coordinate where the scroll occurred. + + - `y: number` + + The y-coordinate where the scroll occurred. + + - `keys: optional array of string` + + The keys being held while scrolling. + + - `Type object { text, type }` + + An action to type in text. + + - `text: string` + + The text to type. + + - `type: "type"` + + Specifies the event type. For a type action, this property is always set to `type`. + + - `"type"` + + - `Wait object { type }` + + A wait action. + + - `type: "wait"` + + Specifies the event type. For a wait action, this property is always set to `wait`. + + - `"wait"` + + - `actions: optional BetaComputerActionList` + + Flattened batched actions for `computer_use`. Each action includes an + `type` discriminator and action-specific fields. + + - `Click object { button, type, x, 2 more }` + + A click action. + + - `DoubleClick object { keys, type, x, y }` + + A double click action. + + - `Drag object { path, type, keys }` + + A drag action. + + - `Keypress object { keys, type }` + + A collection of keypresses the model would like to perform. + + - `Move object { type, x, y, keys }` + + A mouse move action. + + - `Screenshot object { type }` + + A screenshot action. + + - `Scroll object { scroll_x, scroll_y, type, 3 more }` + + A scroll action. + + - `Type object { text, type }` + + An action to type in text. + + - `Wait object { type }` + + A wait action. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `ComputerCallOutput object { call_id, output, type, 4 more }` + + The output of a computer tool call. + + - `call_id: string` + + The ID of the computer tool call that produced the output. + + - `output: BetaResponseComputerToolCallOutputScreenshot` + + A computer screenshot image used with the computer use tool. + + - `type: "computer_screenshot"` + + Specifies the event type. For a computer screenshot, this property is + always set to `computer_screenshot`. + + - `"computer_screenshot"` + + - `file_id: optional string` + + The identifier of an uploaded file that contains the screenshot. + + - `image_url: optional string` + + The URL of the screenshot image. + + - `type: "computer_call_output"` + + The type of the computer tool call output. Always `computer_call_output`. + + - `"computer_call_output"` + + - `id: optional string` + + The ID of the computer tool call output. + + - `acknowledged_safety_checks: optional array of object { id, code, message }` + + The safety checks reported by the API that have been acknowledged by the developer. + + - `id: string` + + The ID of the pending safety check. + + - `code: optional string` + + The type of the pending safety check. + + - `message: optional string` + + Details about the pending safety check. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `WebSearchCall object { id, action, status, 2 more }` + + The results of a web search tool call. See the + [web search guide](/docs/guides/tools-web-search) for more information. + + - `id: string` + + The unique ID of the web search tool call. + + - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }` + + An object describing the specific action taken in this web search call. + Includes details on how the model used the web (search, open_page, find_in_page). + + - `Search object { type, queries, query, sources }` + + Action type "search" - Performs a web search query. + + - `type: "search"` + + The action type. + + - `"search"` + + - `queries: optional array of string` + + The search queries. + + - `query: optional string` + + The search query. + + - `sources: optional array of object { type, url }` + + The sources used in the search. + + - `type: "url"` + + The type of source. Always `url`. + + - `"url"` + + - `url: string` + + The URL of the source. + + - `OpenPage object { type, url }` + + Action type "open_page" - Opens a specific URL from search results. + + - `type: "open_page"` + + The action type. + + - `"open_page"` + + - `url: optional string` + + The URL opened by the model. + + - `FindInPage object { pattern, type, url }` + + Action type "find_in_page": Searches for a pattern within a loaded page. + + - `pattern: string` + + The pattern or text to search for within the page. + + - `type: "find_in_page"` + + The action type. + + - `"find_in_page"` + + - `url: string` + + The URL of the page searched for the pattern. + + - `status: "in_progress" or "searching" or "completed" or "failed"` + + The status of the web search tool call. + + - `"in_progress"` + + - `"searching"` + + - `"completed"` + + - `"failed"` + + - `type: "web_search_call"` + + The type of the web search tool call. Always `web_search_call`. + + - `"web_search_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `FunctionCall object { arguments, call_id, name, 6 more }` + + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. + + - `arguments: string` + + A JSON string of the arguments to pass to the function. + + - `call_id: string` + + The unique ID of the function tool call generated by the model. + + - `name: string` + + The name of the function to run. + + - `type: "function_call"` + + The type of the function tool call. Always `function_call`. + + - `"function_call"` + + - `id: optional string` + + The unique ID of the function tool call. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. + + - `Direct object { type }` + + - `type: "direct"` + + - `"direct"` + + - `Program object { caller_id, type }` + + - `caller_id: string` + + The call ID of the program item that produced this tool call. + + - `type: "program"` + + - `"program"` + + - `namespace: optional string` + + The namespace of the function to run. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `FunctionCallOutput object { call_id, output, type, 4 more }` + + The output of a function tool call. + + - `call_id: string` + + The unique ID of the function tool call generated by the model. + + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` + + Text, image, or file output of the function tool call. + + - `string` + + A JSON string of the output of the function tool call. + + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` + + An array of content outputs (text, image, file) for the function tool call. + + - `BetaResponseInputTextContent object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `text: string` + + The text input to the model. + + - `type: "input_text"` + + The type of the input item. Always `input_text`. + + - `"input_text"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision) + + - `type: "input_image"` + + The type of the input item. Always `input_image`. + + - `"input_image"` + + - `detail: optional "low" or "high" or "auto" or "original"` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `image_url: optional string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputFileContent object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `type: "input_file"` + + The type of the input item. Always `input_file`. + + - `"input_file"` + + - `detail: optional "auto" or "low" or "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`. + + - `"auto"` + + - `"low"` + + - `"high"` + + - `file_data: optional string` + + The base64-encoded data of the file to be sent to the model. + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `file_url: optional string` + + The URL of the file to be sent to the model. + + - `filename: optional string` + + The name of the file to be sent to the model. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `type: "function_call_output"` + + The type of the function tool call output. Always `function_call_output`. + + - `"function_call_output"` + + - `id: optional string` + + The unique ID of the function tool call output. Populated when this item is returned via API. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. + + - `Direct object { type }` + + - `type: "direct"` + + The caller type. Always `direct`. + + - `"direct"` + + - `Program object { caller_id, type }` + + - `caller_id: string` + + The call ID of the program item that produced this tool call. + + - `type: "program"` + + The caller type. Always `program`. + + - `"program"` + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `AgentMessage object { author, content, recipient, 3 more }` + + A message routed between agents. + + - `author: string` + + The sending agent identity. + + - `content: array of BetaResponseInputTextContent or BetaResponseInputImageContent or object { encrypted_content, type }` + + Plaintext, image, or encrypted content sent between agents. + + - `BetaResponseInputTextContent object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision) + + - `EncryptedContent object { encrypted_content, type }` + + Opaque encrypted content that Responses API decrypts inside trusted model execution. + + - `encrypted_content: string` + + Opaque encrypted content. + + - `type: "encrypted_content"` + + The type of the input item. Always `encrypted_content`. + + - `"encrypted_content"` + + - `recipient: string` + + The destination agent identity. + + - `type: "agent_message"` + + The item type. Always `agent_message`. + + - `"agent_message"` + + - `id: optional string` + + The unique ID of this agent message item. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `MultiAgentCall object { action, arguments, call_id, 3 more }` + + - `action: "spawn_agent" or "interrupt_agent" or "list_agents" or 3 more` + + The multi-agent action that was executed. + + - `"spawn_agent"` + + - `"interrupt_agent"` + + - `"list_agents"` + + - `"send_message"` + + - `"followup_task"` + + - `"wait_agent"` + + - `arguments: string` + + The action arguments as a JSON string. + + - `call_id: string` + + The unique ID linking this call to its output. + + - `type: "multi_agent_call"` + + The item type. Always `multi_agent_call`. + + - `"multi_agent_call"` + + - `id: optional string` + + The unique ID of this multi-agent call. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `MultiAgentCallOutput object { action, call_id, output, 3 more }` + + - `action: "spawn_agent" or "interrupt_agent" or "list_agents" or 3 more` + + The multi-agent action that produced this result. + + - `"spawn_agent"` + + - `"interrupt_agent"` + + - `"list_agents"` + + - `"send_message"` + + - `"followup_task"` + + - `"wait_agent"` + + - `call_id: string` + + The unique ID of the multi-agent call. + + - `output: array of object { text, type, annotations }` + + Text output returned by the multi-agent action. + + - `text: string` + + The text content. + + - `type: "output_text"` + + The content type. Always `output_text`. + + - `"output_text"` + + - `annotations: optional array of object { file_id, filename, index, type } or array of object { end_index, start_index, title, 2 more } or array of object { container_id, end_index, file_id, 3 more }` + + Citations associated with the text content. + + - `array of object { file_id, filename, index, type }` + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the file cited. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_citation"` + + The citation type. Always `file_citation`. + + - `"file_citation"` + + - `array of object { end_index, start_index, title, 2 more }` + + - `end_index: number` + + The index of the last character of the citation in the message. + + - `start_index: number` + + The index of the first character of the citation in the message. + + - `title: string` + + The title of the cited resource. + + - `type: "url_citation"` + + The citation type. Always `url_citation`. + + - `"url_citation"` + + - `url: string` + + The URL of the cited resource. + + - `array of object { container_id, end_index, file_id, 3 more }` + + - `container_id: string` + + The ID of the container. + + - `end_index: number` + + The index of the last character of the citation in the message. + + - `file_id: string` + + The ID of the container file. + + - `filename: string` + + The filename of the container file cited. + + - `start_index: number` + + The index of the first character of the citation in the message. + + - `type: "container_file_citation"` + + The citation type. Always `container_file_citation`. + + - `"container_file_citation"` + + - `type: "multi_agent_call_output"` + + The item type. Always `multi_agent_call_output`. + + - `"multi_agent_call_output"` + + - `id: optional string` + + The unique ID of this multi-agent call output. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `ToolSearchCall object { arguments, type, id, 4 more }` + + - `arguments: unknown` + + The arguments supplied to the tool search call. + + - `type: "tool_search_call"` + + The item type. Always `tool_search_call`. + + - `"tool_search_call"` + + - `id: optional string` + + The unique ID of this tool search call. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `call_id: optional string` + + The unique ID of the tool search call generated by the model. + + - `execution: optional "server" or "client"` + + Whether tool search was executed by the server or by the client. + + - `"server"` + + - `"client"` + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the tool search call. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `ToolSearchOutput object { tools, type, id, 4 more }` + + - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` + + The loaded tool definitions returned by the tool search output. + + - `Function object { name, parameters, strict, 5 more }` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `name: string` + + The name of the function to call. + + - `parameters: map[unknown]` + + A JSON schema object describing the parameters of the function. + + - `strict: boolean` + + Whether strict parameter validation is enforced for this function tool. + + - `type: "function"` + + The type of the function tool. Always `function`. + + - `"function"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this function is deferred and loaded via tool search. + + - `description: optional string` + + A description of the function. Used by the model to determine whether or not to call the function. + + - `output_schema: optional map[unknown]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + + - `FileSearch object { type, vector_store_ids, filters, 2 more }` + + A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + + - `type: "file_search"` + + The type of the file search tool. Always `file_search`. + + - `"file_search"` + + - `vector_store_ids: array of string` + + The IDs of the vector stores to search. + + - `filters: optional object { key, type, value } or object { filters, type }` + + A filter to apply. + + - `ComparisonFilter object { key, type, value }` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `key: string` + + The key to compare against the value. + + - `type: "eq" or "ne" or "gt" or 5 more` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `"eq"` + + - `"ne"` + + - `"gt"` + + - `"gte"` + + - `"lt"` + + - `"lte"` + + - `"in"` + + - `"nin"` + + - `value: string or number or boolean or array of string or number` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `number` + + - `boolean` + + - `array of string or number` + + - `string` + + - `number` + + - `CompoundFilter object { filters, type }` + + Combine multiple filters using `and` or `or`. + + - `filters: array of object { key, type, value } or unknown` + + Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + + - `ComparisonFilter object { key, type, value }` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `key: string` + + The key to compare against the value. + + - `type: "eq" or "ne" or "gt" or 5 more` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `"eq"` + + - `"ne"` + + - `"gt"` + + - `"gte"` + + - `"lt"` + + - `"lte"` + + - `"in"` + + - `"nin"` + + - `value: string or number or boolean or array of string or number` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `number` + + - `boolean` + + - `array of string or number` + + - `string` + + - `number` + + - `unknown` + + - `type: "and" or "or"` + + Type of operation: `and` or `or`. + + - `"and"` + + - `"or"` + + - `max_num_results: optional number` + + The maximum number of results to return. This number should be between 1 and 50 inclusive. + + - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` + + Ranking options for search. + + - `hybrid_search: optional object { embedding_weight, text_weight }` + + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + + - `embedding_weight: number` + + The weight of the embedding in the reciprocal ranking fusion. + + - `text_weight: number` + + The weight of the text in the reciprocal ranking fusion. + + - `ranker: optional "auto" or "default-2024-11-15"` + + The ranker to use for the file search. + + - `"auto"` + + - `"default-2024-11-15"` + + - `score_threshold: optional number` + + The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. + + - `Computer object { type }` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type: "computer"` + + The type of the computer tool. Always `computer`. + + - `"computer"` + + - `ComputerUsePreview object { display_height, display_width, environment, type }` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `display_height: number` + + The height of the computer display. + + - `display_width: number` + + The width of the computer display. + + - `environment: "windows" or "mac" or "linux" or 2 more` + + The type of computer environment to control. + + - `"windows"` + + - `"mac"` + + - `"linux"` + + - `"ubuntu"` + + - `"browser"` + + - `type: "computer_use_preview"` + + The type of the computer use tool. Always `computer_use_preview`. + + - `"computer_use_preview"` + + - `WebSearch object { type, filters, search_context_size, user_location }` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](/docs/guides/tools-web-search). + + - `type: "web_search" or "web_search_2025_08_26"` + + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + + - `"web_search"` + + - `"web_search_2025_08_26"` + + - `filters: optional object { allowed_domains }` + + Filters for the search. + + - `allowed_domains: optional array of string` + + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. + + Example: `["pubmed.ncbi.nlm.nih.gov"]` + + - `search_context_size: optional "low" or "medium" or "high"` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `user_location: optional object { city, country, region, 2 more }` + + The approximate location of the user. + + - `city: optional string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `country: optional string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `region: optional string` + + Free text input for the region of the user, e.g. `California`. + + - `timezone: optional string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `type: optional "approximate"` + + The type of location approximation. Always `approximate`. + + - `"approximate"` + + - `Mcp object { server_label, type, allowed_callers, 9 more }` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). + + - `server_label: string` + + A label for this MCP server, used to identify it in tool calls. + + - `type: "mcp"` + + The type of the MCP tool. Always `mcp`. + + - `"mcp"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `allowed_tools: optional array of string or object { read_only, tool_names }` + + List of allowed tool names or a filter object. + + - `McpAllowedTools = array of string` + + A string array of allowed tool names + + - `McpToolFilter object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `authorization: optional string` + + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. + + - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` + + Identifier for service connectors, like those available in ChatGPT. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). + + Currently supported `connector_id` values are: + + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` + + - `"connector_dropbox"` + + - `"connector_gmail"` + + - `"connector_googlecalendar"` + + - `"connector_googledrive"` + + - `"connector_microsoftteams"` + + - `"connector_outlookcalendar"` + + - `"connector_outlookemail"` + + - `"connector_sharepoint"` + + - `defer_loading: optional boolean` + + Whether this MCP tool is deferred and discovered via tool search. + + - `headers: optional map[string]` + + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. + + - `require_approval: optional object { always, never } or "always" or "never"` + + Specify which of the MCP server's tools require approval. + + - `McpToolApprovalFilter object { always, never }` + + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. + + - `always: optional object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `never: optional object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `McpToolApprovalSetting = "always" or "never"` + + Specify a single approval policy for all tools. One of `always` or + `never`. When set to `always`, all tools will require approval. When + set to `never`, all tools will not require approval. + + - `"always"` + + - `"never"` + + - `server_description: optional string` + + Optional description of the MCP server, used to provide more context. + + - `server_url: optional string` + + The URL for the MCP server. One of `server_url`, `connector_id`, or + `tunnel_id` must be provided. + + - `tunnel_id: optional string` + + The Secure MCP Tunnel ID to use instead of a direct server URL. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. + + - `CodeInterpreter object { container, type, allowed_callers }` + + A tool that runs Python code to help generate a response to a prompt. + + - `container: string or object { type, file_ids, memory_limit, network_policy }` + + The code interpreter container. Can be a container ID or an object that + specifies uploaded file IDs to make available to your code, along with an + optional `memory_limit` setting. + + - `string` + + The container ID. + + - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }` + + Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. + + - `type: "auto"` + + Always `auto`. + + - `"auto"` + + - `file_ids: optional array of string` + + An optional list of uploaded files to make available to your code. + + - `memory_limit: optional "1g" or "4g" or "16g" or "64g"` + + The memory limit for the code interpreter container. + + - `"1g"` + + - `"4g"` + + - `"16g"` + + - `"64g"` + + - `network_policy: optional BetaContainerNetworkPolicyDisabled or BetaContainerNetworkPolicyAllowlist` + + Network access policy for the container. + + - `BetaContainerNetworkPolicyDisabled object { type }` + + - `type: "disabled"` + + Disable outbound network access. Always `disabled`. + + - `"disabled"` + + - `BetaContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` + + - `allowed_domains: array of string` + + A list of allowed domains when type is `allowlist`. + + - `type: "allowlist"` + + Allow outbound network access only to specified domains. Always `allowlist`. + + - `"allowlist"` + + - `domain_secrets: optional array of BetaContainerNetworkPolicyDomainSecret` + + Optional domain-scoped secrets for allowlisted domains. + + - `domain: string` + + The domain associated with the secret. + + - `name: string` + + The name of the secret to inject for the domain. + + - `value: string` + + The secret value to inject for the domain. + + - `type: "code_interpreter"` + + The type of the code interpreter tool. Always `code_interpreter`. + + - `"code_interpreter"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `ProgrammaticToolCalling object { type }` + + - `type: "programmatic_tool_calling"` + + The type of the tool. Always `programmatic_tool_calling`. + + - `"programmatic_tool_calling"` + + - `ImageGeneration object { type, action, background, 9 more }` + + A tool that generates images using the GPT image models. + + - `type: "image_generation"` + + The type of the image generation tool. Always `image_generation`. + + - `"image_generation"` + + - `action: optional "generate" or "edit" or "auto"` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `"generate"` + + - `"edit"` + + - `"auto"` + + - `background: optional "transparent" or "opaque" or "auto"` + + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. + + - `"transparent"` + + - `"opaque"` + + - `"auto"` + + - `input_fidelity: optional "high" or "low"` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `"high"` + + - `"low"` + + - `input_image_mask: optional object { file_id, image_url }` + + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). + + - `file_id: optional string` + + File ID for the mask image. + + - `image_url: optional string` + + Base64-encoded mask image. + + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `string` + + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `"gpt-image-1"` + + - `"gpt-image-1-mini"` + + - `"gpt-image-1.5"` + + - `moderation: optional "auto" or "low"` + + Moderation level for the generated image. Default: `auto`. + + - `"auto"` + + - `"low"` + + - `output_compression: optional number` + + Compression level for the output image. Default: 100. + + - `output_format: optional "png" or "webp" or "jpeg"` + + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. + + - `"png"` + + - `"webp"` + + - `"jpeg"` + + - `partial_images: optional number` + + Number of partial images to generate in streaming mode, from 0 (default value) to 3. + + - `quality: optional "low" or "medium" or "high" or "auto"` + + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"auto"` + + - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `string` + + - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `"1024x1024"` + + - `"1024x1536"` + + - `"1536x1024"` + + - `"auto"` + + - `LocalShell object { type }` + + A tool that allows the model to execute shell commands in a local environment. + + - `type: "local_shell"` + + The type of the local shell tool. Always `local_shell`. + + - `"local_shell"` + + - `Shell object { type, allowed_callers, environment }` + + A tool that allows the model to execute shell commands. + + - `type: "shell"` + + The type of the shell tool. Always `shell`. + + - `"shell"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `environment: optional BetaContainerAuto or BetaLocalEnvironment or BetaContainerReference` + + - `BetaContainerAuto object { type, file_ids, memory_limit, 2 more }` + + - `type: "container_auto"` + + Automatically creates a container for this request + + - `"container_auto"` + + - `file_ids: optional array of string` + + An optional list of uploaded files to make available to your code. + + - `memory_limit: optional "1g" or "4g" or "16g" or "64g"` + + The memory limit for the container. + + - `"1g"` + + - `"4g"` + + - `"16g"` + + - `"64g"` + + - `network_policy: optional BetaContainerNetworkPolicyDisabled or BetaContainerNetworkPolicyAllowlist` + + Network access policy for the container. + + - `BetaContainerNetworkPolicyDisabled object { type }` + + - `BetaContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` + + - `skills: optional array of BetaSkillReference or BetaInlineSkill` + + An optional list of skills referenced by id or inline data. + + - `BetaSkillReference object { skill_id, type, version }` + + - `skill_id: string` + + The ID of the referenced skill. + + - `type: "skill_reference"` + + References a skill created with the /v1/skills endpoint. + + - `"skill_reference"` + + - `version: optional string` + + Optional skill version. Use a positive integer or 'latest'. Omit for default. + + - `BetaInlineSkill object { description, name, source, type }` + + - `description: string` + + The description of the skill. + + - `name: string` + + The name of the skill. + + - `source: BetaInlineSkillSource` + + Inline skill payload + + - `data: string` + + Base64-encoded skill zip bundle. + + - `media_type: "application/zip"` + + The media type of the inline skill payload. Must be `application/zip`. + + - `"application/zip"` + + - `type: "base64"` + + The type of the inline skill source. Must be `base64`. + + - `"base64"` + + - `type: "inline"` + + Defines an inline skill for this request. + + - `"inline"` + + - `BetaLocalEnvironment object { type, skills }` + + - `type: "local"` + + Use a local computer environment. + + - `"local"` + + - `skills: optional array of BetaLocalSkill` + + An optional list of skills. + + - `description: string` + + The description of the skill. + + - `name: string` + + The name of the skill. + + - `path: string` + + The path to the directory containing the skill. + + - `BetaContainerReference object { container_id, type }` + + - `container_id: string` + + The ID of the referenced container. + + - `type: "container_reference"` + + References a container created with the /v1/containers endpoint - - `approval_request_id: string` + - `"container_reference"` - The ID of the approval request being answered. + - `Custom object { name, type, allowed_callers, 3 more }` - - `approve: boolean` + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - Whether the request was approved. + - `name: string` - - `type: "mcp_approval_response"` + The name of the custom tool, used to identify it in tool calls. - The type of the item. Always `mcp_approval_response`. + - `type: "custom"` - - `"mcp_approval_response"` + The type of the custom tool. Always `custom`. - - `agent: optional object { agent_name }` + - `"custom"` - The agent that produced this item. + - `allowed_callers: optional array of "direct" or "programmatic"` - - `agent_name: string` + The tool invocation context(s). - The canonical name of the agent that produced this item. + - `"direct"` - - `reason: optional string` + - `"programmatic"` - Optional reason for the decision. + - `defer_loading: optional boolean` - - `CustomToolCall object { call_id, input, name, 5 more }` + Whether this tool should be deferred and discovered via tool search. - A call to a custom tool created by the model. + - `description: optional string` - - `call_id: string` + Optional description of the custom tool, used to provide more context. - An identifier used to map this custom tool call to a tool call output. + - `format: optional object { type } or object { definition, syntax, type }` - - `input: string` + The input format for the custom tool. Default is unconstrained text. - The input for the custom tool call generated by the model. + - `Text object { type }` - - `name: string` + Unconstrained free-form text. - The name of the custom tool being called. + - `type: "text"` - - `type: "custom_tool_call"` + Unconstrained text format. Always `text`. - The type of the custom tool call. Always `custom_tool_call`. + - `"text"` - - `"custom_tool_call"` + - `Grammar object { definition, syntax, type }` - - `id: optional string` + A grammar defined by the user. - The unique ID of the custom tool call in the OpenAI platform. + - `definition: string` - - `agent: optional object { agent_name }` + The grammar definition. - The agent that produced this item. + - `syntax: "lark" or "regex"` - - `agent_name: string` + The syntax of the grammar definition. One of `lark` or `regex`. - The canonical name of the agent that produced this item. + - `"lark"` - - `caller: optional object { type } or object { caller_id, type }` + - `"regex"` - The execution context that produced this tool call. + - `type: "grammar"` - - `Direct object { type }` + Grammar format. Always `grammar`. - - `type: "direct"` + - `"grammar"` - - `"direct"` + - `Namespace object { description, name, tools, type }` - - `Program object { caller_id, type }` + Groups function/custom tools under a shared namespace. - - `caller_id: string` + - `description: string` - The call ID of the program item that produced this tool call. + A description of the namespace shown to the model. - - `type: "program"` + - `name: string` - - `"program"` + The namespace name used in tool calls (for example, `crm`). - - `namespace: optional string` + - `tools: array of object { name, type, allowed_callers, 5 more } or object { name, type, allowed_callers, 3 more }` - The namespace of the custom tool being called. + The function/custom tools available inside this namespace. - - `CustomToolCallOutput object { id, call_id, output, 5 more }` + - `Function object { name, type, allowed_callers, 5 more }` - - `id: string` + - `name: string` - The unique ID of the custom tool call output item. + - `type: "function"` - - `call_id: string` + - `"function"` - The call ID, used to map this custom tool call output to a custom tool call. + - `allowed_callers: optional array of "direct" or "programmatic"` - - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + The tool invocation context(s). - The output from the custom tool call generated by your code. - Can be a string or an list of output content. + - `"direct"` - - `StringOutput = string` + - `"programmatic"` - A string of the output of the custom tool call. + - `defer_loading: optional boolean` - - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` + Whether this function should be deferred and discovered via tool search. - Text, image, or file output of the custom tool call. + - `description: optional string` - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + - `output_schema: optional map[unknown]` - A text input to the model. + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + - `parameters: optional unknown` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + - `strict: optional boolean` - - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. - A file input to the model. + - `Custom object { name, type, allowed_callers, 3 more }` - - `status: "in_progress" or "completed" or "incomplete"` + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + - `name: string` - - `"in_progress"` + The name of the custom tool, used to identify it in tool calls. - - `"completed"` + - `type: "custom"` - - `"incomplete"` + The type of the custom tool. Always `custom`. - - `type: "custom_tool_call_output"` + - `"custom"` - The type of the custom tool call output. Always `custom_tool_call_output`. + - `allowed_callers: optional array of "direct" or "programmatic"` - - `"custom_tool_call_output"` + The tool invocation context(s). - - `agent: optional object { agent_name }` + - `"direct"` - The agent that produced this item. + - `"programmatic"` - - `agent_name: string` + - `defer_loading: optional boolean` - The canonical name of the agent that produced this item. + Whether this tool should be deferred and discovered via tool search. - - `caller: optional object { type } or object { caller_id, type }` + - `description: optional string` - The execution context that produced this tool call. + Optional description of the custom tool, used to provide more context. - - `Direct object { type }` + - `format: optional object { type } or object { definition, syntax, type }` - - `type: "direct"` + The input format for the custom tool. Default is unconstrained text. - The caller type. Always `direct`. + - `Text object { type }` - - `"direct"` + Unconstrained free-form text. - - `Program object { caller_id, type }` + - `type: "text"` - - `caller_id: string` + Unconstrained text format. Always `text`. - The call ID of the program item that produced this tool call. + - `"text"` - - `type: "program"` + - `Grammar object { definition, syntax, type }` - The caller type. Always `program`. + A grammar defined by the user. - - `"program"` + - `definition: string` - - `created_by: optional string` + The grammar definition. - The identifier of the actor that created the item. + - `syntax: "lark" or "regex"` - - `parallel_tool_calls: boolean` + The syntax of the grammar definition. One of `lark` or `regex`. - Whether to allow the model to run tool calls in parallel. + - `"lark"` - - `temperature: number` + - `"regex"` - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. + - `type: "grammar"` - - `tool_choice: BetaToolChoiceOptions or BetaToolChoiceAllowed or BetaToolChoiceTypes or 6 more` + Grammar format. Always `grammar`. - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. + - `"grammar"` - - `BetaToolChoiceOptions = "none" or "auto" or "required"` + - `type: "namespace"` - Controls which (if any) tool is called by the model. + The type of the tool. Always `namespace`. - `none` means the model will not call any tool and instead generates a message. + - `"namespace"` - `auto` means the model can pick between generating a message or calling one or - more tools. + - `ToolSearch object { type, description, execution, parameters }` - `required` means the model must call one or more tools. + Hosted or BYOT tool search configuration for deferred tools. - - `"none"` + - `type: "tool_search"` - - `"auto"` + The type of the tool. Always `tool_search`. - - `"required"` + - `"tool_search"` - - `BetaToolChoiceAllowed object { mode, tools, type }` + - `description: optional string` - Constrains the tools available to the model to a pre-defined set. + Description shown to the model for a client-executed tool search tool. - - `mode: "auto" or "required"` + - `execution: optional "server" or "client"` - Constrains the tools available to the model to a pre-defined set. + Whether tool search is executed by the server or by the client. - `auto` allows the model to pick from among the allowed tools and generate a - message. + - `"server"` - `required` requires the model to call one or more of the allowed tools. + - `"client"` - - `"auto"` + - `parameters: optional unknown` - - `"required"` + Parameter schema for a client-executed tool search tool. - - `tools: array of map[unknown]` + - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }` - A list of tool definitions that the model should be allowed to call. + This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). - For the Responses API, the list of tool definitions might look like: + - `type: "web_search_preview" or "web_search_preview_2025_03_11"` - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. - - `type: "allowed_tools"` + - `"web_search_preview"` - Allowed tool configuration type. Always `allowed_tools`. + - `"web_search_preview_2025_03_11"` - - `"allowed_tools"` + - `search_content_types: optional array of "text" or "image"` - - `BetaToolChoiceTypes object { type }` + - `"text"` - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + - `"image"` - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` + - `search_context_size: optional "low" or "medium" or "high"` - The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - Allowed values are: + - `"low"` - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` + - `"medium"` - - `"file_search"` + - `"high"` - - `"web_search_preview"` + - `user_location: optional object { type, city, country, 2 more }` - - `"computer"` + The user's location. - - `"computer_use_preview"` + - `type: "approximate"` - - `"computer_use"` + The type of location approximation. Always `approximate`. - - `"web_search_preview_2025_03_11"` + - `"approximate"` - - `"image_generation"` + - `city: optional string` - - `"code_interpreter"` + Free text input for the city of the user, e.g. `San Francisco`. - - `BetaToolChoiceFunction object { name, type }` + - `country: optional string` - Use this option to force the model to call a specific function. + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - `name: string` + - `region: optional string` - The name of the function to call. + Free text input for the region of the user, e.g. `California`. - - `type: "function"` + - `timezone: optional string` - For function calling, the type is always `function`. + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `"function"` + - `ApplyPatch object { type, allowed_callers }` - - `BetaToolChoiceMcp object { server_label, type, name }` + Allows the assistant to create, delete, or update files using unified diffs. - Use this option to force the model to call a specific tool on a remote MCP server. + - `type: "apply_patch"` - - `server_label: string` + The type of the tool. Always `apply_patch`. - The label of the MCP server to use. + - `"apply_patch"` - - `type: "mcp"` + - `allowed_callers: optional array of "direct" or "programmatic"` - For MCP tools, the type is always `mcp`. + The tool invocation context(s). - - `"mcp"` + - `"direct"` - - `name: optional string` + - `"programmatic"` - The name of the tool to call on the server. + - `type: "tool_search_output"` - - `BetaToolChoiceCustom object { name, type }` + The item type. Always `tool_search_output`. - Use this option to force the model to call a specific custom tool. + - `"tool_search_output"` - - `name: string` + - `id: optional string` - The name of the custom tool to call. + The unique ID of this tool search output. - - `type: "custom"` + - `agent: optional object { agent_name }` - For custom tool calling, the type is always `custom`. + The agent that produced this item. - - `"custom"` + - `agent_name: string` - - `BetaSpecificProgrammaticToolCallingParam object { type }` + The canonical name of the agent that produced this item. - - `type: "programmatic_tool_calling"` + - `call_id: optional string` - The tool to call. Always `programmatic_tool_calling`. + The unique ID of the tool search call generated by the model. - - `"programmatic_tool_calling"` + - `execution: optional "server" or "client"` - - `BetaToolChoiceApplyPatch object { type }` + Whether tool search was executed by the server or by the client. - Forces the model to call the apply_patch tool when executing a tool call. + - `"server"` - - `type: "apply_patch"` + - `"client"` - The tool to call. Always `apply_patch`. + - `status: optional "in_progress" or "completed" or "incomplete"` - - `"apply_patch"` + The status of the tool search output. - - `BetaToolChoiceShell object { type }` + - `"in_progress"` - Forces the model to call the shell tool when a tool call is required. + - `"completed"` - - `type: "shell"` + - `"incomplete"` - The tool to call. Always `shell`. + - `AdditionalTools object { role, tools, type, 2 more }` - - `"shell"` + - `role: "developer"` - - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` + The role that provided the additional tools. Only `developer` is supported. - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. + - `"developer"` - We support the following categories of tools: + - `tools: array of object { name, parameters, strict, 5 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more` - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use - custom tools to call your own code. + A list of additional tools made available at this item. - `Function object { name, parameters, strict, 5 more }` @@ -121829,7 +125170,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -121889,7 +125230,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -121941,7 +125282,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -122133,19 +125474,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -122174,13 +125504,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -122188,14 +125518,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -122225,900 +125549,1504 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `quality: optional "low" or "medium" or "high" or "auto"` - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"auto"` + + - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `string` + + - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `"1024x1024"` + + - `"1024x1536"` + + - `"1536x1024"` + + - `"auto"` + + - `LocalShell object { type }` + + A tool that allows the model to execute shell commands in a local environment. + + - `type: "local_shell"` + + The type of the local shell tool. Always `local_shell`. + + - `"local_shell"` + + - `Shell object { type, allowed_callers, environment }` + + A tool that allows the model to execute shell commands. + + - `type: "shell"` + + The type of the shell tool. Always `shell`. + + - `"shell"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `environment: optional BetaContainerAuto or BetaLocalEnvironment or BetaContainerReference` + + - `BetaContainerAuto object { type, file_ids, memory_limit, 2 more }` + + - `BetaLocalEnvironment object { type, skills }` + + - `BetaContainerReference object { container_id, type }` + + - `Custom object { name, type, allowed_callers, 3 more }` + + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + + - `name: string` + + The name of the custom tool, used to identify it in tool calls. + + - `type: "custom"` + + The type of the custom tool. Always `custom`. + + - `"custom"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this tool should be deferred and discovered via tool search. + + - `description: optional string` + + Optional description of the custom tool, used to provide more context. + + - `format: optional object { type } or object { definition, syntax, type }` + + The input format for the custom tool. Default is unconstrained text. + + - `Text object { type }` + + Unconstrained free-form text. + + - `type: "text"` + + Unconstrained text format. Always `text`. + + - `"text"` + + - `Grammar object { definition, syntax, type }` + + A grammar defined by the user. + + - `definition: string` + + The grammar definition. + + - `syntax: "lark" or "regex"` + + The syntax of the grammar definition. One of `lark` or `regex`. + + - `"lark"` + + - `"regex"` + + - `type: "grammar"` + + Grammar format. Always `grammar`. + + - `"grammar"` + + - `Namespace object { description, name, tools, type }` + + Groups function/custom tools under a shared namespace. + + - `description: string` + + A description of the namespace shown to the model. + + - `name: string` + + The namespace name used in tool calls (for example, `crm`). + + - `tools: array of object { name, type, allowed_callers, 5 more } or object { name, type, allowed_callers, 3 more }` + + The function/custom tools available inside this namespace. + + - `Function object { name, type, allowed_callers, 5 more }` + + - `name: string` + + - `type: "function"` + + - `"function"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this function should be deferred and discovered via tool search. + + - `description: optional string` + + - `output_schema: optional map[unknown]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + + - `parameters: optional unknown` + + - `strict: optional boolean` + + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + + - `Custom object { name, type, allowed_callers, 3 more }` + + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + + - `name: string` + + The name of the custom tool, used to identify it in tool calls. + + - `type: "custom"` + + The type of the custom tool. Always `custom`. + + - `"custom"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `defer_loading: optional boolean` + + Whether this tool should be deferred and discovered via tool search. + + - `description: optional string` + + Optional description of the custom tool, used to provide more context. + + - `format: optional object { type } or object { definition, syntax, type }` + + The input format for the custom tool. Default is unconstrained text. + + - `Text object { type }` + + Unconstrained free-form text. + + - `type: "text"` + + Unconstrained text format. Always `text`. + + - `"text"` + + - `Grammar object { definition, syntax, type }` + + A grammar defined by the user. + + - `definition: string` + + The grammar definition. + + - `syntax: "lark" or "regex"` + + The syntax of the grammar definition. One of `lark` or `regex`. + + - `"lark"` + + - `"regex"` + + - `type: "grammar"` + + Grammar format. Always `grammar`. + + - `"grammar"` + + - `type: "namespace"` + + The type of the tool. Always `namespace`. + + - `"namespace"` + + - `ToolSearch object { type, description, execution, parameters }` + + Hosted or BYOT tool search configuration for deferred tools. + + - `type: "tool_search"` + + The type of the tool. Always `tool_search`. + + - `"tool_search"` + + - `description: optional string` + + Description shown to the model for a client-executed tool search tool. + + - `execution: optional "server" or "client"` + + Whether tool search is executed by the server or by the client. + + - `"server"` + + - `"client"` + + - `parameters: optional unknown` + + Parameter schema for a client-executed tool search tool. + + - `WebSearchPreview object { 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](https://platform.openai.com/docs/guides/tools-web-search). + + - `type: "web_search_preview" or "web_search_preview_2025_03_11"` + + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. + + - `"web_search_preview"` + + - `"web_search_preview_2025_03_11"` + + - `search_content_types: optional array of "text" or "image"` + + - `"text"` + + - `"image"` + + - `search_context_size: optional "low" or "medium" or "high"` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `user_location: optional object { type, city, country, 2 more }` + + The user's location. + + - `type: "approximate"` + + The type of location approximation. Always `approximate`. + + - `"approximate"` + + - `city: optional string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `country: optional string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `region: optional string` + + Free text input for the region of the user, e.g. `California`. + + - `timezone: optional string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `ApplyPatch object { type, allowed_callers }` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `type: "apply_patch"` + + The type of the tool. Always `apply_patch`. + + - `"apply_patch"` + + - `allowed_callers: optional array of "direct" or "programmatic"` + + The tool invocation context(s). + + - `"direct"` + + - `"programmatic"` + + - `type: "additional_tools"` + + The item type. Always `additional_tools`. + + - `"additional_tools"` + + - `id: optional string` + + The unique ID of this additional tools item. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `Reasoning object { 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](/docs/guides/conversation-state). + + - `id: string` + + The unique identifier of the reasoning content. + + - `summary: array of object { text, type }` + + Reasoning summary content. + + - `text: string` + + A summary of the reasoning output from the model so far. + + - `type: "summary_text"` + + The type of the object. Always `summary_text`. + + - `"summary_text"` + + - `type: "reasoning"` + + The type of the object. Always `reasoning`. + + - `"reasoning"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `content: optional array of object { text, type }` + + Reasoning text content. + + - `text: string` + + The reasoning text from the model. + + - `type: "reasoning_text"` + + The type of the reasoning text. Always `reasoning_text`. + + - `"reasoning_text"` + + - `encrypted_content: optional string` + + The encrypted content of the reasoning item - populated when a response is + generated with `reasoning.encrypted_content` in the `include` parameter. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `Compaction object { encrypted_content, type, id, agent }` + + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + + - `encrypted_content: string` + + The encrypted content of the compaction summary. + + - `type: "compaction"` + + The type of the item. Always `compaction`. + + - `"compaction"` + + - `id: optional string` + + The ID of the compaction item. + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `ImageGenerationCall object { id, result, status, 2 more }` + + An image generation request made by the model. + + - `id: string` + + The unique ID of the image generation call. + + - `result: string` + + The generated image encoded in base64. + + - `status: "in_progress" or "completed" or "generating" or "failed"` + + The status of the image generation call. + + - `"in_progress"` + + - `"completed"` + + - `"generating"` + + - `"failed"` + + - `type: "image_generation_call"` + + The type of the image generation call. Always `image_generation_call`. + + - `"image_generation_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `CodeInterpreterCall object { id, code, container_id, 4 more }` + + A tool call to run code. + + - `id: string` + + The unique ID of the code interpreter tool call. + + - `code: string` + + The code to run, or null if not available. + + - `container_id: string` + + The ID of the container used to run the code. + + - `outputs: array of object { logs, type } or object { type, url }` + + The outputs generated by the code interpreter, such as logs or images. + Can be null if no outputs are available. + + - `Logs object { logs, type }` + + The logs output from the code interpreter. + + - `logs: string` + + The logs output from the code interpreter. + + - `type: "logs"` + + The type of the output. Always `logs`. + + - `"logs"` + + - `Image object { type, url }` + + The image output from the code interpreter. + + - `type: "image"` + + The type of the output. Always `image`. + + - `"image"` + + - `url: string` + + The URL of the image output from the code interpreter. + + - `status: "in_progress" or "completed" or "incomplete" or 2 more` + + The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `"interpreting"` + + - `"failed"` + + - `type: "code_interpreter_call"` + + The type of the code interpreter tool call. Always `code_interpreter_call`. + + - `"code_interpreter_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `LocalShellCall object { id, action, call_id, 3 more }` + + A tool call to run a command on the local shell. + + - `id: string` + + The unique ID of the local shell call. + + - `action: object { command, env, type, 3 more }` + + Execute a shell command on the server. + + - `command: array of string` + + The command to run. + + - `env: map[string]` + + Environment variables to set for the command. + + - `type: "exec"` + + The type of the local shell action. Always `exec`. + + - `"exec"` + + - `timeout_ms: optional number` + + Optional timeout in milliseconds for the command. + + - `user: optional string` + + Optional user to run the command as. + + - `working_directory: optional string` + + Optional working directory to run the command in. + + - `call_id: string` + + The unique ID of the local shell tool call generated by the model. + + - `status: "in_progress" or "completed" or "incomplete"` + + The status of the local shell call. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: "local_shell_call"` + + The type of the local shell call. Always `local_shell_call`. + + - `"local_shell_call"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `LocalShellCallOutput object { id, output, type, 2 more }` + + The output of a local shell tool call. + + - `id: string` + + The unique ID of the local shell tool call generated by the model. + + - `output: string` + + A JSON string of the output of the local shell tool call. + + - `type: "local_shell_call_output"` + + The type of the local shell tool call output. Always `local_shell_call_output`. + + - `"local_shell_call_output"` + + - `agent: optional object { agent_name }` - - `"low"` + The agent that produced this item. - - `"medium"` + - `agent_name: string` - - `"high"` + The canonical name of the agent that produced this item. - - `"auto"` + - `status: optional "in_progress" or "completed" or "incomplete"` - - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + The status of the item. One of `in_progress`, `completed`, or `incomplete`. - The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + - `"in_progress"` - - `string` + - `"completed"` - - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"` + - `"incomplete"` - The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + - `ShellCall object { action, call_id, type, 5 more }` - - `"1024x1024"` + A tool representing a request to execute one or more shell commands. - - `"1024x1536"` + - `action: object { commands, max_output_length, timeout_ms }` - - `"1536x1024"` + The shell commands and limits that describe how to run the tool call. - - `"auto"` + - `commands: array of string` - - `LocalShell object { type }` + Ordered shell commands for the execution environment to run. - A tool that allows the model to execute shell commands in a local environment. + - `max_output_length: optional number` - - `type: "local_shell"` + Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - The type of the local shell tool. Always `local_shell`. + - `timeout_ms: optional number` - - `"local_shell"` + Maximum wall-clock time in milliseconds to allow the shell commands to run. - - `Shell object { type, allowed_callers, environment }` + - `call_id: string` - A tool that allows the model to execute shell commands. + The unique ID of the shell tool call generated by the model. - - `type: "shell"` + - `type: "shell_call"` - The type of the shell tool. Always `shell`. + The type of the item. Always `shell_call`. - - `"shell"` + - `"shell_call"` - - `allowed_callers: optional array of "direct" or "programmatic"` + - `id: optional string` - The tool invocation context(s). + The unique ID of the shell tool call. Populated when this item is returned via API. - - `"direct"` + - `agent: optional object { agent_name }` - - `"programmatic"` + The agent that produced this item. - - `environment: optional BetaContainerAuto or BetaLocalEnvironment or BetaContainerReference` + - `agent_name: string` - - `BetaContainerAuto object { type, file_ids, memory_limit, 2 more }` + The canonical name of the agent that produced this item. - - `BetaLocalEnvironment object { type, skills }` + - `caller: optional object { type } or object { caller_id, type }` - - `BetaContainerReference object { container_id, type }` + The execution context that produced this tool call. - - `Custom object { name, type, allowed_callers, 3 more }` + - `Direct object { type }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + - `type: "direct"` - - `name: string` + The caller type. Always `direct`. - The name of the custom tool, used to identify it in tool calls. + - `"direct"` - - `type: "custom"` + - `Program object { caller_id, type }` - The type of the custom tool. Always `custom`. + - `caller_id: string` - - `"custom"` + The call ID of the program item that produced this tool call. - - `allowed_callers: optional array of "direct" or "programmatic"` + - `type: "program"` - The tool invocation context(s). + The caller type. Always `program`. - - `"direct"` + - `"program"` - - `"programmatic"` + - `environment: optional BetaLocalEnvironment or BetaContainerReference` - - `defer_loading: optional boolean` + The environment to execute the shell commands in. - Whether this tool should be deferred and discovered via tool search. + - `BetaLocalEnvironment object { type, skills }` - - `description: optional string` + - `BetaContainerReference object { container_id, type }` - Optional description of the custom tool, used to provide more context. + - `status: optional "in_progress" or "completed" or "incomplete"` - - `format: optional object { type } or object { definition, syntax, type }` + The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - The input format for the custom tool. Default is unconstrained text. + - `"in_progress"` - - `Text object { type }` + - `"completed"` - Unconstrained free-form text. + - `"incomplete"` - - `type: "text"` + - `ShellCallOutput object { call_id, output, type, 5 more }` - Unconstrained text format. Always `text`. + The streamed output items emitted by a shell tool call. - - `"text"` + - `call_id: string` - - `Grammar object { definition, syntax, type }` + The unique ID of the shell tool call generated by the model. - A grammar defined by the user. + - `output: array of BetaResponseFunctionShellCallOutputContent` - - `definition: string` + Captured chunks of stdout and stderr output, along with their associated outcomes. - The grammar definition. + - `outcome: object { type } or object { exit_code, type }` - - `syntax: "lark" or "regex"` + The exit or timeout outcome associated with this shell call. - The syntax of the grammar definition. One of `lark` or `regex`. + - `Timeout object { type }` - - `"lark"` + Indicates that the shell call exceeded its configured time limit. - - `"regex"` + - `type: "timeout"` - - `type: "grammar"` + The outcome type. Always `timeout`. - Grammar format. Always `grammar`. + - `"timeout"` - - `"grammar"` + - `Exit object { exit_code, type }` - - `Namespace object { description, name, tools, type }` + Indicates that the shell commands finished and returned an exit code. - Groups function/custom tools under a shared namespace. + - `exit_code: number` - - `description: string` + The exit code returned by the shell process. - A description of the namespace shown to the model. + - `type: "exit"` - - `name: string` + The outcome type. Always `exit`. - The namespace name used in tool calls (for example, `crm`). + - `"exit"` - - `tools: array of object { name, type, allowed_callers, 5 more } or object { name, type, allowed_callers, 3 more }` + - `stderr: string` - The function/custom tools available inside this namespace. + Captured stderr output for the shell call. - - `Function object { name, type, allowed_callers, 5 more }` + - `stdout: string` - - `name: string` + Captured stdout output for the shell call. - - `type: "function"` + - `type: "shell_call_output"` - - `"function"` + The type of the item. Always `shell_call_output`. - - `allowed_callers: optional array of "direct" or "programmatic"` + - `"shell_call_output"` - The tool invocation context(s). + - `id: optional string` - - `"direct"` + The unique ID of the shell tool call output. Populated when this item is returned via API. - - `"programmatic"` + - `agent: optional object { agent_name }` - - `defer_loading: optional boolean` + The agent that produced this item. - Whether this function should be deferred and discovered via tool search. + - `agent_name: string` - - `description: optional string` + The canonical name of the agent that produced this item. - - `output_schema: optional map[unknown]` + - `caller: optional object { type } or object { caller_id, type }` - A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + The execution context that produced this tool call. - - `parameters: optional unknown` + - `Direct object { type }` - - `strict: optional boolean` + - `type: "direct"` - Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + The caller type. Always `direct`. - - `Custom object { name, type, allowed_callers, 3 more }` + - `"direct"` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + - `Program object { caller_id, type }` - - `name: string` + - `caller_id: string` - The name of the custom tool, used to identify it in tool calls. + The call ID of the program item that produced this tool call. - - `type: "custom"` + - `type: "program"` - The type of the custom tool. Always `custom`. + The caller type. Always `program`. - - `"custom"` + - `"program"` - - `allowed_callers: optional array of "direct" or "programmatic"` + - `max_output_length: optional number` - The tool invocation context(s). + The maximum number of UTF-8 characters captured for this shell call's combined output. - - `"direct"` + - `status: optional "in_progress" or "completed" or "incomplete"` - - `"programmatic"` + The status of the shell call output. - - `defer_loading: optional boolean` + - `"in_progress"` - Whether this tool should be deferred and discovered via tool search. + - `"completed"` - - `description: optional string` + - `"incomplete"` - Optional description of the custom tool, used to provide more context. + - `ApplyPatchCall object { call_id, operation, status, 4 more }` - - `format: optional object { type } or object { definition, syntax, type }` + A tool call representing a request to create, delete, or update files using diff patches. - The input format for the custom tool. Default is unconstrained text. + - `call_id: string` - - `Text object { type }` + The unique ID of the apply patch tool call generated by the model. - Unconstrained free-form text. + - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - `type: "text"` + The specific create, delete, or update instruction for the apply_patch tool call. - Unconstrained text format. Always `text`. + - `CreateFile object { diff, path, type }` - - `"text"` + Instruction for creating a new file via the apply_patch tool. - - `Grammar object { definition, syntax, type }` + - `diff: string` - A grammar defined by the user. + Unified diff content to apply when creating the file. - - `definition: string` + - `path: string` - The grammar definition. + Path of the file to create relative to the workspace root. - - `syntax: "lark" or "regex"` + - `type: "create_file"` - The syntax of the grammar definition. One of `lark` or `regex`. + The operation type. Always `create_file`. - - `"lark"` + - `"create_file"` - - `"regex"` + - `DeleteFile object { path, type }` - - `type: "grammar"` + Instruction for deleting an existing file via the apply_patch tool. - Grammar format. Always `grammar`. + - `path: string` - - `"grammar"` + Path of the file to delete relative to the workspace root. - - `type: "namespace"` + - `type: "delete_file"` - The type of the tool. Always `namespace`. + The operation type. Always `delete_file`. - - `"namespace"` + - `"delete_file"` - - `ToolSearch object { type, description, execution, parameters }` + - `UpdateFile object { diff, path, type }` - Hosted or BYOT tool search configuration for deferred tools. + Instruction for updating an existing file via the apply_patch tool. - - `type: "tool_search"` + - `diff: string` - The type of the tool. Always `tool_search`. + Unified diff content to apply to the existing file. - - `"tool_search"` + - `path: string` - - `description: optional string` + Path of the file to update relative to the workspace root. - Description shown to the model for a client-executed tool search tool. + - `type: "update_file"` - - `execution: optional "server" or "client"` + The operation type. Always `update_file`. - Whether tool search is executed by the server or by the client. + - `"update_file"` - - `"server"` + - `status: "in_progress" or "completed"` - - `"client"` + The status of the apply patch tool call. One of `in_progress` or `completed`. - - `parameters: optional unknown` + - `"in_progress"` - Parameter schema for a client-executed tool search tool. + - `"completed"` - - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }` + - `type: "apply_patch_call"` - This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + The type of the item. Always `apply_patch_call`. - - `type: "web_search_preview" or "web_search_preview_2025_03_11"` + - `"apply_patch_call"` - The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. + - `id: optional string` - - `"web_search_preview"` + The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `"web_search_preview_2025_03_11"` + - `agent: optional object { agent_name }` - - `search_content_types: optional array of "text" or "image"` + The agent that produced this item. - - `"text"` + - `agent_name: string` - - `"image"` + The canonical name of the agent that produced this item. - - `search_context_size: optional "low" or "medium" or "high"` + - `caller: optional object { type } or object { caller_id, type }` - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + The execution context that produced this tool call. - - `"low"` + - `Direct object { type }` - - `"medium"` + - `type: "direct"` - - `"high"` + The caller type. Always `direct`. - - `user_location: optional object { type, city, country, 2 more }` + - `"direct"` - The user's location. + - `Program object { caller_id, type }` - - `type: "approximate"` + - `caller_id: string` - The type of location approximation. Always `approximate`. + The call ID of the program item that produced this tool call. - - `"approximate"` + - `type: "program"` - - `city: optional string` + The caller type. Always `program`. - Free text input for the city of the user, e.g. `San Francisco`. + - `"program"` - - `country: optional string` + - `ApplyPatchCallOutput object { call_id, status, type, 4 more }` - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + The streamed output emitted by an apply patch tool call. - - `region: optional string` + - `call_id: string` - Free text input for the region of the user, e.g. `California`. + The unique ID of the apply patch tool call generated by the model. - - `timezone: optional string` + - `status: "completed" or "failed"` - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + The status of the apply patch tool call output. One of `completed` or `failed`. - - `ApplyPatch object { type, allowed_callers }` + - `"completed"` - Allows the assistant to create, delete, or update files using unified diffs. + - `"failed"` - - `type: "apply_patch"` + - `type: "apply_patch_call_output"` - The type of the tool. Always `apply_patch`. + The type of the item. Always `apply_patch_call_output`. - - `"apply_patch"` + - `"apply_patch_call_output"` - - `allowed_callers: optional array of "direct" or "programmatic"` + - `id: optional string` - The tool invocation context(s). + The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - `"direct"` + - `agent: optional object { agent_name }` - - `"programmatic"` + The agent that produced this item. - - `top_p: number` + - `agent_name: string` - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. + The canonical name of the agent that produced this item. - We generally recommend altering this or `temperature` but not both. + - `caller: optional object { type } or object { caller_id, type }` - - `background: optional boolean` + The execution context that produced this tool call. - Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + - `Direct object { type }` - - `completed_at: optional number` + - `type: "direct"` - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. + The caller type. Always `direct`. - - `conversation: optional object { id }` + - `"direct"` - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. + - `Program object { caller_id, type }` - - `id: string` + - `caller_id: string` - The unique ID of the conversation that this response was associated with. + The call ID of the program item that produced this tool call. - - `max_output_tokens: optional number` + - `type: "program"` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + The caller type. Always `program`. - - `max_tool_calls: optional number` + - `"program"` - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. + - `output: optional string` - - `moderation: optional object { input, output }` + Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - Moderation results for the response input and output, if moderated completions were requested. + - `McpListTools object { id, server_label, tools, 3 more }` - - `input: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` + A list of tools available on an MCP server. - Moderation for the response input. + - `id: string` - - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }` + The unique ID of the list. - A moderation result produced for the response input or output. + - `server_label: string` - - `categories: map[boolean]` + The label of the MCP server. - A dictionary of moderation categories to booleans, True if the input is flagged under this category. + - `tools: array of object { input_schema, name, annotations, description }` - - `category_applied_input_types: map[array of "text" or "image"]` + The tools available on the server. - Which modalities of input are reflected by the score for each category. + - `input_schema: unknown` - - `"text"` + The JSON schema describing the tool's input. - - `"image"` + - `name: string` - - `category_scores: map[number]` + The name of the tool. - A dictionary of moderation categories to scores. + - `annotations: optional unknown` - - `flagged: boolean` + Additional annotations about the tool. - A boolean indicating whether the content was flagged by any category. + - `description: optional string` - - `model: string` + The description of the tool. - The moderation model that produced this result. + - `type: "mcp_list_tools"` - - `type: "moderation_result"` + The type of the item. Always `mcp_list_tools`. - The object type, which was always `moderation_result` for successful moderation results. + - `"mcp_list_tools"` - - `"moderation_result"` + - `agent: optional object { agent_name }` - - `Error object { code, message, type }` + The agent that produced this item. - An error produced while attempting moderation for the response input or output. + - `agent_name: string` - - `code: string` + The canonical name of the agent that produced this item. - The error code. + - `error: optional string` - - `message: string` + Error message if the server could not list tools. - The error message. + - `McpApprovalRequest object { id, arguments, name, 3 more }` - - `type: "error"` + A request for human approval of a tool invocation. - The object type, which was always `error` for moderation failures. + - `id: string` - - `"error"` + The unique ID of the approval request. - - `output: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` + - `arguments: string` - Moderation for the response output. + A JSON string of arguments for the tool. - - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }` + - `name: string` - A moderation result produced for the response input or output. + The name of the tool to run. - - `categories: map[boolean]` + - `server_label: string` - A dictionary of moderation categories to booleans, True if the input is flagged under this category. + The label of the MCP server making the request. - - `category_applied_input_types: map[array of "text" or "image"]` + - `type: "mcp_approval_request"` - Which modalities of input are reflected by the score for each category. + The type of the item. Always `mcp_approval_request`. - - `"text"` + - `"mcp_approval_request"` - - `"image"` + - `agent: optional object { agent_name }` - - `category_scores: map[number]` + The agent that produced this item. - A dictionary of moderation categories to scores. + - `agent_name: string` - - `flagged: boolean` + The canonical name of the agent that produced this item. - A boolean indicating whether the content was flagged by any category. + - `McpApprovalResponse object { approval_request_id, approve, type, 3 more }` - - `model: string` + A response to an MCP approval request. - The moderation model that produced this result. + - `approval_request_id: string` - - `type: "moderation_result"` + The ID of the approval request being answered. - The object type, which was always `moderation_result` for successful moderation results. + - `approve: boolean` - - `"moderation_result"` + Whether the request was approved. - - `Error object { code, message, type }` + - `type: "mcp_approval_response"` - An error produced while attempting moderation for the response input or output. + The type of the item. Always `mcp_approval_response`. - - `code: string` + - `"mcp_approval_response"` - The error code. + - `id: optional string` - - `message: string` + The unique ID of the approval response - The error message. + - `agent: optional object { agent_name }` - - `type: "error"` + The agent that produced this item. - The object type, which was always `error` for moderation failures. + - `agent_name: string` - - `"error"` + The canonical name of the agent that produced this item. - - `previous_response_id: optional string` + - `reason: optional string` - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + Optional reason for the decision. - - `prompt: optional BetaResponsePrompt` + - `McpCall object { id, arguments, name, 7 more }` - Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + An invocation of a tool on an MCP server. - `id: string` - The unique identifier of the prompt template to use. + The unique ID of the tool call. - - `variables: optional map[string or BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile]` + - `arguments: string` - Optional map of values to substitute in for variables in your - prompt. The substitution values can either be strings, or other - Response input types like images or files. + A JSON string of the arguments passed to the tool. - - `string` + - `name: string` - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + The name of the tool that was run. - A text input to the model. + - `server_label: string` - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + The label of the MCP server running the tool. - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + - `type: "mcp_call"` - - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + The type of the item. Always `mcp_call`. - A file input to the model. + - `"mcp_call"` - - `version: optional string` + - `agent: optional object { agent_name }` - Optional version of the prompt template. + The agent that produced this item. - - `prompt_cache_key: optional string` + - `agent_name: string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + The canonical name of the agent that produced this item. - - `prompt_cache_options: optional object { mode, ttl }` + - `approval_request_id: optional string` - The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + Unique identifier for the MCP tool call approval request. + Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. - - `mode: "implicit" or "explicit"` + - `error: optional string` - Whether implicit prompt-cache breakpoints were enabled. + The error from the tool call, if any. - - `"implicit"` + - `output: optional string` - - `"explicit"` + The output from the tool call. - - `ttl: "30m"` + - `status: optional "in_progress" or "completed" or "incomplete" or 2 more` - The minimum lifetime applied to each cache breakpoint. + The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. - - `"30m"` + - `"in_progress"` - - `prompt_cache_retention: optional "in_memory" or "24h"` + - `"completed"` - Deprecated. Use `prompt_cache_options.ttl` instead. + - `"incomplete"` - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). - This field expresses a maximum retention policy, while - `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two - fields are independent and do not interact. - For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. + - `"calling"` - For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: + - `"failed"` - - Organizations without ZDR enabled default to `24h`. - - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified. + - `CustomToolCallOutput object { call_id, output, type, 3 more }` - - `"in_memory"` + The output of a custom tool call from your code, being sent back to the model. - - `"24h"` + - `call_id: string` - - `reasoning: optional object { context, effort, generate_summary, 2 more }` + The call ID, used to map this custom tool call output to a custom tool call. - **gpt-5 and o-series models only** + - `output: string or array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` - Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + The output from the custom tool call generated by your code. + Can be a string or an list of output content. - - `context: optional "auto" or "current_turn" or "all_turns"` + - `StringOutput = string` - Controls which reasoning items are rendered back to the model on later turns. - When returned on a response, this is the effective reasoning context mode - used for the response. + A string of the output of the custom tool call. - - `"auto"` + - `OutputContentList = array of BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile` - - `"current_turn"` + Text, image, or file output of the custom tool call. - - `"all_turns"` + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` - - `effort: optional "none" or "minimal" or "low" or 4 more` + A text input to the model. - Constrains effort on reasoning for reasoning models. Currently supported - values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. - Reducing reasoning effort can result in faster responses and fewer tokens - used on reasoning in a response. Not all reasoning models support every - value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) - for model-specific support. + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - - `"none"` + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `"minimal"` + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` - - `"low"` + A file input to the model. - - `"medium"` + - `type: "custom_tool_call_output"` - - `"high"` + The type of the custom tool call output. Always `custom_tool_call_output`. - - `"xhigh"` + - `"custom_tool_call_output"` - - `"max"` + - `id: optional string` - - `generate_summary: optional "auto" or "concise" or "detailed"` + The unique ID of the custom tool call output in the OpenAI platform. - **Deprecated:** use `summary` instead. + - `agent: optional object { agent_name }` - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. + The agent that produced this item. - - `"auto"` + - `agent_name: string` - - `"concise"` + The canonical name of the agent that produced this item. - - `"detailed"` + - `caller: optional object { type } or object { caller_id, type }` - - `mode: optional string or "standard" or "pro"` + The execution context that produced this tool call. - Controls the reasoning execution mode for the request. + - `Direct object { type }` - When returned on a response, this is the effective execution mode. + - `type: "direct"` - - `string` + The caller type. Always `direct`. - - `"standard" or "pro"` + - `"direct"` - Controls the reasoning execution mode for the request. + - `Program object { caller_id, type }` - When returned on a response, this is the effective execution mode. + - `caller_id: string` - - `"standard"` + The call ID of the program item that produced this tool call. - - `"pro"` + - `type: "program"` - - `summary: optional "auto" or "concise" or "detailed"` + The caller type. Always `program`. - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. + - `"program"` - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. + - `CustomToolCall object { call_id, input, name, 5 more }` - - `"auto"` + A call to a custom tool created by the model. - - `"concise"` + - `call_id: string` - - `"detailed"` + An identifier used to map this custom tool call to a tool call output. - - `safety_identifier: optional string` + - `input: string` - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The input for the custom tool call generated by the model. - - `service_tier: optional "auto" or "default" or "flex" or 2 more` + - `name: string` - Specifies the processing type used for serving the request. + The name of the custom tool being called. - - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. + - `type: "custom_tool_call"` - 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. + The type of the custom tool call. Always `custom_tool_call`. - - `"auto"` + - `"custom_tool_call"` - - `"default"` + - `id: optional string` - - `"flex"` + The unique ID of the custom tool call in the OpenAI platform. - - `"scale"` + - `agent: optional object { agent_name }` - - `"priority"` + The agent that produced this item. - - `status: optional BetaResponseStatus` + - `agent_name: string` - The status of the response generation. One of `completed`, `failed`, - `in_progress`, `cancelled`, `queued`, or `incomplete`. + The canonical name of the agent that produced this item. - - `"completed"` + - `caller: optional object { type } or object { caller_id, type }` - - `"failed"` + The execution context that produced this tool call. - - `"in_progress"` + - `Direct object { type }` - - `"cancelled"` + - `type: "direct"` - - `"queued"` + - `"direct"` - - `"incomplete"` + - `Program object { caller_id, type }` - - `text: optional BetaResponseTextConfig` + - `caller_id: string` - Configuration options for a text response from the model. Can be plain - text or structured JSON data. Learn more: + The call ID of the program item that produced this tool call. - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - `type: "program"` - - `format: optional BetaResponseFormatTextConfig` + - `"program"` - An object specifying the format that the model must output. + - `namespace: optional string` - Configuring `{ "type": "json_schema" }` enables Structured Outputs, - which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + The namespace of the custom tool being called. - The default format is `{ "type": "text" }` with no additional options. + - `CompactionTrigger object { type, agent }` - **Not recommended for gpt-4o and newer models:** + Compacts the current context. Must be the final input item. - 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. + - `type: "compaction_trigger"` - - `Text object { type }` + The type of the item. Always `compaction_trigger`. - Default response format. Used to generate text responses. + - `"compaction_trigger"` - - `type: "text"` + - `agent: optional object { agent_name }` - The type of response format being defined. Always `text`. + The agent that produced this item. - - `"text"` + - `agent_name: string` - - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` + The canonical name of the agent that produced this item. - JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + - `ItemReference object { id, agent, type }` - - `name: string` + An internal identifier for an item to reference. - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. + - `id: string` - - `schema: map[unknown]` + The ID of the item to reference. - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). + - `agent: optional object { agent_name }` - - `type: "json_schema"` + The agent that produced this item. - The type of response format being defined. Always `json_schema`. + - `agent_name: string` - - `"json_schema"` + The canonical name of the agent that produced this item. - - `description: optional string` + - `type: optional "item_reference"` - A description of what the response format is for, used by the model to - determine how to respond in the format. + The type of item to reference. Always `item_reference`. - - `strict: optional boolean` + - `"item_reference"` - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + - `Program object { id, call_id, code, 3 more }` - - `JSONObject object { type }` + - `id: string` - JSON object response format. An older method of generating JSON responses. - Using `json_schema` is recommended for models that support it. Note that the - model will not generate JSON without a system or user message instructing it - to do so. + The unique ID of this program item. - - `type: "json_object"` + - `call_id: string` - The type of response format being defined. Always `json_object`. + The stable call ID of the program item. - - `"json_object"` + - `code: string` - - `verbosity: optional "low" or "medium" or "high"` + The JavaScript source executed by programmatic tool calling. - Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose responses. - Currently supported values are `low`, `medium`, and `high`. + - `fingerprint: string` - - `"low"` + Opaque program replay fingerprint that must be round-tripped. - - `"medium"` + - `type: "program"` - - `"high"` + The item type. Always `program`. - - `top_logprobs: optional number` + - `"program"` - An integer between 0 and 20 specifying the maximum number of most likely - tokens to return at each token position, each with an associated log - probability. In some cases, the number of returned tokens may be fewer than - requested. + - `agent: optional object { agent_name }` - - `truncation: optional "auto" or "disabled"` + The agent that produced this item. - The truncation strategy to use for the model response. + - `agent_name: string` - - `auto`: If the input to this Response exceeds - the model's context window size, the model will truncate the - response to fit the context window by dropping items from the beginning of the conversation. - - `disabled` (default): If the input size will exceed the context window - size for a model, the request will fail with a 400 error. + The canonical name of the agent that produced this item. - - `"auto"` + - `ProgramOutput object { id, call_id, result, 3 more }` - - `"disabled"` + - `id: string` - - `usage: optional BetaResponseUsage` + The unique ID of this program output item. - Represents token usage details including input tokens, output tokens, - a breakdown of output tokens, and the total tokens used. + - `call_id: string` - - `input_tokens: number` + The call ID of the program item. - The number of input tokens. + - `result: string` - - `input_tokens_details: object { cache_write_tokens, cached_tokens }` + The result produced by the program item. - A detailed breakdown of the input tokens. + - `status: "completed" or "incomplete"` - - `cache_write_tokens: number` + The terminal status of the program output. - The number of input tokens that were written to the cache. + - `"completed"` - - `cached_tokens: number` + - `"incomplete"` - The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + - `type: "program_output"` - - `output_tokens: number` + The item type. Always `program_output`. - The number of output tokens. + - `"program_output"` - - `output_tokens_details: object { reasoning_tokens }` + - `agent: optional object { agent_name }` - A detailed breakdown of the output tokens. + The agent that produced this item. - - `reasoning_tokens: number` + - `agent_name: string` - The number of reasoning tokens. + The canonical name of the agent that produced this item. - - `total_tokens: number` + - `response_id: string` - The total number of tokens used. + The ID of the active response that should receive the input. - - `user: optional string` + - `type: "response.inject"` - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The event discriminator. Always `response.inject`. - - `sequence_number: number` + - `"response.inject"` - The sequence number of this event. +### Beta Response Inject Failed Event - - `type: "response.incomplete"` +- `BetaResponseInjectFailedEvent object { error, input, response_id, 3 more }` - The type of the event. Always `response.incomplete`. + 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. - - `"response.incomplete"` + - `error: object { code, message }` - - `agent: optional object { agent_name }` + Information about why the input was not committed. - The agent that owns this multi-agent streaming event. + - `code: "response_already_completed" or "response_not_found"` - - `agent_name: string` + A machine-readable error code. - The canonical name of the agent that produced this item. + - `"response_already_completed"` + + - `"response_not_found"` -### Beta Response Input + - `message: string` -- `BetaResponseInput = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + A human-readable description of the error. - A list of one or many input items to the model, containing - different content types. + - `input: array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + + The raw input items that were not committed. - `BetaEasyInputMessage object { content, role, phase, type }` @@ -123168,7 +127096,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -123339,7 +127267,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -123443,17 +127371,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -123469,6 +127387,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -123527,7 +127455,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -123603,7 +127531,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -123964,7 +127892,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -124068,7 +127996,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -124143,7 +128071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -124151,7 +128079,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -124181,7 +128109,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -124335,7 +128263,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -124860,7 +128788,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -124920,7 +128848,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -124972,7 +128900,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -125196,19 +129124,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -125237,13 +129154,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -125251,14 +129168,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -125473,7 +129384,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -125587,7 +129498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -126068,7 +129979,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -126128,7 +130039,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -126180,7 +130091,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -126372,19 +130283,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -126413,13 +130313,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -126427,14 +130327,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -126531,7 +130425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -126645,7 +130539,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -126836,7 +130730,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -126902,7 +130796,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -127711,7 +131605,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -127925,6 +131819,25 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. + - `response_id: string` + + The ID of the response that rejected the input. + + - `sequence_number: number` + + The sequence number for this event. + + - `type: "response.inject.failed"` + + The event discriminator. Always `response.inject.failed`. + + - `"response.inject.failed"` + + - `stream_id: optional string` + + The multiplexed WebSocket stream that emitted the event. This field is + present only when WebSocket multiplexing is enabled separately. + ### Beta Response Input Audio - `BetaResponseInputAudio object { input_audio, type }` @@ -127984,7 +131897,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -128168,7 +132081,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -128210,7 +132123,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -128281,7 +132194,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -128404,7 +132317,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -128889,7 +132802,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -128993,17 +132906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -129019,6 +132922,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -129077,7 +132990,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -129153,7 +133066,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -129269,7 +133182,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -129424,7 +133337,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -129472,7 +133385,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -129628,6 +133541,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -129636,8 +133551,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -129655,7 +133568,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -129759,7 +133672,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -130128,7 +134041,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -130603,7 +134516,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -130663,7 +134576,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -130715,7 +134628,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -130939,19 +134852,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -130980,13 +134882,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -130994,14 +134896,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -131216,7 +135112,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -131330,7 +135226,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -131807,7 +135703,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -131867,7 +135763,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -131919,7 +135815,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -132111,19 +136007,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -132152,13 +136037,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -132166,14 +136051,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -132270,7 +136149,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -132384,7 +136263,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -132568,7 +136447,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -133461,7 +137340,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -133542,7 +137421,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -133646,17 +137525,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -133672,6 +137541,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -133730,7 +137609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -133806,7 +137685,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -133922,7 +137801,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -134077,7 +137956,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -134125,7 +138004,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -134281,6 +138160,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -134289,8 +138170,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -134308,7 +138187,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -134412,7 +138291,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -134781,7 +138660,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -135256,7 +139135,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -135316,7 +139195,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -135368,7 +139247,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -135592,19 +139471,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -135633,13 +139501,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -135647,14 +139515,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -135869,7 +139731,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -135983,7 +139845,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -136460,7 +140322,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -136520,7 +140382,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -136572,7 +140434,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -136764,19 +140626,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -136805,13 +140656,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -136819,14 +140670,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -136923,7 +140768,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -137037,7 +140882,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -137221,7 +141066,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -138114,7 +141959,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -138217,7 +142062,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -138321,17 +142166,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -138347,6 +142182,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -138405,7 +142250,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -138481,7 +142326,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -138597,7 +142442,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -138752,7 +142597,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -138800,7 +142645,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -138956,6 +142801,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -138964,8 +142811,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -138983,7 +142828,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -139087,7 +142932,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -139456,7 +143301,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -139931,7 +143776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -139991,7 +143836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -140043,7 +143888,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -140267,19 +144112,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -140308,13 +144142,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -140322,14 +144156,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -140544,7 +144372,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -140658,7 +144486,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -141135,7 +144963,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -141195,7 +145023,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -141247,7 +145075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -141439,19 +145267,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -141480,13 +145297,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -141494,14 +145311,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -141598,7 +145409,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -141712,7 +145523,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -141896,7 +145707,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -142789,7 +146600,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -142884,7 +146695,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -142988,17 +146799,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -143014,6 +146815,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -143087,631 +146898,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Beta Response Output Text -- `BetaResponseOutputText object { annotations, text, type, logprobs }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - -### Beta Response Output Text Annotation Added Event - -- `BetaResponseOutputTextAnnotationAddedEvent object { annotation, annotation_index, content_index, 5 more }` - - Emitted when an annotation is added to output text content. - - - `annotation: unknown` - - The annotation object being added. (See annotation schema for details.) - - - `annotation_index: number` - - The index of the annotation within the content part. - - - `content_index: number` - - The index of the content part within the output item. - - - `item_id: string` - - The unique identifier of the item to which the annotation is being added. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.output_text.annotation.added"` - - The type of the event. Always 'response.output_text.annotation.added'. - - - `"response.output_text.annotation.added"` - - - `agent: optional object { agent_name }` - - The agent that owns this multi-agent streaming event. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - -### Beta Response Prompt - -- `BetaResponsePrompt object { id, variables, version }` - - Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile]` - - Optional map of values to substitute in for variables in your - prompt. The substitution values can either be strings, or other - Response input types like images or files. - - - `string` - - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `text: string` - - The text input to the model. - - - `type: "input_text"` - - The type of the input item. Always `input_text`. - - - `"input_text"` - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputFile object { type, detail, file_data, 4 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "auto" or "low" or "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`. - - - `"auto"` - - - `"low"` - - - `"high"` - - - `file_data: optional string` - - The content of the file to be sent to the model. - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `file_url: optional string` - - The URL of the file to be sent to the model. - - - `filename: optional string` - - The name of the file to be sent to the model. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `version: optional string` - - Optional version of the prompt template. - -### Beta Response Queued Event - -- `BetaResponseQueuedEvent object { response, sequence_number, type, agent }` - - Emitted when a response is queued and waiting to be processed. - - - `response: BetaResponse` - - The full response object that is queued. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: BetaResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"bio_policy"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` - - A list of one or many input items to the model, containing - different content types. - - - `BetaEasyInputMessage object { 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. - - - `content: string or BetaResponseInputMessageContentList` - - Text, image, or audio input to the model, used to generate a response. - Can also contain previous assistant responses. - - - `TextInput = string` - - A text input to the model. - - - `BetaResponseInputMessageContentList = array of BetaResponseInputContent` - - A list of one or many input items to the model, containing different content - types. - - - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `text: string` - - The text input to the model. - - - `type: "input_text"` - - The type of the input item. Always `input_text`. - - - `"input_text"` - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `BetaResponseInputFile object { type, detail, file_data, 4 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "auto" or "low" or "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`. - - - `"auto"` - - - `"low"` - - - `"high"` - - - `file_data: optional string` - - The content of the file to be sent to the model. - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `file_url: optional string` - - The URL of the file to be sent to the model. - - - `filename: optional string` - - The name of the file to be sent to the model. - - - `prompt_cache_breakpoint: optional object { mode }` - - 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: "explicit"` - - The breakpoint mode. Always `explicit`. - - - `"explicit"` - - - `role: "user" or "assistant" or "system" or "developer"` - - The role of the message input. One of `user`, `assistant`, `system`, or - `developer`. - - - `"user"` - - - `"assistant"` - - - `"system"` - - - `"developer"` - - - `phase: optional "commentary" or "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. - - - `"commentary"` - - - `"final_answer"` - - - `type: optional "message"` - - The type of the message input. Always `message`. - - - `"message"` - - - `Message object { content, role, agent, 2 more }` - - 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. - - - `content: BetaResponseInputMessageContentList` - - A list of one or many input items to the model, containing different content - types. - - - `role: "user" or "system" or "developer"` - - The role of the message input. One of `user`, `system`, or `developer`. - - - `"user"` - - - `"system"` - - - `"developer"` - - - `agent: optional object { agent_name }` - - The agent that produced this item. - - - `agent_name: string` - - The canonical name of the agent that produced this item. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: optional "message"` - - The type of the message input. Always set to `message`. - - - `"message"` - - - `BetaResponseOutputMessage object { id, content, role, 4 more }` - - An output message from the model. - - - `id: string` - - The unique ID of the output message. - - - `content: array of BetaResponseOutputText or BetaResponseOutputRefusal` - - The content of the output message. - - - `BetaResponseOutputText object { annotations, text, type, logprobs }` +- `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -143815,6 +147002,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + + - `top_logprobs: array of object { token, bytes, logprob }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + - `text: string` The text output from the model. @@ -143825,7 +147028,605 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` +### Beta Response Output Text Annotation Added Event + +- `BetaResponseOutputTextAnnotationAddedEvent object { annotation, annotation_index, content_index, 5 more }` + + Emitted when an annotation is added to output text content. + + - `annotation: unknown` + + The annotation object being added. (See annotation schema for details.) + + - `annotation_index: number` + + The index of the annotation within the content part. + + - `content_index: number` + + The index of the content part within the output item. + + - `item_id: string` + + The unique identifier of the item to which the annotation is being added. + + - `output_index: number` + + The index of the output item in the response's output array. + + - `sequence_number: number` + + The sequence number of this event. + + - `type: "response.output_text.annotation.added"` + + The type of the event. Always 'response.output_text.annotation.added'. + + - `"response.output_text.annotation.added"` + + - `agent: optional object { agent_name }` + + The agent that owns this multi-agent streaming event. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + +### Beta Response Prompt + +- `BetaResponsePrompt object { id, variables, version }` + + Reference to a prompt template and its variables. + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). + + - `id: string` + + The unique identifier of the prompt template to use. + + - `variables: optional map[string or BetaResponseInputText or BetaResponseInputImage or BetaResponseInputFile]` + + Optional map of values to substitute in for variables in your + prompt. The substitution values can either be strings, or other + Response input types like images or files. + + - `string` + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `text: string` + + The text input to the model. + + - `type: "input_text"` + + The type of the input item. Always `input_text`. + + - `"input_text"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `detail: "low" or "high" or "auto" or "original"` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `type: "input_image"` + + The type of the input item. Always `input_image`. + + - `"input_image"` + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `image_url: optional string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `type: "input_file"` + + The type of the input item. Always `input_file`. + + - `"input_file"` + + - `detail: optional "auto" or "low" or "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`. + + - `"auto"` + + - `"low"` + + - `"high"` + + - `file_data: optional string` + + The content of the file to be sent to the model. + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `file_url: optional string` + + The URL of the file to be sent to the model. + + - `filename: optional string` + + The name of the file to be sent to the model. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `version: optional string` + + Optional version of the prompt template. + +### Beta Response Queued Event + +- `BetaResponseQueuedEvent object { response, sequence_number, type, agent }` + + Emitted when a response is queued and waiting to be processed. + + - `response: BetaResponse` + + The full response object that is queued. + + - `id: string` + + Unique identifier for this Response. + + - `created_at: number` + + Unix timestamp (in seconds) of when this Response was created. + + - `error: BetaResponseError` + + An error object returned when the model fails to generate a Response. + + - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more` + + The error code for the response. + + - `"server_error"` + + - `"rate_limit_exceeded"` + + - `"invalid_prompt"` + + - `"bio_policy"` + + - `"vector_store_timeout"` + + - `"invalid_image"` + + - `"invalid_image_format"` + + - `"invalid_base64_image"` + + - `"invalid_image_url"` + + - `"image_too_large"` + + - `"image_too_small"` + + - `"image_parse_error"` + + - `"image_content_policy_violation"` + + - `"invalid_image_mode"` + + - `"image_file_too_large"` + + - `"unsupported_image_media_type"` + + - `"empty_image_file"` + + - `"failed_to_download_image"` + + - `"image_file_not_found"` + + - `message: string` + + A human-readable description of the error. + + - `incomplete_details: object { reason }` + + Details about why the response is incomplete. + + - `reason: optional "max_output_tokens" or "content_filter"` + + The reason why the response is incomplete. + + - `"max_output_tokens"` + + - `"content_filter"` + + - `instructions: string or array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + + A system (or developer) message inserted into the model's context. + + When using along with `previous_response_id`, the instructions from a previous + response will not be carried over to the next response. This makes it simple + to swap out system (or developer) messages in new responses. + + - `string` + + A text input to the model, equivalent to a text input with the + `developer` role. + + - `InputItemList = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + + A list of one or many input items to the model, containing + different content types. + + - `BetaEasyInputMessage object { 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. + + - `content: string or BetaResponseInputMessageContentList` + + Text, image, or audio input to the model, used to generate a response. + Can also contain previous assistant responses. + + - `TextInput = string` + + A text input to the model. + + - `BetaResponseInputMessageContentList = array of BetaResponseInputContent` + + A list of one or many input items to the model, containing different content + types. + + - `BetaResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `text: string` + + The text input to the model. + + - `type: "input_text"` + + The type of the input item. Always `input_text`. + + - `"input_text"` + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `detail: "low" or "high" or "auto" or "original"` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `type: "input_image"` + + The type of the input item. Always `input_image`. + + - `"input_image"` + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `image_url: optional string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `BetaResponseInputFile object { type, detail, file_data, 4 more }` + + A file input to the model. + + - `type: "input_file"` + + The type of the input item. Always `input_file`. + + - `"input_file"` + + - `detail: optional "auto" or "low" or "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`. + + - `"auto"` + + - `"low"` + + - `"high"` + + - `file_data: optional string` + + The content of the file to be sent to the model. + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `file_url: optional string` + + The URL of the file to be sent to the model. + + - `filename: optional string` + + The name of the file to be sent to the model. + + - `prompt_cache_breakpoint: optional object { mode }` + + 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: "explicit"` + + The breakpoint mode. Always `explicit`. + + - `"explicit"` + + - `role: "user" or "assistant" or "system" or "developer"` + + The role of the message input. One of `user`, `assistant`, `system`, or + `developer`. + + - `"user"` + + - `"assistant"` + + - `"system"` + + - `"developer"` + + - `phase: optional "commentary" or "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. + + - `"commentary"` + + - `"final_answer"` + + - `type: optional "message"` + + The type of the message input. Always `message`. + + - `"message"` + + - `Message object { content, role, agent, 2 more }` + + 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. + + - `content: BetaResponseInputMessageContentList` + + A list of one or many input items to the model, containing different content + types. + + - `role: "user" or "system" or "developer"` + + The role of the message input. One of `user`, `system`, or `developer`. + + - `"user"` + + - `"system"` + + - `"developer"` + + - `agent: optional object { agent_name }` + + The agent that produced this item. + + - `agent_name: string` + + The canonical name of the agent that produced this item. + + - `status: optional "in_progress" or "completed" or "incomplete"` + + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `"in_progress"` + + - `"completed"` + + - `"incomplete"` + + - `type: optional "message"` + + The type of the message input. Always set to `message`. + + - `"message"` + + - `BetaResponseOutputMessage object { id, content, role, 4 more }` + + An output message from the model. + + - `id: string` + + The unique ID of the output message. + + - `content: array of BetaResponseOutputText or BetaResponseOutputRefusal` + + The content of the output message. + + - `BetaResponseOutputText object { annotations, logprobs, text, type }` + + A text output from the model. + + - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` + + The annotations of the text output. + + - `FileCitation object { file_id, filename, index, type }` + + A citation to a file. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the file cited. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_citation"` + + The type of the file citation. Always `file_citation`. + + - `"file_citation"` + + - `URLCitation object { end_index, start_index, title, 2 more }` + + A citation for a web resource used to generate a model response. + + - `end_index: number` + + The index of the last character of the URL citation in the message. + + - `start_index: number` + + The index of the first character of the URL citation in the message. + + - `title: string` + + The title of the web resource. + + - `type: "url_citation"` + + The type of the URL citation. Always `url_citation`. + + - `"url_citation"` + + - `url: string` + + The URL of the web resource. + + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` + + A citation for a container file used to generate a model response. + + - `container_id: string` + + The ID of the container file. + + - `end_index: number` + + The index of the last character of the container file citation in the message. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the container file cited. + + - `start_index: number` + + The index of the first character of the container file citation in the message. + + - `type: "container_file_citation"` + + The type of the container file citation. Always `container_file_citation`. + + - `"container_file_citation"` + + - `FilePath object { file_id, index, type }` + + A path to a file. + + - `file_id: string` + + The ID of the file. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_path"` + + The type of the file path. Always `file_path`. + + - `"file_path"` + + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -143841,6 +147642,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -143899,7 +147710,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -143975,7 +147786,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -144336,7 +148147,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -144440,7 +148251,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -144515,7 +148326,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -144523,7 +148334,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -144553,7 +148364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -144707,7 +148518,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -145232,7 +149043,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -145292,7 +149103,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -145344,7 +149155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -145568,19 +149379,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -145609,13 +149409,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -145623,14 +149423,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -145845,7 +149639,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -145959,7 +149753,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -146440,7 +150234,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -146500,7 +150294,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -146552,7 +150346,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -146744,19 +150538,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -146785,13 +150568,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -146799,14 +150582,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -146903,7 +150680,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -147017,7 +150794,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -147208,7 +150985,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -147274,7 +151051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -148083,7 +151860,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -148310,14 +152087,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -148536,7 +152313,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -148612,7 +152389,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -148708,7 +152485,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -148785,7 +152562,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -148833,7 +152610,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -148989,6 +152766,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -148997,8 +152776,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -149016,7 +152793,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -149120,7 +152897,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -149247,7 +153024,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -149722,7 +153499,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -149782,7 +153559,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -149834,7 +153611,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -150026,19 +153803,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -150067,13 +153833,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -150081,14 +153847,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -150185,7 +153945,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -150299,7 +154059,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -150776,7 +154536,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -150836,7 +154596,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -150888,7 +154648,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -151080,19 +154840,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -151121,13 +154870,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -151135,14 +154884,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -151239,7 +154982,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -151353,7 +155096,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -151537,7 +155280,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -152430,7 +156173,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -152561,12 +156304,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -152676,16 +156419,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -152949,7 +156692,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -153009,7 +156752,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -153061,7 +156804,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -153253,19 +156996,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -153294,13 +157026,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -153308,14 +157040,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -153412,7 +157138,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -153526,7 +157252,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -153706,7 +157432,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -153723,7 +157449,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -153845,16 +157571,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -153874,7 +157606,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -153886,7 +157618,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -153910,7 +157642,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -154017,7 +157749,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -154025,7 +157757,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -154062,8 +157794,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -154071,7 +157803,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -154094,7 +157826,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -154123,7 +157855,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -154191,7 +157923,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -154213,7 +157945,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -155003,7 +158735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -155174,7 +158906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -155278,17 +159010,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -155304,6 +159026,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -155362,7 +159094,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -155438,7 +159170,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -155799,7 +159531,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -155903,7 +159635,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -155978,7 +159710,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -155986,7 +159718,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -156016,7 +159748,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -156170,7 +159902,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -156695,7 +160427,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -156755,7 +160487,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -156807,7 +160539,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -157031,19 +160763,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -157072,13 +160793,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -157086,14 +160807,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -157308,7 +161023,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -157422,7 +161137,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -157903,7 +161618,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -157963,7 +161678,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -158015,7 +161730,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -158207,19 +161922,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -158248,13 +161952,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -158262,14 +161966,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -158366,7 +162064,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -158480,7 +162178,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -158671,7 +162369,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -158737,7 +162435,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -159546,7 +163244,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -159773,14 +163471,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -159999,7 +163697,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -160075,7 +163773,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -160171,7 +163869,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -160248,7 +163946,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -160296,7 +163994,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -160452,6 +164150,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -160460,8 +164160,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -160479,7 +164177,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -160583,7 +164281,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -160710,7 +164408,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -161185,7 +164883,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -161245,7 +164943,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -161297,7 +164995,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -161489,19 +165187,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -161530,13 +165217,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -161544,14 +165231,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -161648,7 +165329,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -161762,7 +165443,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -162239,7 +165920,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -162299,7 +165980,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -162351,7 +166032,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -162543,19 +166224,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -162584,13 +166254,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -162598,14 +166268,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -162702,7 +166366,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -162816,7 +166480,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -163000,7 +166664,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -163893,7 +167557,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -164024,12 +167688,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -164139,16 +167803,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -164412,7 +168076,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -164472,7 +168136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -164524,7 +168188,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -164716,19 +168380,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -164757,13 +168410,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -164771,14 +168424,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -164875,7 +168522,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -164989,7 +168636,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -165169,7 +168816,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -165186,7 +168833,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -165308,16 +168955,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -165337,7 +168990,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -165349,7 +169002,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -165373,7 +169026,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -165480,7 +169133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -165488,7 +169141,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -165525,8 +169178,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -165534,7 +169187,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -165557,7 +169210,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -165586,7 +169239,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -165654,7 +169307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -165676,7 +169329,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -165716,7 +169369,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -165776,7 +169429,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -166129,12 +169782,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `FunctionCallOutput object { id, call_id, output, 5 more }` @@ -166147,12 +169800,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `ComputerCallOutput object { id, call_id, output, 5 more }` @@ -166161,7 +169814,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `Program object { id, call_id, code, 3 more }` @@ -166175,7 +169828,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `ImageGenerationCall object { id, result, status, 2 more }` @@ -167347,8 +171000,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -167356,7 +171009,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -167379,7 +171032,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -167408,7 +171061,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -167585,7 +171238,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -167701,7 +171354,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Beta Responses Client Event -- `BetaResponsesClientEvent = object { type, background, context_management, 30 more } or object { input, response_id, type }` +- `BetaResponsesClientEvent = object { type, background, context_management, 30 more } or BetaResponseInjectEvent` Client events accepted by the Responses WebSocket server. @@ -167724,7 +171377,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `context_management: optional array of object { type, compact_threshold }` @@ -167783,24 +171436,24 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message.output_text.logprobs"` - - `input: optional string or BetaResponseInput` + - `input: optional string or array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` Text, image, or file inputs to the model, used to generate a response. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](/docs/guides/text) + - [Image inputs](/docs/guides/images) + - [File inputs](/docs/guides/pdf-files) + - [Conversation state](/docs/guides/conversation-state) + - [Function calling](/docs/guides/function-calling) - `TextInput = string` A text input to the model, equivalent to a text input with the `user` role. - - `BetaResponseInput = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` + - `InputItemList = array of BetaEasyInputMessage or object { content, role, agent, 2 more } or BetaResponseOutputMessage or 32 more` A list of one or many input items to the model, containing different content types. @@ -167853,7 +171506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -168024,7 +171677,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -168128,17 +171781,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -168154,6 +171797,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -168212,7 +171865,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -168288,7 +171941,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -168649,7 +172302,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -168753,7 +172406,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -168828,7 +172481,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -168836,7 +172489,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -168866,7 +172519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -169020,7 +172673,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -169545,7 +173198,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -169605,7 +173258,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -169657,7 +173310,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -169881,19 +173534,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -169922,13 +173564,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -169936,14 +173578,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -170158,7 +173794,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -170272,7 +173908,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -170753,7 +174389,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -170813,7 +174449,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -170865,7 +174501,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -171057,19 +174693,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -171098,13 +174723,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -171112,14 +174737,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -171216,7 +174835,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -171330,7 +174949,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -171521,7 +175140,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -171587,7 +175206,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -172396,7 +176015,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -172620,7 +176239,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -172639,14 +176258,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -172894,12 +176513,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -172919,7 +176538,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -172931,11 +176550,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` - Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/docs/guides/prompt-caching) for current details. - `mode: optional "implicit" or "explicit"` @@ -172955,7 +176574,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -173062,7 +176681,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -173070,7 +176689,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -173094,7 +176713,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](/docs/api-reference/responses-streaming) for more information. - `stream_options: optional object { include_obfuscation }` @@ -173121,8 +176740,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -173130,7 +176749,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -173153,7 +176772,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -173182,7 +176801,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -173272,12 +176891,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -173387,16 +177006,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -173660,7 +177279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -173720,7 +177339,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -173772,7 +177391,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -173964,19 +177583,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -174005,13 +177613,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -174019,14 +177627,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -174123,7 +177725,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -174237,7 +177839,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -174439,9 +178041,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - `ResponseInject object { input, response_id, type }` + - `BetaResponseInjectEvent object { input, response_id, type }` Injects input items into an active response over a WebSocket connection. The items are validated and committed atomically. Currently, the server @@ -174512,7 +178114,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -174588,7 +178190,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -174707,7 +178309,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -174811,7 +178413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -174886,7 +178488,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -174894,10 +178496,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. + - `BetaResponseInputTextContent object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision) + + - `BetaResponseInputFileContent object { type, detail, file_data, 4 more }` + + A file input to the model. + - `type: "function_call_output"` The type of the function tool call output. Always `function_call_output`. @@ -174968,7 +178582,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -175493,7 +179107,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -175553,7 +179167,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -175605,7 +179219,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -175797,19 +179411,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -175838,13 +179441,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -175852,14 +179455,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -175956,7 +179553,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -176070,7 +179667,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -176551,7 +180148,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -176611,7 +180208,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -176663,7 +180260,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -176855,19 +180452,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -176896,13 +180482,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -176910,14 +180496,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -177014,7 +180594,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -177128,7 +180708,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -177319,7 +180899,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -177385,7 +180965,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -178170,7 +181750,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -178798,7 +182378,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -178969,7 +182549,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -179073,17 +182653,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -179099,6 +182669,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -179157,7 +182737,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -179233,7 +182813,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -179594,7 +183174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -179698,7 +183278,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -179773,7 +183353,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -179781,7 +183361,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -179811,7 +183391,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -179965,7 +183545,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -180490,7 +184070,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -180550,7 +184130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -180602,7 +184182,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -180826,19 +184406,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -180867,13 +184436,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -180881,14 +184450,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -181103,7 +184666,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -181217,7 +184780,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -181698,7 +185261,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -181758,7 +185321,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -181810,7 +185373,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -182002,19 +185565,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -182043,13 +185595,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -182057,14 +185609,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -182161,7 +185707,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -182275,7 +185821,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -182466,7 +186012,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -182532,7 +186078,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -183341,7 +186887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -183568,14 +187114,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 92 more` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `"gpt-5.6-sol"` @@ -183794,7 +187340,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -183870,7 +187416,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -183966,7 +187512,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -184043,7 +187589,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -184091,7 +187637,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -184247,6 +187793,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -184255,8 +187803,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -184274,7 +187820,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -184378,7 +187924,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -184505,7 +188051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -184980,7 +188526,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -185040,7 +188586,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -185092,7 +188638,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -185284,19 +188830,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -185325,13 +188860,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -185339,14 +188874,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -185443,7 +188972,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -185557,7 +189086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -186034,7 +189563,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -186094,7 +189623,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -186146,7 +189675,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -186338,19 +189867,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -186379,13 +189897,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -186393,14 +189911,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -186497,7 +190009,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -186611,7 +190123,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -186795,7 +190307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -187688,7 +191200,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -187819,12 +191331,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -187934,16 +191446,16 @@ curl -X POST https://api.openai.com/v1/responses/compact \ We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - `Function object { name, parameters, strict, 5 more }` @@ -188207,7 +191719,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -188267,7 +191779,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -188319,7 +191831,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -188511,19 +192023,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -188552,13 +192053,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -188566,14 +192067,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -188670,7 +192165,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -188784,7 +192279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -188964,7 +192459,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional boolean` Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](/docs/guides/background). - `completed_at: optional number` @@ -188981,7 +192476,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `max_output_tokens: optional number` - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - `max_tool_calls: optional number` @@ -189103,16 +192598,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` + - `output_text: optional string` + + SDK-only convenience property that contains the aggregated text output + from all `output_text` items in the `output` array, if any are present. + Supported in the Python and JavaScript SDKs. + - `previous_response_id: optional string` The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `prompt: optional BetaResponsePrompt` Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -189132,7 +192633,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -189144,7 +192645,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `prompt_cache_key: optional string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - `prompt_cache_options: optional object { mode, ttl }` @@ -189168,7 +192669,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -189275,7 +192776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `safety_identifier: optional string` A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `service_tier: optional "auto" or "default" or "flex" or 2 more` @@ -189283,7 +192784,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - 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](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - 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. @@ -189320,8 +192821,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -189329,7 +192830,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -189352,7 +192853,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -189381,7 +192882,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -189449,7 +192950,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `cached_tokens: number` The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](/docs/guides/prompt-caching). - `output_tokens: number` @@ -189471,7 +192972,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - `sequence_number: number` @@ -189511,7 +193012,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -189571,7 +193072,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -189924,12 +193425,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `FunctionCallOutput object { id, call_id, output, 5 more }` @@ -189942,12 +193443,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `ComputerCallOutput object { id, call_id, output, 5 more }` @@ -189956,7 +193457,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `Program object { id, call_id, code, 3 more }` @@ -189970,7 +193471,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `ImageGenerationCall object { id, result, status, 2 more }` @@ -191135,7 +194636,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The canonical name of the agent that produced this item. - - `ResponseInjectCreated object { response_id, sequence_number, type, stream_id }` + - `BetaResponseInjectCreatedEvent object { response_id, sequence_number, type, stream_id }` Emitted when all injected input items were validated and committed to the active response. @@ -191159,7 +194660,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The multiplexed WebSocket stream that emitted the event. This field is present only when WebSocket multiplexing is enabled separately. - - `ResponseInjectFailed object { error, input, response_id, 3 more }` + - `BetaResponseInjectFailedEvent object { error, input, response_id, 3 more }` 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 @@ -191246,7 +194747,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -191322,7 +194823,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -191441,7 +194942,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -191545,7 +195046,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -191620,7 +195121,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -191628,10 +195129,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. + - `BetaResponseInputTextContent object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision) + + - `BetaResponseInputFileContent object { type, detail, file_data, 4 more }` + + A file input to the model. + - `type: "function_call_output"` The type of the function tool call output. Always `function_call_output`. @@ -191702,7 +195215,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -192227,7 +195740,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -192287,7 +195800,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -192339,7 +195852,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -192531,19 +196044,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -192572,13 +196074,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -192586,14 +196088,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -192690,7 +196186,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -192804,7 +196300,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -193285,7 +196781,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -193345,7 +196841,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -193397,7 +196893,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -193589,19 +197085,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -193630,13 +197115,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -193644,14 +197129,8 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -193748,7 +197227,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -193862,7 +197341,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -194053,7 +197532,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -194119,7 +197598,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -194904,7 +198383,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -195294,12 +198773,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -195333,7 +198812,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ **get** `/responses/{response_id}/input_items?beta=true` -List input items +Returns a list of input items for a given response. ### Path Parameters @@ -195435,7 +198914,7 @@ List input items - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -195566,7 +199045,7 @@ List input items The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -195670,17 +199149,7 @@ List input items - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -195696,6 +199165,16 @@ List input items - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -195754,7 +199233,7 @@ List input items - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -195830,7 +199309,7 @@ List input items - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -196197,7 +199676,7 @@ List input items - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -196398,7 +199877,7 @@ List input items - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -196475,7 +199954,7 @@ List input items A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -196523,7 +200002,7 @@ List input items - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -196679,6 +200158,8 @@ List input items The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -196687,8 +200168,6 @@ List input items The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -197046,7 +200525,7 @@ List input items - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -197106,7 +200585,7 @@ List input items - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -197158,7 +200637,7 @@ List input items Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -197382,19 +200861,8 @@ List input items - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -197423,13 +200891,13 @@ List input items Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -197437,14 +200905,8 @@ List input items - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -197659,7 +201121,7 @@ List input items - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -197773,7 +201235,7 @@ List input items - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -198250,7 +201712,7 @@ List input items - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -198310,7 +201772,7 @@ List input items - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -198362,7 +201824,7 @@ List input items Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -198554,19 +202016,8 @@ List input items - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -198595,13 +202046,13 @@ List input items Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -198609,14 +202060,8 @@ List input items - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -198713,7 +202158,7 @@ List input items - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -198827,7 +202272,7 @@ List input items - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -199014,7 +202459,7 @@ List input items 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -199148,7 +202593,7 @@ List input items - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -200054,7 +203499,7 @@ List input items - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -200135,7 +203580,6 @@ List input items ```http curl https://api.openai.com/v1/responses/$RESPONSE_ID/input_items \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" ``` @@ -200251,7 +203695,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -200382,7 +203826,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -200486,17 +203930,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -200512,6 +203946,16 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -200570,7 +204014,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -200646,7 +204090,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -201013,7 +204457,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -201214,7 +204658,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -201291,7 +204735,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A text input to the model. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -201339,7 +204783,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `ComputerScreenshot object { detail, file_id, image_url, 2 more }` @@ -201495,6 +204939,8 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The annotations of the text output. + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` The text output from the model. @@ -201503,8 +204949,6 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The type of the output text. Always `output_text`. - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` - - `type: "multi_agent_call_output"` The type of the multi-agent result. Always `multi_agent_call_output`. @@ -201862,7 +205306,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -201922,7 +205366,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -201974,7 +205418,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -202198,19 +205642,8 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -202239,13 +205672,13 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -202253,14 +205686,8 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -202475,7 +205902,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -202589,7 +206016,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -203066,7 +206493,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -203126,7 +206553,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -203178,7 +206605,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -203370,19 +206797,8 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -203411,13 +206827,13 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -203425,14 +206841,8 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -203529,7 +206939,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -203643,7 +207053,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -203830,7 +207240,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -203964,7 +207374,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Compaction object { id, encrypted_content, type, 2 more }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `id: string` @@ -204870,7 +208280,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -204953,7 +208363,9 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ **post** `/responses/input_tokens?beta=true` -Get input token counts +Returns input token counts of the request. + +Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. ### Header Parameters @@ -205040,7 +208452,7 @@ Get input token counts - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `detail: "low" or "high" or "auto" or "original"` @@ -205211,7 +208623,7 @@ Get input token counts The content of the output message. - - `BetaResponseOutputText object { annotations, text, type, logprobs }` + - `BetaResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -205315,17 +208727,7 @@ Get input token counts - `"file_path"` - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `logprobs: optional array of object { token, bytes, logprob, top_logprobs }` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - `token: string` @@ -205341,6 +208743,16 @@ Get input token counts - `logprob: number` + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + - `BetaResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -205399,7 +208811,7 @@ Get input token counts - `FileSearchCall object { id, queries, status, 3 more }` The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](/docs/guides/tools-file-search) for more information. - `id: string` @@ -205475,7 +208887,7 @@ Get input token counts - `ComputerCall object { id, call_id, pending_safety_checks, 5 more }` A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](/docs/guides/tools-computer-use) for more information. - `id: string` @@ -205836,7 +209248,7 @@ Get input token counts - `WebSearchCall object { id, action, status, 2 more }` The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](/docs/guides/tools-web-search) for more information. - `id: string` @@ -205940,7 +209352,7 @@ Get input token counts - `FunctionCall object { arguments, call_id, name, 6 more }` A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](/docs/guides/function-calling) for more information. - `arguments: string` @@ -206015,7 +209427,7 @@ Get input token counts The unique ID of the function tool call generated by the model. - - `output: string or BetaResponseFunctionCallOutputItemList` + - `output: string or array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` Text, image, or file output of the function tool call. @@ -206023,7 +209435,7 @@ Get input token counts A JSON string of the output of the function tool call. - - `BetaResponseFunctionCallOutputItemList = array of BetaResponseFunctionCallOutputItem` + - `array of BetaResponseInputTextContent or BetaResponseInputImageContent or BetaResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -206053,7 +209465,7 @@ Get input token counts - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `type: "input_image"` @@ -206207,7 +209619,7 @@ Get input token counts - `BetaResponseInputImageContent object { type, detail, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + An image input to the model. Learn about [image inputs](/docs/guides/vision) - `EncryptedContent object { encrypted_content, type }` @@ -206732,7 +210144,7 @@ Get input token counts - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -206792,7 +210204,7 @@ Get input token counts - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -206844,7 +210256,7 @@ Get input token counts Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -207068,19 +210480,8 @@ Get input token counts - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -207109,13 +210510,13 @@ Get input token counts Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -207123,14 +210524,8 @@ Get input token counts - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -207345,7 +210740,7 @@ Get input token counts - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -207459,7 +210854,7 @@ Get input token counts - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -207940,7 +211335,7 @@ Get input token counts - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -208000,7 +211395,7 @@ Get input token counts - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -208052,7 +211447,7 @@ Get input token counts Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -208244,19 +211639,8 @@ Get input token counts - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -208285,13 +211669,13 @@ Get input token counts Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -208299,14 +211683,8 @@ Get input token counts - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -208403,7 +211781,7 @@ Get input token counts - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -208517,7 +211895,7 @@ Get input token counts - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -208708,7 +212086,7 @@ Get input token counts 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](https://platform.openai.com/docs/guides/conversation-state). + [managing context](/docs/guides/conversation-state). - `id: string` @@ -208774,7 +212152,7 @@ Get input token counts - `Compaction object { encrypted_content, type, id, agent }` - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - `encrypted_content: string` @@ -209583,7 +212961,7 @@ Get input token counts - `BetaResponseInputImage object { detail, type, file_id, 2 more }` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + An image input to the model. Learn about [image inputs](/docs/guides/vision). - `BetaResponseInputFile object { type, detail, file_data, 4 more }` @@ -209804,7 +213182,7 @@ Get input token counts - `model: optional string` - Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. - `parallel_tool_calls: optional boolean` @@ -209826,7 +213204,7 @@ Get input token counts - `previous_response_id: optional string` - The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - `reasoning: optional object { context, effort, generate_summary, 2 more }` @@ -209919,8 +213297,8 @@ Get input token counts Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - `format: optional BetaResponseFormatTextConfig` @@ -209928,7 +213306,7 @@ Get input token counts Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -209951,7 +213329,7 @@ Get input token counts - `BetaResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` @@ -209980,7 +213358,7 @@ Get input token counts If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](/docs/guides/structured-outputs). - `JSONObject object { type }` @@ -210068,12 +213446,12 @@ Get input token counts - `BetaToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](/docs/guides/tools). - `type: "file_search" or "web_search_preview" or "computer" or 5 more` The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](/docs/guides/tools). Allowed values are: @@ -210440,7 +213818,7 @@ Get input token counts - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](/docs/guides/tools-web-search). - `type: "web_search" or "web_search_2025_08_26"` @@ -210500,7 +213878,7 @@ Get input token counts - `Mcp object { server_label, type, allowed_callers, 9 more }` Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - `server_label: string` @@ -210552,7 +213930,7 @@ Get input token counts Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: @@ -210744,19 +214122,8 @@ Get input token counts - `background: optional "transparent" or "opaque" or "auto"` - Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - `"transparent"` @@ -210785,13 +214152,13 @@ Get input token counts Base64-encoded mask image. - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. - `string` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-2" or 3 more` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` The image generation model to use. Default: `gpt-image-1`. @@ -210799,14 +214166,8 @@ Get input token counts - `"gpt-image-1-mini"` - - `"gpt-image-2"` - - - `"gpt-image-2-2026-04-21"` - - `"gpt-image-1.5"` - - `"chatgpt-image-latest"` - - `moderation: optional "auto" or "low"` Moderation level for the generated image. Default: `auto`. @@ -210903,7 +214264,7 @@ Get input token counts - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -211017,7 +214378,7 @@ Get input token counts - `Custom object { name, type, allowed_callers, 3 more }` - A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` @@ -211206,7 +214567,6 @@ Get input token counts ```http curl https://api.openai.com/v1/responses/input_tokens \ -X POST \ - -H 'OpenAI-Beta: assistants=v2' \ -H "Authorization: Bearer $OPENAI_API_KEY" ```