diff --git a/en/resources/responses/index.md b/en/resources/responses/index.md index eaa4e663..f6582a38 100644 --- a/en/resources/responses/index.md +++ b/en/resources/responses/index.md @@ -4,14 +4,20 @@ **post** `/responses` -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. ### Body Parameters - `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 }` @@ -70,24 +76,24 @@ Create a model response - `"message.output_text.logprobs"` -- `input: optional string or ResponseInput` +- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 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. - - `ResponseInput = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 more` + - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 more` A list of one or many input items to the model, containing different content types. @@ -140,7 +146,7 @@ Create a model response - `ResponseInputImage 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"` @@ -303,7 +309,7 @@ Create a model response The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -407,17 +413,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` @@ -433,6 +429,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -483,7 +489,7 @@ Create a model response - `FileSearchCall object { id, queries, status, 2 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` @@ -551,7 +557,7 @@ Create a model response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -594,7 +600,7 @@ Create a model response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -798,193 +804,38 @@ Create a model response 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -1051,7 +902,7 @@ Create a model response - `WebSearchCall object { id, action, status, type }` 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` @@ -1147,7 +998,7 @@ Create a model response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -1214,7 +1065,7 @@ Create a model response The unique ID of the function tool call generated by the model. - - `output: string or ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -1222,7 +1073,7 @@ Create a model response A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -1252,7 +1103,7 @@ Create a model response - `ResponseInputImageContent 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"` @@ -1636,7 +1487,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"` @@ -1696,7 +1547,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` @@ -1748,7 +1599,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: @@ -1972,19 +1823,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"` @@ -2013,13 +1853,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`. @@ -2027,14 +1867,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`. @@ -2249,7 +2083,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` @@ -2363,7 +2197,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` @@ -2688,7 +2522,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"` @@ -2748,7 +2582,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` @@ -2800,7 +2634,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: @@ -2992,19 +2826,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"` @@ -3033,13 +2856,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`. @@ -3047,14 +2870,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`. @@ -3151,7 +2968,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` @@ -3233,7 +3050,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` @@ -3384,13 +3201,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -3442,7 +3259,7 @@ Create a model response - `Compaction object { encrypted_content, type, id }` - 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` @@ -4147,7 +3964,7 @@ Create a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -4323,7 +4140,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` @@ -4342,12 +4159,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -4581,12 +4398,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 ResponsePrompt` 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` @@ -4606,7 +4423,7 @@ Create a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -4618,11 +4435,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"` @@ -4642,7 +4459,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. @@ -4749,7 +4566,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` @@ -4757,7 +4574,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. @@ -4781,7 +4598,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 }` @@ -4808,8 +4625,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 ResponseFormatTextConfig` @@ -4817,7 +4634,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. @@ -4840,7 +4657,7 @@ Create a model response - `ResponseFormatTextJSONSchemaConfig 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` @@ -4869,7 +4686,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). - `ResponseFormatJSONObject object { type }` @@ -4959,12 +4776,12 @@ Create a model response - `ToolChoiceTypes 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: @@ -5074,16 +4891,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 }` @@ -5231,7 +5048,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"` @@ -5291,7 +5108,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` @@ -5343,7 +5160,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: @@ -5535,19 +5352,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"` @@ -5576,13 +5382,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`. @@ -5590,14 +5396,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`. @@ -5694,7 +5494,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` @@ -5776,7 +5576,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` @@ -5946,11 +5746,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 -- `Response object { id, created_at, error, 31 more }` +- `Response object { id, created_at, error, 32 more }` - `id: string` @@ -6088,7 +5888,7 @@ Create a model response - `ResponseInputImage 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"` @@ -6251,7 +6051,7 @@ Create a model response The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -6355,17 +6155,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` @@ -6381,6 +6171,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -6431,7 +6231,7 @@ Create a model response - `FileSearchCall object { id, queries, status, 2 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` @@ -6499,7 +6299,7 @@ Create a model response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -6542,7 +6342,7 @@ Create a model response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -6746,193 +6546,38 @@ Create a model response 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -6999,7 +6644,7 @@ Create a model response - `WebSearchCall object { id, action, status, type }` 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` @@ -7095,7 +6740,7 @@ Create a model response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -7162,7 +6807,7 @@ Create a model response The unique ID of the function tool call generated by the model. - - `output: string or ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -7170,7 +6815,7 @@ Create a model response A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -7200,7 +6845,7 @@ Create a model response - `ResponseInputImageContent 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"` @@ -7584,7 +7229,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"` @@ -7644,7 +7289,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` @@ -7696,7 +7341,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: @@ -7920,19 +7565,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"` @@ -7961,13 +7595,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`. @@ -7975,14 +7609,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`. @@ -8197,7 +7825,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` @@ -8311,7 +7939,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` @@ -8636,7 +8264,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"` @@ -8696,7 +8324,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` @@ -8748,7 +8376,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: @@ -8940,19 +8568,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"` @@ -8981,13 +8598,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`. @@ -8995,14 +8612,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`. @@ -9099,7 +8710,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` @@ -9181,7 +8792,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` @@ -9332,13 +8943,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -9390,7 +9001,7 @@ Create a model response - `Compaction object { encrypted_content, type, id }` - 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` @@ -10095,7 +9706,7 @@ Create a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -10274,12 +9885,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -10497,7 +10108,7 @@ Create a model response - `FileSearchCall object { id, queries, status, 2 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` @@ -10565,7 +10176,7 @@ Create a model response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -10653,7 +10264,7 @@ Create a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -10707,7 +10318,7 @@ Create a model response - `WebSearchCall object { id, action, status, type }` 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` @@ -10803,7 +10414,7 @@ Create a model response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -10846,201 +10457,10 @@ Create a model response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -11105,13 +10525,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -11123,8 +10543,6 @@ Create a model response The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -11432,7 +10850,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"` @@ -11492,7 +10910,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` @@ -11544,7 +10962,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: @@ -11736,19 +11154,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"` @@ -11777,13 +11184,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`. @@ -11791,14 +11198,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`. @@ -11895,7 +11296,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` @@ -11977,7 +11378,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` @@ -12298,7 +11699,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"` @@ -12358,7 +11759,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` @@ -12410,7 +11811,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: @@ -12602,19 +12003,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"` @@ -12643,13 +12033,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`. @@ -12657,14 +12047,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`. @@ -12761,7 +12145,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` @@ -12843,7 +12227,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` @@ -12987,7 +12371,7 @@ Create a model response - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -13768,7 +13152,7 @@ Create a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -13891,12 +13275,12 @@ Create a model response - `ToolChoiceTypes 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: @@ -14006,16 +13390,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 }` @@ -14163,7 +13547,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"` @@ -14223,7 +13607,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` @@ -14275,7 +13659,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: @@ -14467,19 +13851,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"` @@ -14508,13 +13881,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`. @@ -14522,14 +13895,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`. @@ -14626,7 +13993,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` @@ -14708,7 +14075,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` @@ -14856,7 +14223,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` @@ -14873,7 +14240,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` @@ -14995,16 +14362,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 ResponsePrompt` 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` @@ -15024,7 +14397,7 @@ Create a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -15036,7 +14409,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 }` @@ -15060,7 +14433,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. @@ -15167,7 +14540,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` @@ -15175,7 +14548,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. @@ -15212,8 +14585,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 ResponseFormatTextConfig` @@ -15221,7 +14594,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. @@ -15244,7 +14617,7 @@ Create a model response - `ResponseFormatTextJSONSchemaConfig 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` @@ -15273,7 +14646,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). - `ResponseFormatJSONObject object { type }` @@ -15341,7 +14714,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` @@ -15363,7 +14736,7 @@ 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 @@ -15413,8 +14786,6 @@ curl https://api.openai.com/v1/responses \ "type": "file_citation" } ], - "text": "text", - "type": "output_text", "logprobs": [ { "token": "token", @@ -15432,7 +14803,9 @@ curl https://api.openai.com/v1/responses \ } ] } - ] + ], + "text": "text", + "type": "output_text" } ], "role": "assistant", @@ -16311,7 +15684,7 @@ curl https://api.openai.com/v1/responses \ **get** `/responses/{response_id}` -Get a model response +Retrieves a model response with the given ID. ### Path Parameters @@ -16358,14 +15731,14 @@ 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` ### Returns -- `Response object { id, created_at, error, 31 more }` +- `Response object { id, created_at, error, 32 more }` - `id: string` @@ -16503,7 +15876,7 @@ Get a model response - `ResponseInputImage 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"` @@ -16666,7 +16039,7 @@ Get a model response The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -16770,17 +16143,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` @@ -16796,6 +16159,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -16846,7 +16219,7 @@ Get a model response - `FileSearchCall object { id, queries, status, 2 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` @@ -16914,7 +16287,7 @@ Get a model response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -16957,7 +16330,7 @@ Get a model response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -17161,193 +16534,38 @@ Get a model response 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -17414,7 +16632,7 @@ Get a model response - `WebSearchCall object { id, action, status, type }` 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` @@ -17510,7 +16728,7 @@ Get a model response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -17577,7 +16795,7 @@ Get a model response The unique ID of the function tool call generated by the model. - - `output: string or ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -17585,7 +16803,7 @@ Get a model response A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -17615,7 +16833,7 @@ Get a model response - `ResponseInputImageContent 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"` @@ -17999,7 +17217,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"` @@ -18059,7 +17277,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` @@ -18111,7 +17329,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: @@ -18335,19 +17553,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"` @@ -18376,13 +17583,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`. @@ -18390,14 +17597,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`. @@ -18612,7 +17813,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` @@ -18726,7 +17927,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` @@ -19051,7 +18252,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"` @@ -19111,7 +18312,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` @@ -19163,7 +18364,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: @@ -19355,19 +18556,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"` @@ -19396,13 +18586,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`. @@ -19410,14 +18600,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`. @@ -19514,7 +18698,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` @@ -19596,7 +18780,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` @@ -19747,13 +18931,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -19805,7 +18989,7 @@ Get a model response - `Compaction object { encrypted_content, type, id }` - 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` @@ -20510,7 +19694,7 @@ Get a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -20689,12 +19873,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -20912,7 +20096,7 @@ Get a model response - `FileSearchCall object { id, queries, status, 2 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` @@ -20980,7 +20164,7 @@ Get a model response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -21068,7 +20252,7 @@ Get a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -21122,7 +20306,7 @@ Get a model response - `WebSearchCall object { id, action, status, type }` 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` @@ -21218,7 +20402,7 @@ Get a model response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -21261,201 +20445,10 @@ Get a model response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -21520,13 +20513,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -21538,8 +20531,6 @@ Get a model response The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -21847,7 +20838,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"` @@ -21907,7 +20898,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` @@ -21959,7 +20950,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: @@ -22151,19 +21142,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"` @@ -22192,13 +21172,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`. @@ -22206,14 +21186,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`. @@ -22310,7 +21284,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` @@ -22392,7 +21366,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` @@ -22713,7 +21687,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"` @@ -22773,7 +21747,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` @@ -22825,7 +21799,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: @@ -23017,19 +21991,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"` @@ -23058,13 +22021,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`. @@ -23072,14 +22035,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`. @@ -23176,7 +22133,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` @@ -23258,7 +22215,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` @@ -23402,7 +22359,7 @@ Get a model response - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -24183,7 +23140,7 @@ Get a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -24306,12 +23263,12 @@ Get a model response - `ToolChoiceTypes 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: @@ -24421,16 +23378,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 }` @@ -24578,7 +23535,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"` @@ -24638,7 +23595,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` @@ -24690,7 +23647,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: @@ -24882,19 +23839,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"` @@ -24923,13 +23869,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`. @@ -24937,14 +23883,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`. @@ -25041,7 +23981,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` @@ -25123,7 +24063,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` @@ -25271,7 +24211,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` @@ -25288,7 +24228,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` @@ -25410,16 +24350,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 ResponsePrompt` 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` @@ -25439,7 +24385,7 @@ Get a model response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -25451,7 +24397,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 }` @@ -25475,7 +24421,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. @@ -25582,7 +24528,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` @@ -25590,7 +24536,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. @@ -25627,8 +24573,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 ResponseFormatTextConfig` @@ -25636,7 +24582,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. @@ -25659,7 +24605,7 @@ Get a model response - `ResponseFormatTextJSONSchemaConfig 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` @@ -25688,7 +24634,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). - `ResponseFormatJSONObject object { type }` @@ -25756,7 +24702,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` @@ -25778,7 +24724,7 @@ 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 @@ -25819,8 +24765,6 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID \ "type": "file_citation" } ], - "text": "text", - "type": "output_text", "logprobs": [ { "token": "token", @@ -25838,7 +24782,9 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID \ } ] } - ] + ], + "text": "text", + "type": "output_text" } ], "role": "assistant", @@ -26033,7 +24979,7 @@ curl https://api.openai.com/v1/responses/resp_123 \ **delete** `/responses/{response_id}` -Delete a model response +Deletes a model response with the given ID. ### Path Parameters @@ -26069,7 +25015,9 @@ curl -X DELETE https://api.openai.com/v1/responses/resp_123 \ **post** `/responses/{response_id}/cancel` -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 @@ -26077,7 +25025,7 @@ Cancel a response ### Returns -- `Response object { id, created_at, error, 31 more }` +- `Response object { id, created_at, error, 32 more }` - `id: string` @@ -26215,7 +25163,7 @@ Cancel a response - `ResponseInputImage 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"` @@ -26378,7 +25326,7 @@ Cancel a response The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -26482,17 +25430,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` @@ -26508,6 +25446,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -26558,7 +25506,7 @@ Cancel a response - `FileSearchCall object { id, queries, status, 2 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` @@ -26626,7 +25574,7 @@ Cancel a response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -26669,7 +25617,7 @@ Cancel a response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -26873,193 +25821,38 @@ Cancel a response 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -27126,7 +25919,7 @@ Cancel a response - `WebSearchCall object { id, action, status, type }` 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` @@ -27222,7 +26015,7 @@ Cancel a response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -27289,7 +26082,7 @@ Cancel a response The unique ID of the function tool call generated by the model. - - `output: string or ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -27297,7 +26090,7 @@ Cancel a response A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -27327,7 +26120,7 @@ Cancel a response - `ResponseInputImageContent 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"` @@ -27711,7 +26504,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"` @@ -27771,7 +26564,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` @@ -27823,7 +26616,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: @@ -28047,19 +26840,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"` @@ -28088,13 +26870,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`. @@ -28102,14 +26884,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`. @@ -28324,7 +27100,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` @@ -28438,7 +27214,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` @@ -28763,7 +27539,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"` @@ -28823,7 +27599,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` @@ -28875,7 +27651,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: @@ -29067,19 +27843,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"` @@ -29108,13 +27873,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`. @@ -29122,14 +27887,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`. @@ -29226,7 +27985,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` @@ -29308,7 +28067,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` @@ -29459,13 +28218,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -29517,7 +28276,7 @@ Cancel a response - `Compaction object { encrypted_content, type, id }` - 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` @@ -30222,7 +28981,7 @@ Cancel a response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -30401,12 +29160,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -30624,7 +29383,7 @@ Cancel a response - `FileSearchCall object { id, queries, status, 2 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` @@ -30692,7 +29451,7 @@ Cancel a response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -30780,7 +29539,7 @@ Cancel a response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -30834,7 +29593,7 @@ Cancel a response - `WebSearchCall object { id, action, status, type }` 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` @@ -30930,7 +29689,7 @@ Cancel a response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -30973,201 +29732,10 @@ Cancel a response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - A click action. - - - `Click object { button, type, x, 2 more }` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -31232,13 +29800,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -31250,8 +29818,6 @@ Cancel a response The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -31559,7 +30125,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"` @@ -31619,7 +30185,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` @@ -31671,7 +30237,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: @@ -31863,19 +30429,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"` @@ -31904,13 +30459,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`. @@ -31918,14 +30473,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`. @@ -32022,7 +30571,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` @@ -32104,7 +30653,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` @@ -32425,7 +30974,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"` @@ -32485,7 +31034,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` @@ -32537,7 +31086,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: @@ -32729,19 +31278,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"` @@ -32770,13 +31308,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`. @@ -32784,14 +31322,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`. @@ -32888,7 +31420,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` @@ -32970,7 +31502,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` @@ -33114,7 +31646,7 @@ Cancel a response - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -33895,7 +32427,7 @@ Cancel a response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -34018,12 +32550,12 @@ Cancel a response - `ToolChoiceTypes 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: @@ -34133,16 +32665,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 }` @@ -34290,7 +32822,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"` @@ -34350,7 +32882,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` @@ -34402,7 +32934,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: @@ -34594,19 +33126,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"` @@ -34635,13 +33156,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`. @@ -34649,14 +33170,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`. @@ -34753,7 +33268,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` @@ -34835,7 +33350,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` @@ -34983,7 +33498,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` @@ -35000,7 +33515,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` @@ -35122,16 +33637,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 ResponsePrompt` 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` @@ -35151,7 +33672,7 @@ Cancel a response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -35163,7 +33684,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 }` @@ -35187,7 +33708,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. @@ -35294,7 +33815,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` @@ -35302,7 +33823,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. @@ -35339,8 +33860,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 ResponseFormatTextConfig` @@ -35348,7 +33869,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. @@ -35371,7 +33892,7 @@ Cancel a response - `ResponseFormatTextJSONSchemaConfig 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` @@ -35400,7 +33921,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). - `ResponseFormatJSONObject object { type }` @@ -35468,7 +33989,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` @@ -35490,7 +34011,7 @@ 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 @@ -35532,8 +34053,6 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \ "type": "file_citation" } ], - "text": "text", - "type": "output_text", "logprobs": [ { "token": "token", @@ -35551,7 +34070,9 @@ curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \ } ] } - ] + ], + "text": "text", + "type": "output_text" } ], "role": "assistant", @@ -35737,17 +34258,19 @@ curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \ **post** `/responses/compact` -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). ### Body Parameters - `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"` @@ -36001,7 +34524,7 @@ Compact a response - `ResponseInputImage 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"` @@ -36164,7 +34687,7 @@ Compact a response The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -36268,17 +34791,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` @@ -36294,6 +34807,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -36344,7 +34867,7 @@ Compact a response - `FileSearchCall object { id, queries, status, 2 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` @@ -36412,7 +34935,7 @@ Compact a response - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -36455,7 +34978,7 @@ Compact a response - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -36659,193 +35182,38 @@ Compact a response 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -36912,7 +35280,7 @@ Compact a response - `WebSearchCall object { id, action, status, type }` 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` @@ -37008,7 +35376,7 @@ Compact a response - `FunctionCall object { arguments, call_id, name, 5 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` @@ -37075,7 +35443,7 @@ Compact a response The unique ID of the function tool call generated by the model. - - `output: string or ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -37083,7 +35451,7 @@ Compact a response A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -37113,7 +35481,7 @@ Compact a response - `ResponseInputImageContent 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"` @@ -37497,7 +35865,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"` @@ -37557,7 +35925,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` @@ -37609,7 +35977,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: @@ -37833,19 +36201,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"` @@ -37874,13 +36231,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`. @@ -37888,14 +36245,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`. @@ -38110,7 +36461,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` @@ -38224,7 +36575,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` @@ -38549,7 +36900,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"` @@ -38609,7 +36960,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` @@ -38661,7 +37012,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: @@ -38853,19 +37204,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"` @@ -38894,13 +37234,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`. @@ -38908,14 +37248,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`. @@ -39012,7 +37346,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` @@ -39094,7 +37428,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` @@ -39245,13 +37579,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -39303,7 +37637,7 @@ Compact a response - `Compaction object { encrypted_content, type, id }` - 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` @@ -40008,7 +38342,7 @@ Compact a response - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -40181,7 +38515,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` @@ -40189,7 +38523,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"` @@ -40243,23 +38577,47 @@ Compact a response - `"response.compaction"` - - `output: array of ResponseOutputItem` + - `output: array of Message or object { id, call_id, code, 2 more } or object { id, call_id, result, 2 more } or 25 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. - - `ResponseOutputMessage object { id, content, role, 3 more }` + - `Message object { id, content, role, 3 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 ResponseOutputText or ResponseOutputRefusal` + - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more` - The content of the output message. + The content of the message + + - `ResponseInputText object { text, type, prompt_cache_breakpoint }` - - `ResponseOutputText object { annotations, text, type, logprobs }` + 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"` + + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -40363,17 +38721,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` @@ -40389,233 +38737,71 @@ Compact a response - `logprob: number` - - `ResponseOutputRefusal 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"` - - - `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, 2 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. - - - `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"` - - - `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. - - - `FunctionCall object { arguments, call_id, name, 5 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. - - - `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"` + - `text: string` - - `namespace: optional string` + The text output from the model. - The namespace of the function to run. + - `type: "output_text"` - - `status: optional "in_progress" or "completed" or "incomplete"` + The type of the output text. Always `output_text`. - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + - `"output_text"` - - `"in_progress"` + - `TextContent object { text, type }` - - `"completed"` + A text content. - - `"incomplete"` + - `text: string` - - `FunctionCallOutput object { id, call_id, output, 4 more }` + - `type: "text"` - - `id: string` + - `"text"` - The unique ID of the function call tool output. + - `SummaryTextContent object { text, type }` - - `call_id: string` + A summary text from the model. - The unique ID of the function tool call generated by the model. + - `text: string` - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` + A summary of the reasoning output from the model so far. - The output from the function call generated by your code. - Can be a string or an list of output content. + - `type: "summary_text"` - - `StringOutput = string` + The type of the object. Always `summary_text`. - A string of the output of the function call. + - `"summary_text"` - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` + - `ReasoningText object { text, type }` - Text, image, or file output of the function call. + Reasoning text from the model. - - `ResponseInputText object { text, type, prompt_cache_breakpoint }` + - `text: string` - A text input to the model. + The reasoning text from the model. - - `text: string` + - `type: "reasoning_text"` - The text input to the model. + The type of the reasoning text. Always `reasoning_text`. - - `type: "input_text"` + - `"reasoning_text"` - The type of the input item. Always `input_text`. + - `ResponseOutputRefusal object { refusal, type }` - - `"input_text"` + A refusal from the model. - - `prompt_cache_breakpoint: optional object { mode }` + - `refusal: string` - 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 refusal explanation from the model. - - `mode: "explicit"` + - `type: "refusal"` - The breakpoint mode. Always `explicit`. + The type of the refusal. Always `refusal`. - - `"explicit"` + - `"refusal"` - `ResponseInputImage 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"` @@ -40653,41 +38839,35 @@ Compact a response - `"explicit"` - - `ResponseInputFile 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"` + - `ComputerScreenshotContent object { detail, file_id, image_url, 2 more }` - - `detail: optional "auto" or "low" or "high"` + A screenshot of a computer. - 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`. + - `detail: "low" or "high" or "auto" or "original"` - - `"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"` - `"high"` - - `file_data: optional string` + - `"auto"` - The content of the file to be sent to the model. + - `"original"` - - `file_id: optional string` + - `file_id: string` - The ID of the file to be sent to the model. + The identifier of an uploaded file that contains the screenshot. - - `file_url: optional string` + - `image_url: string` - The URL of the file to be sent to the model. + The URL of the screenshot image. - - `filename: optional string` + - `type: "computer_screenshot"` - The name of the file to be sent to the model. + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + + - `"computer_screenshot"` - `prompt_cache_breakpoint: optional object { mode }` @@ -40699,180 +38879,75 @@ Compact a response - `"explicit"` - - `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: "function_call_output"` - - The type of the function tool call output. Always `function_call_output`. - - - `"function_call_output"` - - - `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. - - - `WebSearchCall object { id, action, status, type }` - - 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. - - - `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. + - `ResponseInputFile object { type, detail, file_data, 4 more }` - - `FindInPage object { pattern, type, url }` + A file input to the model. - Action type "find_in_page": Searches for a pattern within a loaded page. + - `type: "input_file"` - - `pattern: string` + The type of the input item. Always `input_file`. - The pattern or text to search for within the page. + - `"input_file"` - - `type: "find_in_page"` + - `detail: optional "auto" or "low" or "high"` - The action type. + 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`. - - `"find_in_page"` + - `"auto"` - - `url: string` + - `"low"` - The URL of the page searched for the pattern. + - `"high"` - - `status: "in_progress" or "searching" or "completed" or "failed"` + - `file_data: optional string` - The status of the web search tool call. + The content of the file to be sent to the model. - - `"in_progress"` + - `file_id: optional string` - - `"searching"` + The ID of the file to be sent to the model. - - `"completed"` + - `file_url: optional string` - - `"failed"` + The URL of the file to be sent to the model. - - `type: "web_search_call"` + - `filename: optional string` - The type of the web search tool call. Always `web_search_call`. + The name of the file to be sent to the model. - - `"web_search_call"` + - `prompt_cache_breakpoint: optional object { mode }` - - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }` + 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. - 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. + - `mode: "explicit"` - - `id: string` + The breakpoint mode. Always `explicit`. - The unique ID of the computer call. + - `"explicit"` - - `call_id: string` + - `role: "unknown" or "user" or "assistant" or 5 more` - An identifier used when responding to the tool call with output. + The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. - - `pending_safety_checks: array of object { id, code, message }` + - `"unknown"` - The pending safety checks for the computer call. + - `"user"` - - `id: string` + - `"assistant"` - The ID of the pending safety check. + - `"system"` - - `code: optional string` + - `"critic"` - The type of the pending safety check. + - `"discriminator"` - - `message: optional string` + - `"developer"` - Details about the pending safety check. + - `"tool"` - `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. + The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - `"in_progress"` @@ -40880,521 +38955,122 @@ Compact a response - `"incomplete"` - - `type: "computer_call"` - - The type of the computer call. Always `computer_call`. - - - `"computer_call"` - - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - 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 ComputerActionList` - - 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. - - - `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`. + - `type: "message"` - - `"scroll"` + The type of the message. Always set to `message`. - - `x: number` - - The x-coordinate where the scroll occurred. + - `"message"` - - `y: number` + - `phase: optional "commentary" or "final_answer"` - The y-coordinate where the scroll occurred. + 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. - - `keys: optional array of string` + - `"commentary"` - The keys being held while scrolling. + - `"final_answer"` - - `Type object { text, type }` + - `Program object { id, call_id, code, 2 more }` - An action to type in text. + - `id: string` - - `text: string` + The unique ID of the program item. - The text to type. + - `call_id: string` - - `type: "type"` + The stable call ID of the program item. - Specifies the event type. For a type action, this property is always set to `type`. + - `code: string` - - `"type"` + The JavaScript source executed by programmatic tool calling. - - `Wait object { type }` + - `fingerprint: string` - A wait action. + Opaque program replay fingerprint that must be round-tripped. - - `type: "wait"` + - `type: "program"` - Specifies the event type. For a wait action, this property is always set to `wait`. + The type of the item. Always `program`. - - `"wait"` + - `"program"` - - `ComputerCallOutput object { id, call_id, output, 4 more }` + - `ProgramOutput object { id, call_id, result, 2 more }` - `id: string` - The unique ID of the computer call tool output. + The unique ID of the program output item. - `call_id: string` - The ID of the computer tool call that produced the output. - - - `output: ResponseComputerToolCallOutputScreenshot` - - 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. + The call ID of the program item. - - `image_url: optional string` + - `result: string` - The URL of the screenshot image. + The result produced by the program item. - - `status: "completed" or "incomplete" or "failed" or "in_progress"` + - `status: "completed" or "incomplete"` - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + The terminal status of the program output item. - `"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. + - `type: "program_output"` - - `message: optional string` + The type of the item. Always `program_output`. - Details about the pending safety check. + - `"program_output"` - - `created_by: optional string` + - `FunctionCall object { arguments, call_id, name, 5 more }` - The identifier of the actor that created the item. + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. - - `Reasoning object { id, summary, type, 3 more }` + - `arguments: string` - 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). + A JSON string of the arguments to pass to the function. - - `id: string` + - `call_id: string` - The unique identifier of the reasoning content. + The unique ID of the function tool call generated by the model. - - `summary: array of object { text, type }` + - `name: string` - Reasoning summary content. + The name of the function to run. - - `text: string` + - `type: "function_call"` - A summary of the reasoning output from the model so far. + The type of the function tool call. Always `function_call`. - - `type: "summary_text"` + - `"function_call"` - The type of the object. Always `summary_text`. + - `id: optional string` - - `"summary_text"` + The unique ID of the function tool call. - - `type: "reasoning"` + - `caller: optional object { type } or object { caller_id, type }` - The type of the object. Always `reasoning`. + The execution context that produced this tool call. - - `"reasoning"` + - `Direct object { type }` - - `content: optional array of object { text, type }` + - `type: "direct"` - Reasoning text content. + - `"direct"` - - `text: string` + - `Program object { caller_id, type }` - The reasoning text from the model. + - `caller_id: string` - - `type: "reasoning_text"` + The call ID of the program item that produced this tool call. - The type of the reasoning text. Always `reasoning_text`. + - `type: "program"` - - `"reasoning_text"` + - `"program"` - - `encrypted_content: optional string` + - `namespace: optional string` - The encrypted content of the reasoning item - populated when a response is - generated with `reasoning.encrypted_content` in the `include` parameter. + The namespace of the function to run. - `status: optional "in_progress" or "completed" or "incomplete"` @@ -41407,58 +39083,6 @@ Compact a response - `"incomplete"` - - `Program object { id, call_id, code, 2 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"` - - - `ProgramOutput object { id, call_id, result, 2 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"` - - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -41745,7 +39369,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"` @@ -41805,7 +39429,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` @@ -41857,7 +39481,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: @@ -42081,19 +39705,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"` @@ -42122,13 +39735,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`. @@ -42136,14 +39749,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`. @@ -42358,7 +39965,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` @@ -42472,7 +40079,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` @@ -42793,7 +40400,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"` @@ -42853,7 +40460,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` @@ -42905,7 +40512,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: @@ -43097,19 +40704,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"` @@ -43138,13 +40734,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`. @@ -43152,14 +40748,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`. @@ -43256,7 +40846,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` @@ -43338,7 +40928,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` @@ -43480,27 +41070,248 @@ Compact a response - `"additional_tools"` - - `Compaction object { id, encrypted_content, type, created_by }` + - `FunctionCallOutput object { call_id, output, type, 3 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 ResponseInputText or ResponseInputImage or ResponseInputFile` + + 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 ResponseInputText or ResponseInputImage or ResponseInputFile` + + Text, image, or file output of the function call. + + - `ResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `ResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `ResponseInputFile 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. + + - `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. - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + - `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, 2 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 compaction item. + The unique ID of the file search tool call. - - `encrypted_content: string` + - `queries: array of string` - The encrypted content that was produced by compaction. + The queries used to search for files. - - `type: "compaction"` + - `status: "in_progress" or "searching" or "completed" or 2 more` - The type of the item. Always `compaction`. + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, - - `"compaction"` + - `"in_progress"` - - `created_by: optional string` + - `"searching"` - The identifier of the actor that created the item. + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `type: "file_search_call"` + + The type of the file search tool call. Always `file_search_call`. + + - `"file_search_call"` + + - `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, type }` + + 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"` - `ImageGenerationCall object { id, result, status, type }` @@ -43532,6 +41343,438 @@ Compact a response - `"image_generation_call"` + - `ComputerCall object { id, call_id, pending_safety_checks, 4 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 ComputerAction` + + 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 ComputerActionList` + + 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. + + - `ComputerCallOutput object { id, call_id, output, 4 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: ResponseComputerToolCallOutputScreenshot` + + 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. + + - `created_by: optional string` + + The identifier of the actor that created the item. + + - `Reasoning object { id, summary, type, 3 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 SummaryTextContent` + + 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`. + + - `type: "reasoning"` + + The type of the object. Always `reasoning`. + + - `"reasoning"` + + - `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, created_by }` + + 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"` + + - `created_by: optional string` + + The identifier of the actor that created the item. + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -44037,59 +42280,6 @@ Compact a response Optional textual output returned by the apply patch tool. - - `McpCall object { id, arguments, name, 6 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"` - - - `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, 2 more }` A list of tools available on an MCP server. @@ -44184,6 +42374,59 @@ Compact a response Optional reason for the decision. + - `McpCall object { id, arguments, name, 6 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"` + + - `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, 4 more }` A call to a custom tool created by the model. @@ -44234,11 +42477,9 @@ Compact a response The namespace of the custom tool being called. - - `CustomToolCallOutput object { id, call_id, output, 4 more }` - - - `id: string` + - `CustomToolCallOutput object { call_id, output, type, 2 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` @@ -44263,29 +42504,22 @@ Compact a response - `ResponseInputImage 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). - `ResponseInputFile 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. + - `caller: optional object { type } or object { caller_id, type }` The execution context that produced this tool call. @@ -44310,10 +42544,6 @@ Compact a response - `"program"` - - `created_by: optional string` - - The identifier of the actor that created the item. - - `usage: ResponseUsage` Token accounting for the compaction pass, including cached, reasoning, and total tokens. @@ -44333,7 +42563,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` @@ -44375,37 +42605,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": "output_text", - "logprobs": [ - { - "token": "token", - "bytes": [ - 0 - ], - "logprob": 0, - "top_logprobs": [ - { - "token": "token", - "bytes": [ - 0 - ], - "logprob": 0 - } - ] + "type": "input_text", + "prompt_cache_breakpoint": { + "mode": "explicit" } - ] } ], - "role": "assistant", + "role": "unknown", "status": "in_progress", "type": "message", "phase": "commentary" @@ -44517,23 +42724,47 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.compaction"` - - `output: array of ResponseOutputItem` + - `output: array of Message or object { id, call_id, code, 2 more } or object { id, call_id, result, 2 more } or 25 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. - - `ResponseOutputMessage object { id, content, role, 3 more }` + - `Message object { id, content, role, 3 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 ResponseOutputText or ResponseOutputRefusal` + - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more` - The content of the output message. + The content of the message + + - `ResponseInputText 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"` - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `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"` + + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -44637,17 +42868,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` @@ -44663,285 +42884,163 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `logprob: number` - - `ResponseOutputRefusal object { refusal, type }` + - `text: string` - A refusal from the model. + The text output from the model. - - `refusal: string` + - `type: "output_text"` - The refusal explanation from the model. + The type of the output text. Always `output_text`. - - `type: "refusal"` + - `"output_text"` - The type of the refusal. Always `refusal`. + - `TextContent object { text, type }` - - `"refusal"` + A text content. - - `role: "assistant"` + - `text: string` - The role of the output message. Always `assistant`. + - `type: "text"` - - `"assistant"` + - `"text"` - - `status: "in_progress" or "completed" or "incomplete"` + - `SummaryTextContent object { text, type }` - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + A summary text from the model. - - `"in_progress"` + - `text: string` - - `"completed"` + A summary of the reasoning output from the model so far. - - `"incomplete"` + - `type: "summary_text"` - - `type: "message"` + The type of the object. Always `summary_text`. - The type of the output message. Always `message`. + - `"summary_text"` - - `"message"` + - `ReasoningText object { text, type }` - - `phase: optional "commentary" or "final_answer"` + Reasoning 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"` + The reasoning text from the model. - - `"final_answer"` + - `type: "reasoning_text"` - - `FileSearchCall object { id, queries, status, 2 more }` + The type of the reasoning text. Always `reasoning_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. + - `"reasoning_text"` - - `id: string` + - `ResponseOutputRefusal object { refusal, type }` - The unique ID of the file search tool call. + A refusal from the model. - - `queries: array of string` + - `refusal: string` - The queries used to search for files. + The refusal explanation from the model. - - `status: "in_progress" or "searching" or "completed" or 2 more` + - `type: "refusal"` - The status of the file search tool call. One of `in_progress`, - `searching`, `incomplete` or `failed`, + The type of the refusal. Always `refusal`. - - `"in_progress"` + - `"refusal"` - - `"searching"` + - `ResponseInputImage object { detail, type, file_id, 2 more }` - - `"completed"` + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `"incomplete"` + - `detail: "low" or "high" or "auto" or "original"` - - `"failed"` + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - `type: "file_search_call"` + - `"low"` - The type of the file search tool call. Always `file_search_call`. + - `"high"` - - `"file_search_call"` + - `"auto"` - - `results: optional array of object { attributes, file_id, filename, 2 more }` + - `"original"` - The results of the file search tool call. + - `type: "input_image"` - - `attributes: optional map[string or number or boolean]` + The type of the input item. Always `input_image`. - 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. + - `"input_image"` - - `string` + - `file_id: optional string` - - `number` + The ID of the file to be sent to the model. - - `boolean` + - `image_url: optional string` - - `file_id: 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. - The unique ID of the file. + - `prompt_cache_breakpoint: optional object { mode }` - - `filename: optional string` + 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 name of the file. + - `mode: "explicit"` - - `score: optional number` + The breakpoint mode. Always `explicit`. - The relevance score of the file - a value between 0 and 1. + - `"explicit"` - - `text: optional string` + - `ComputerScreenshotContent object { detail, file_id, image_url, 2 more }` - The text that was retrieved from the file. + A screenshot of a computer. - - `FunctionCall object { arguments, call_id, name, 5 more }` + - `detail: "low" or "high" or "auto" or "original"` - A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - `arguments: string` + - `"low"` - A JSON string of the arguments to pass to the function. + - `"high"` - - `call_id: string` + - `"auto"` - The unique ID of the function tool call generated by the model. + - `"original"` - - `name: string` + - `file_id: string` - The name of the function to run. + The identifier of an uploaded file that contains the screenshot. - - `type: "function_call"` + - `image_url: string` - The type of the function tool call. Always `function_call`. + The URL of the screenshot image. - - `"function_call"` + - `type: "computer_screenshot"` - - `id: optional string` + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. - The unique ID of the function tool call. + - `"computer_screenshot"` - - `caller: optional object { type } or object { caller_id, type }` + - `prompt_cache_breakpoint: optional object { mode }` - The execution context that produced this tool 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. - - `Direct object { type }` + - `mode: "explicit"` - - `type: "direct"` + The breakpoint mode. Always `explicit`. - - `"direct"` + - `"explicit"` - - `Program object { caller_id, type }` + - `ResponseInputFile object { type, detail, file_data, 4 more }` - - `caller_id: string` + A file input to the model. - The call ID of the program item that produced this tool call. + - `type: "input_file"` - - `type: "program"` + The type of the input item. Always `input_file`. - - `"program"` + - `"input_file"` - - `namespace: optional string` + - `detail: optional "auto" or "low" or "high"` - The namespace of the function to run. + 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`. - - `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, 4 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 ResponseInputText or ResponseInputImage or ResponseInputFile` - - 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 ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the function call. - - - `ResponseInputText 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"` - - - `ResponseInputImage 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"` - - - `ResponseInputFile 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"` + - `"auto"` - `"low"` @@ -44973,180 +43072,29 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"explicit"` - - `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: "function_call_output"` - - The type of the function tool call output. Always `function_call_output`. - - - `"function_call_output"` - - - `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. - - - `WebSearchCall object { id, action, status, type }` - - 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. - - - `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"` - - - `ComputerCall object { id, call_id, pending_safety_checks, 4 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. - - - `id: string` - - The unique ID of the computer call. - - - `call_id: string` + - `role: "unknown" or "user" or "assistant" or 5 more` - An identifier used when responding to the tool call with output. + The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. - - `pending_safety_checks: array of object { id, code, message }` + - `"unknown"` - The pending safety checks for the computer call. + - `"user"` - - `id: string` + - `"assistant"` - The ID of the pending safety check. + - `"system"` - - `code: optional string` + - `"critic"` - The type of the pending safety check. + - `"discriminator"` - - `message: optional string` + - `"developer"` - Details about the pending safety check. + - `"tool"` - `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. + The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - `"in_progress"` @@ -45154,521 +43102,122 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `type: "computer_call"` - - The type of the computer call. Always `computer_call`. - - - `"computer_call"` - - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - 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 ComputerActionList` - - 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. - - - `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"` + - `type: "message"` - - `x: number` + The type of the message. Always set to `message`. - The x-coordinate where the scroll occurred. + - `"message"` - - `y: number` + - `phase: optional "commentary" or "final_answer"` - The y-coordinate where the scroll occurred. + 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. - - `keys: optional array of string` + - `"commentary"` - The keys being held while scrolling. + - `"final_answer"` - - `Type object { text, type }` + - `Program object { id, call_id, code, 2 more }` - An action to type in text. + - `id: string` - - `text: string` + The unique ID of the program item. - The text to type. + - `call_id: string` - - `type: "type"` + The stable call ID of the program item. - Specifies the event type. For a type action, this property is always set to `type`. + - `code: string` - - `"type"` + The JavaScript source executed by programmatic tool calling. - - `Wait object { type }` + - `fingerprint: string` - A wait action. + Opaque program replay fingerprint that must be round-tripped. - - `type: "wait"` + - `type: "program"` - Specifies the event type. For a wait action, this property is always set to `wait`. + The type of the item. Always `program`. - - `"wait"` + - `"program"` - - `ComputerCallOutput object { id, call_id, output, 4 more }` + - `ProgramOutput object { id, call_id, result, 2 more }` - `id: string` - The unique ID of the computer call tool output. + The unique ID of the program output item. - `call_id: string` - The ID of the computer tool call that produced the output. - - - `output: ResponseComputerToolCallOutputScreenshot` - - 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. + The call ID of the program item. - - `image_url: optional string` + - `result: string` - The URL of the screenshot image. + The result produced by the program item. - - `status: "completed" or "incomplete" or "failed" or "in_progress"` + - `status: "completed" or "incomplete"` - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + The terminal status of the program output item. - `"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. + - `type: "program_output"` - - `message: optional string` + The type of the item. Always `program_output`. - Details about the pending safety check. + - `"program_output"` - - `created_by: optional string` + - `FunctionCall object { arguments, call_id, name, 5 more }` - The identifier of the actor that created the item. + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. - - `Reasoning object { id, summary, type, 3 more }` + - `arguments: string` - 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). + A JSON string of the arguments to pass to the function. - - `id: string` + - `call_id: string` - The unique identifier of the reasoning content. + The unique ID of the function tool call generated by the model. - - `summary: array of object { text, type }` + - `name: string` - Reasoning summary content. + The name of the function to run. - - `text: string` + - `type: "function_call"` - A summary of the reasoning output from the model so far. + The type of the function tool call. Always `function_call`. - - `type: "summary_text"` + - `"function_call"` - The type of the object. Always `summary_text`. + - `id: optional string` - - `"summary_text"` + The unique ID of the function tool call. - - `type: "reasoning"` + - `caller: optional object { type } or object { caller_id, type }` - The type of the object. Always `reasoning`. + The execution context that produced this tool call. - - `"reasoning"` + - `Direct object { type }` - - `content: optional array of object { text, type }` + - `type: "direct"` - Reasoning text content. + - `"direct"` - - `text: string` + - `Program object { caller_id, type }` - The reasoning text from the model. + - `caller_id: string` - - `type: "reasoning_text"` + The call ID of the program item that produced this tool call. - The type of the reasoning text. Always `reasoning_text`. + - `type: "program"` - - `"reasoning_text"` + - `"program"` - - `encrypted_content: optional string` + - `namespace: optional string` - The encrypted content of the reasoning item - populated when a response is - generated with `reasoning.encrypted_content` in the `include` parameter. + The namespace of the function to run. - `status: optional "in_progress" or "completed" or "incomplete"` @@ -45681,58 +43230,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Program object { id, call_id, code, 2 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"` - - - `ProgramOutput object { id, call_id, result, 2 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"` - - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -46019,7 +43516,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"` @@ -46079,7 +43576,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` @@ -46131,7 +43628,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: @@ -46355,19 +43852,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"` @@ -46396,13 +43882,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`. @@ -46410,14 +43896,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`. @@ -46632,7 +44112,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` @@ -46746,7 +44226,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` @@ -47067,7 +44547,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"` @@ -47127,7 +44607,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` @@ -47179,7 +44659,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: @@ -47371,19 +44851,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"` @@ -47412,13 +44881,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`. @@ -47426,14 +44895,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`. @@ -47530,7 +44993,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` @@ -47612,7 +45075,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` @@ -47754,27 +45217,248 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"additional_tools"` - - `Compaction object { id, encrypted_content, type, created_by }` + - `FunctionCallOutput object { call_id, output, type, 3 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 ResponseInputText or ResponseInputImage or ResponseInputFile` + + 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 ResponseInputText or ResponseInputImage or ResponseInputFile` + + Text, image, or file output of the function call. + + - `ResponseInputText object { text, type, prompt_cache_breakpoint }` + + A text input to the model. + + - `ResponseInputImage object { detail, type, file_id, 2 more }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `ResponseInputFile 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. + + - `caller: optional object { type } or object { caller_id, type }` + + The execution context that produced this tool call. - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + - `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, 2 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 compaction item. + The unique ID of the file search tool call. - - `encrypted_content: string` + - `queries: array of string` - The encrypted content that was produced by compaction. + The queries used to search for files. - - `type: "compaction"` + - `status: "in_progress" or "searching" or "completed" or 2 more` - The type of the item. Always `compaction`. + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, - - `"compaction"` + - `"in_progress"` - - `created_by: optional string` + - `"searching"` - The identifier of the actor that created the item. + - `"completed"` + + - `"incomplete"` + + - `"failed"` + + - `type: "file_search_call"` + + The type of the file search tool call. Always `file_search_call`. + + - `"file_search_call"` + + - `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, type }` + + 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"` - `ImageGenerationCall object { id, result, status, type }` @@ -47806,6 +45490,438 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` + - `ComputerCall object { id, call_id, pending_safety_checks, 4 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 ComputerAction` + + 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 ComputerActionList` + + 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. + + - `ComputerCallOutput object { id, call_id, output, 4 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: ResponseComputerToolCallOutputScreenshot` + + 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. + + - `created_by: optional string` + + The identifier of the actor that created the item. + + - `Reasoning object { id, summary, type, 3 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 SummaryTextContent` + + 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`. + + - `type: "reasoning"` + + The type of the object. Always `reasoning`. + + - `"reasoning"` + + - `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, created_by }` + + 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"` + + - `created_by: optional string` + + The identifier of the actor that created the item. + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -48311,59 +46427,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, 6 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"` - - - `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, 2 more }` A list of tools available on an MCP server. @@ -48458,6 +46521,59 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. + - `McpCall object { id, arguments, name, 6 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"` + + - `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, 4 more }` A call to a custom tool created by the model. @@ -48508,11 +46624,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, 4 more }` - - - `id: string` + - `CustomToolCallOutput object { call_id, output, type, 2 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` @@ -48537,29 +46651,22 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile 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. + - `caller: optional object { type } or object { caller_id, type }` The execution context that produced this tool call. @@ -48584,10 +46691,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: ResponseUsage` Token accounting for the compaction pass, including cached, reasoning, and total tokens. @@ -48607,7 +46710,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` @@ -49262,7 +47365,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -49479,7 +47582,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response -- `Response object { id, created_at, error, 31 more }` +- `Response object { id, created_at, error, 32 more }` - `id: string` @@ -49617,7 +47720,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -49780,7 +47883,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -49884,17 +47987,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` @@ -49910,6 +48003,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -49960,7 +48063,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -50028,7 +48131,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -50071,7 +48174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -50275,193 +48378,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -50528,7 +48476,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -50624,7 +48572,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -50691,7 +48639,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -50699,7 +48647,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -50729,7 +48677,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -51113,7 +49061,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"` @@ -51173,7 +49121,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` @@ -51225,7 +49173,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: @@ -51449,19 +49397,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"` @@ -51490,13 +49427,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`. @@ -51504,14 +49441,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`. @@ -51726,7 +49657,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` @@ -51840,7 +49771,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` @@ -52165,7 +50096,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"` @@ -52225,7 +50156,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` @@ -52277,7 +50208,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: @@ -52469,19 +50400,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"` @@ -52510,13 +50430,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`. @@ -52524,14 +50444,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`. @@ -52628,7 +50542,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` @@ -52710,7 +50624,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` @@ -52861,13 +50775,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -52919,7 +50833,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -53624,7 +51538,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -53803,12 +51717,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -54026,7 +51940,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -54094,7 +52008,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -54182,7 +52096,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -54236,7 +52150,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -54332,7 +52246,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -54375,201 +52289,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - A click action. - - - `Click object { button, type, x, 2 more }` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -54634,13 +52357,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -54652,8 +52375,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -54961,7 +52682,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"` @@ -55021,7 +52742,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` @@ -55073,7 +52794,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: @@ -55265,19 +52986,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"` @@ -55306,13 +53016,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`. @@ -55320,14 +53030,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`. @@ -55424,7 +53128,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` @@ -55506,7 +53210,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` @@ -55827,7 +53531,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"` @@ -55887,7 +53591,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` @@ -55939,7 +53643,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: @@ -56131,19 +53835,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"` @@ -56172,13 +53865,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`. @@ -56186,14 +53879,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`. @@ -56290,7 +53977,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` @@ -56372,7 +54059,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` @@ -56516,7 +54203,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -57297,7 +54984,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -57420,12 +55107,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -57535,16 +55222,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 }` @@ -57692,7 +55379,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"` @@ -57752,7 +55439,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` @@ -57804,7 +55491,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: @@ -57996,19 +55683,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"` @@ -58037,13 +55713,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`. @@ -58051,14 +55727,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`. @@ -58155,7 +55825,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` @@ -58237,7 +55907,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` @@ -58385,7 +56055,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` @@ -58402,7 +56072,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` @@ -58524,16 +56194,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 ResponsePrompt` 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` @@ -58553,7 +56229,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -58565,7 +56241,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 }` @@ -58589,7 +56265,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. @@ -58696,7 +56372,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` @@ -58704,7 +56380,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. @@ -58741,8 +56417,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 ResponseFormatTextConfig` @@ -58750,7 +56426,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. @@ -58773,7 +56449,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -58802,7 +56478,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). - `ResponseFormatJSONObject object { type }` @@ -58870,7 +56546,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` @@ -58892,7 +56568,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). ### Response Audio Delta Event @@ -59240,7 +56916,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -59403,7 +57079,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -59507,17 +57183,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` @@ -59533,6 +57199,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -59583,7 +57259,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -59651,7 +57327,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -59694,7 +57370,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -59898,193 +57574,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -60151,7 +57672,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -60247,7 +57768,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -60314,7 +57835,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -60322,7 +57843,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -60352,7 +57873,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -60736,7 +58257,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"` @@ -60796,7 +58317,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` @@ -60848,7 +58369,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: @@ -61072,19 +58593,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"` @@ -61113,13 +58623,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`. @@ -61127,14 +58637,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`. @@ -61349,7 +58853,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` @@ -61463,7 +58967,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` @@ -61788,7 +59292,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"` @@ -61848,7 +59352,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` @@ -61900,7 +59404,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: @@ -62092,19 +59596,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"` @@ -62133,13 +59626,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`. @@ -62147,14 +59640,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`. @@ -62251,7 +59738,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` @@ -62333,7 +59820,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` @@ -62484,13 +59971,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -62542,7 +60029,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -63247,7 +60734,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -63426,12 +60913,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -63649,7 +61136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -63717,7 +61204,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -63805,7 +61292,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -63859,7 +61346,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -63955,7 +61442,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -63998,201 +61485,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -64257,13 +61553,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -64275,8 +61571,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -64584,7 +61878,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"` @@ -64644,7 +61938,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` @@ -64696,7 +61990,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: @@ -64888,19 +62182,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"` @@ -64929,13 +62212,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`. @@ -64943,14 +62226,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`. @@ -65047,7 +62324,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` @@ -65129,7 +62406,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` @@ -65450,7 +62727,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"` @@ -65510,7 +62787,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` @@ -65562,7 +62839,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: @@ -65754,19 +63031,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"` @@ -65795,13 +63061,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`. @@ -65809,14 +63075,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`. @@ -65913,7 +63173,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` @@ -65995,7 +63255,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` @@ -66139,7 +63399,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -66920,7 +64180,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -67043,12 +64303,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -67158,16 +64418,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 }` @@ -67315,7 +64575,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"` @@ -67375,7 +64635,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` @@ -67427,7 +64687,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: @@ -67619,19 +64879,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"` @@ -67660,13 +64909,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`. @@ -67674,14 +64923,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`. @@ -67778,7 +65021,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` @@ -67860,7 +65103,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` @@ -68008,7 +65251,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` @@ -68025,7 +65268,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` @@ -68147,16 +65390,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 ResponsePrompt` 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` @@ -68176,7 +65425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -68188,7 +65437,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 }` @@ -68212,7 +65461,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. @@ -68319,7 +65568,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` @@ -68327,7 +65576,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. @@ -68364,8 +65613,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 ResponseFormatTextConfig` @@ -68373,7 +65622,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. @@ -68396,7 +65645,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -68425,7 +65674,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). - `ResponseFormatJSONObject object { type }` @@ -68493,7 +65742,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` @@ -68515,7 +65764,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` @@ -68594,7 +65843,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -68678,7 +65927,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"explicit"` - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -68782,17 +66031,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` @@ -68808,6 +66047,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -68822,7 +66071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"refusal"` - - `ReasoningTextContent object { text, type }` + - `ReasoningText object { text, type }` Reasoning text from the model. @@ -68858,7 +66107,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -68962,17 +66211,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` @@ -68988,6 +66227,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -69048,7 +66297,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -69152,17 +66401,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` @@ -69178,6 +66417,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -69372,7 +66621,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -69535,7 +66784,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -69639,17 +66888,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` @@ -69665,6 +66904,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -69715,7 +66964,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -69783,7 +67032,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -69826,7 +67075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -70030,193 +67279,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -70283,7 +67377,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -70379,7 +67473,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -70446,7 +67540,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -70454,7 +67548,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -70484,7 +67578,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -70868,7 +67962,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"` @@ -70928,7 +68022,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` @@ -70980,7 +68074,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: @@ -71204,19 +68298,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"` @@ -71245,13 +68328,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`. @@ -71259,14 +68342,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`. @@ -71481,7 +68558,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` @@ -71595,7 +68672,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` @@ -71920,7 +68997,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"` @@ -71980,7 +69057,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` @@ -72032,7 +69109,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: @@ -72224,19 +69301,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"` @@ -72265,13 +69331,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`. @@ -72279,14 +69345,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`. @@ -72383,7 +69443,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` @@ -72465,7 +69525,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` @@ -72616,13 +69676,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -72674,7 +69734,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -73379,7 +70439,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -73558,12 +70618,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -73781,7 +70841,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -73849,7 +70909,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -73937,7 +70997,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -73991,7 +71051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -74087,7 +71147,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -74130,201 +71190,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - A click action. - - - `Click object { button, type, x, 2 more }` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -74389,13 +71258,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -74407,8 +71276,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -74716,7 +71583,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"` @@ -74776,7 +71643,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` @@ -74828,7 +71695,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: @@ -75020,19 +71887,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"` @@ -75061,13 +71917,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`. @@ -75075,14 +71931,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`. @@ -75179,7 +72029,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` @@ -75261,7 +72111,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` @@ -75582,7 +72432,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"` @@ -75642,7 +72492,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` @@ -75694,7 +72544,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: @@ -75886,19 +72736,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"` @@ -75927,13 +72766,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`. @@ -75941,14 +72780,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`. @@ -76045,7 +72878,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` @@ -76127,7 +72960,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` @@ -76271,7 +73104,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -77052,7 +73885,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -77175,12 +74008,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -77290,16 +74123,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 }` @@ -77447,7 +74280,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"` @@ -77507,7 +74340,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` @@ -77559,7 +74392,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: @@ -77751,19 +74584,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"` @@ -77792,13 +74614,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`. @@ -77806,14 +74628,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`. @@ -77910,7 +74726,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` @@ -77992,7 +74808,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` @@ -78140,7 +74956,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` @@ -78157,7 +74973,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` @@ -78279,16 +75095,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 ResponsePrompt` 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` @@ -78308,7 +75130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -78320,7 +75142,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 }` @@ -78344,7 +75166,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. @@ -78451,7 +75273,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` @@ -78459,7 +75281,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. @@ -78496,8 +75318,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 ResponseFormatTextConfig` @@ -78505,7 +75327,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. @@ -78528,7 +75350,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -78557,7 +75379,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). - `ResponseFormatJSONObject object { type }` @@ -78625,7 +75447,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` @@ -78647,7 +75469,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` @@ -78941,7 +75763,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -79104,7 +75926,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -79208,17 +76030,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` @@ -79234,6 +76046,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -79284,7 +76106,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -79352,7 +76174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -79395,7 +76217,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -79599,193 +76421,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -79852,7 +76519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -79948,7 +76615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -80015,7 +76682,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -80023,7 +76690,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -80053,7 +76720,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -80437,7 +77104,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"` @@ -80497,7 +77164,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` @@ -80549,7 +77216,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: @@ -80773,19 +77440,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"` @@ -80814,13 +77470,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`. @@ -80828,14 +77484,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`. @@ -81050,7 +77700,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` @@ -81164,7 +77814,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` @@ -81489,7 +78139,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"` @@ -81549,7 +78199,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` @@ -81601,7 +78251,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: @@ -81793,19 +78443,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"` @@ -81834,13 +78473,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`. @@ -81848,14 +78487,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`. @@ -81952,7 +78585,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` @@ -82034,7 +78667,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` @@ -82185,13 +78818,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -82243,7 +78876,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -82948,7 +79581,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -83127,12 +79760,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -83350,7 +79983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -83418,7 +80051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -83506,7 +80139,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -83560,7 +80193,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -83656,7 +80289,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -83699,201 +80332,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - A click action. - - - `Click object { button, type, x, 2 more }` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -83958,13 +80400,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -83976,8 +80418,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -84285,7 +80725,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"` @@ -84345,7 +80785,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` @@ -84397,7 +80837,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: @@ -84589,19 +81029,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"` @@ -84630,13 +81059,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`. @@ -84644,14 +81073,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`. @@ -84748,7 +81171,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` @@ -84830,7 +81253,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` @@ -85151,7 +81574,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"` @@ -85211,7 +81634,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` @@ -85263,7 +81686,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: @@ -85455,19 +81878,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"` @@ -85496,13 +81908,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`. @@ -85510,14 +81922,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`. @@ -85614,7 +82020,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` @@ -85696,7 +82102,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` @@ -85840,7 +82246,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -86621,7 +83027,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -86744,12 +83150,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -86859,16 +83265,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 }` @@ -87016,7 +83422,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"` @@ -87076,7 +83482,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` @@ -87128,7 +83534,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: @@ -87320,19 +83726,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"` @@ -87361,13 +83756,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`. @@ -87375,14 +83770,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`. @@ -87479,7 +83868,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` @@ -87561,7 +83950,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` @@ -87709,7 +84098,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` @@ -87726,7 +84115,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` @@ -87848,16 +84237,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 ResponsePrompt` 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` @@ -87877,7 +84272,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -87889,7 +84284,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 }` @@ -87913,7 +84308,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. @@ -88020,7 +84415,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` @@ -88028,7 +84423,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. @@ -88065,8 +84460,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 ResponseFormatTextConfig` @@ -88074,7 +84469,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. @@ -88097,7 +84492,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -88126,7 +84521,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). - `ResponseFormatJSONObject object { type }` @@ -88194,7 +84589,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` @@ -88216,7 +84611,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` @@ -88308,7 +84703,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. @@ -88331,7 +84726,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -88360,7 +84755,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). - `ResponseFormatJSONObject object { type }` @@ -88380,7 +84775,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -88409,7 +84804,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). ### Response Function Call Arguments Delta Event @@ -88469,238 +84864,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.function_call_arguments.done"` -### Response Function Call Output Item - -- `ResponseFunctionCallOutputItem = ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - A piece of message content, such as text, an image, or a file. - - - `ResponseInputTextContent 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"` - - - `ResponseInputImageContent 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"` - - - `ResponseInputFileContent 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"` - -### Response Function Call Output Item List - -- `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent 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"` - - - `ResponseInputImageContent 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"` - - - `ResponseInputFileContent 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"` - ### Response Function Shell Call Output Content - `ResponseFunctionShellCallOutputContent object { outcome, stderr, stdout }` @@ -88993,7 +85156,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -89156,7 +85319,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -89260,17 +85423,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` @@ -89286,6 +85439,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -89336,7 +85499,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -89404,7 +85567,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -89447,7 +85610,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -89651,193 +85814,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -89904,7 +85912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -90000,7 +86008,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -90067,7 +86075,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -90075,7 +86083,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -90105,7 +86113,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -90489,7 +86497,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"` @@ -90549,7 +86557,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` @@ -90601,7 +86609,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: @@ -90825,19 +86833,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"` @@ -90866,13 +86863,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`. @@ -90880,14 +86877,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`. @@ -91102,7 +87093,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` @@ -91216,7 +87207,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` @@ -91541,7 +87532,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"` @@ -91601,7 +87592,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` @@ -91653,7 +87644,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: @@ -91845,19 +87836,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"` @@ -91886,13 +87866,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`. @@ -91900,14 +87880,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`. @@ -92004,7 +87978,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` @@ -92086,7 +88060,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` @@ -92237,13 +88211,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -92295,7 +88269,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -93000,7 +88974,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -93179,12 +89153,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -93402,7 +89376,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -93470,7 +89444,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -93558,7 +89532,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -93612,7 +89586,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -93708,7 +89682,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -93751,201 +89725,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - A click action. - - - `Click object { button, type, x, 2 more }` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -94010,13 +89793,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -94028,8 +89811,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -94337,7 +90118,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"` @@ -94397,7 +90178,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` @@ -94449,7 +90230,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: @@ -94641,19 +90422,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"` @@ -94682,13 +90452,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`. @@ -94696,14 +90466,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`. @@ -94800,7 +90564,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` @@ -94882,7 +90646,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` @@ -95203,7 +90967,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"` @@ -95263,7 +91027,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` @@ -95315,7 +91079,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: @@ -95507,19 +91271,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"` @@ -95548,13 +91301,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`. @@ -95562,14 +91315,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`. @@ -95666,7 +91413,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` @@ -95748,7 +91495,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` @@ -95892,7 +91639,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -96673,7 +92420,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -96796,12 +92543,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -96911,16 +92658,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 }` @@ -97068,7 +92815,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"` @@ -97128,7 +92875,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` @@ -97180,7 +92927,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: @@ -97372,19 +93119,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"` @@ -97413,13 +93149,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`. @@ -97427,14 +93163,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`. @@ -97531,7 +93261,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` @@ -97613,7 +93343,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` @@ -97761,7 +93491,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` @@ -97778,7 +93508,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` @@ -97900,16 +93630,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 ResponsePrompt` 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` @@ -97929,7 +93665,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -97941,7 +93677,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 }` @@ -97965,7 +93701,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. @@ -98072,7 +93808,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` @@ -98080,7 +93816,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. @@ -98117,8 +93853,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 ResponseFormatTextConfig` @@ -98126,7 +93862,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. @@ -98149,7 +93885,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -98178,7 +93914,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). - `ResponseFormatJSONObject object { type }` @@ -98246,7 +93982,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` @@ -98268,7 +94004,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` @@ -98457,7 +94193,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -98620,7 +94356,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -98724,17 +94460,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` @@ -98750,6 +94476,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -98800,7 +94536,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -98868,7 +94604,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -98911,7 +94647,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -99115,193 +94851,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -99368,7 +94949,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -99464,7 +95045,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -99531,7 +95112,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -99539,7 +95120,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -99569,7 +95150,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -99953,7 +95534,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"` @@ -100013,7 +95594,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` @@ -100065,7 +95646,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: @@ -100289,19 +95870,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"` @@ -100330,13 +95900,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`. @@ -100344,14 +95914,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`. @@ -100566,7 +96130,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` @@ -100680,7 +96244,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` @@ -101005,7 +96569,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"` @@ -101065,7 +96629,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` @@ -101117,7 +96681,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: @@ -101309,19 +96873,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"` @@ -101350,13 +96903,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`. @@ -101364,14 +96917,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`. @@ -101468,7 +97015,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` @@ -101550,7 +97097,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` @@ -101701,13 +97248,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -101759,7 +97306,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -102464,7 +98011,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -102643,12 +98190,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -102866,7 +98413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -102934,7 +98481,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -103022,7 +98569,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -103076,7 +98623,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -103172,7 +98719,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -103215,201 +98762,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -103474,13 +98830,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -103492,8 +98848,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -103801,7 +99155,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"` @@ -103861,7 +99215,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` @@ -103913,7 +99267,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: @@ -104105,19 +99459,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"` @@ -104146,13 +99489,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`. @@ -104160,14 +99503,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`. @@ -104264,7 +99601,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` @@ -104346,7 +99683,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` @@ -104667,7 +100004,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"` @@ -104727,7 +100064,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` @@ -104779,7 +100116,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: @@ -104971,19 +100308,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"` @@ -105012,13 +100338,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`. @@ -105026,14 +100352,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`. @@ -105130,7 +100450,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` @@ -105212,7 +100532,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` @@ -105356,7 +100676,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -106137,7 +101457,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -106260,12 +101580,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -106375,16 +101695,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 }` @@ -106532,7 +101852,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"` @@ -106592,7 +101912,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` @@ -106644,7 +101964,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: @@ -106836,19 +102156,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"` @@ -106877,13 +102186,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`. @@ -106891,14 +102200,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`. @@ -106920,5057 +102223,835 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"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 ContainerAuto or LocalEnvironment or ContainerReference` - - - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - - `LocalEnvironment object { type, skills }` - - - `ContainerReference 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](https://platform.openai.com/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 CustomToolInputFormat` - - The input format for the custom tool. Default is unconstrained text. - - - `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](https://platform.openai.com/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 CustomToolInputFormat` - - The input format for the custom tool. Default is unconstrained text. - - - `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](https://platform.openai.com/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](https://platform.openai.com/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"` - - - `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`. - - - `prompt: optional ResponsePrompt` - - 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 ResponseInputText or ResponseInputImage or ResponseInputFile]` - - 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` - - - `ResponseInputText object { text, type, prompt_cache_breakpoint }` - - A text input to the model. - - - `ResponseInputImage object { detail, type, file_id, 2 more }` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `ResponseInputFile 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](https://platform.openai.com/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](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. - - 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 Reasoning` - - **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 ReasoningEffort` - - 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](https://platform.openai.com/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](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'. - - 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 ResponseStatus` - - 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 ResponseTextConfig` - - 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) - - - `format: optional ResponseFormatTextConfig` - - 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](https://platform.openai.com/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. - - - `ResponseFormatText object { type }` - - Default response format. Used to generate text responses. - - - `type: "text"` - - The type of response format being defined. Always `text`. - - - `"text"` - - - `ResponseFormatTextJSONSchemaConfig 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). - - - `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](https://platform.openai.com/docs/guides/structured-outputs). - - - `ResponseFormatJSONObject 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 ResponseUsage` - - 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](https://platform.openai.com/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](https://platform.openai.com/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"` - -### Response Input - -- `ResponseInput = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 more` - - A list of one or many input items to the model, containing - different content types. - - - `EasyInputMessage 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 ResponseInputMessageContentList` - - 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. - - - `ResponseInputMessageContentList = array of ResponseInputContent` - - A list of one or many input items to the model, containing different content - types. - - - `ResponseInputText 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"` - - - `ResponseInputImage 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"` - - - `ResponseInputFile 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, status, 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. - - - `content: ResponseInputMessageContentList` - - 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"` - - - `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"` - - - `ResponseOutputMessage object { id, content, role, 3 more }` - - An output message from the model. - - - `id: string` - - The unique ID of the output message. - - - `content: array of ResponseOutputText or ResponseOutputRefusal` - - The content of the output message. - - - `ResponseOutputText 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` - - - `ResponseOutputRefusal 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"` - - - `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, 2 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. - - - `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"` - - - `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, 4 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. - - - `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 object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - 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 ComputerActionList` - - 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. - - - `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"` - - - `ComputerCallOutput object { call_id, output, type, 3 more }` - - The output of a computer tool call. - - - `call_id: string` - - The ID of the computer tool call that produced the output. - - - `output: ResponseComputerToolCallOutputScreenshot` - - 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. - - - `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, type }` - - 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. - - - `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"` - - - `FunctionCall object { arguments, call_id, name, 5 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. - - - `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, 3 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 ResponseFunctionCallOutputItemList` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent 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"` - - - `ResponseInputImageContent 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"` - - - `ResponseInputFileContent 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. - - - `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"` - - - `ToolSearchCall object { arguments, type, id, 3 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. - - - `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, 3 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 ComparisonFilter or CompoundFilter` - - 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 ComparisonFilter 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. - - - `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. - - - `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 ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` - - Network access policy for the container. - - - `ContainerNetworkPolicyDisabled object { type }` - - - `type: "disabled"` - - Disable outbound network access. Always `disabled`. - - - `"disabled"` - - - `ContainerNetworkPolicyAllowlist 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 ContainerNetworkPolicyDomainSecret` - - 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"` - - 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`. - - - `"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-2" or 3 more` - - 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` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"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`. - - - `"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 ContainerAuto or LocalEnvironment or ContainerReference` - - - `ContainerAuto 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 ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` - - Network access policy for the container. - - - `ContainerNetworkPolicyDisabled object { type }` - - - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - - - `skills: optional array of SkillReference or InlineSkill` - - An optional list of skills referenced by id or inline data. - - - `SkillReference 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. - - - `InlineSkill object { description, name, source, type }` - - - `description: string` - - The description of the skill. - - - `name: string` - - The name of the skill. - - - `source: InlineSkillSource` - - 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"` - - - `LocalEnvironment object { type, skills }` - - - `type: "local"` - - Use a local computer environment. - - - `"local"` - - - `skills: optional array of LocalSkill` - - 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. - - - `ContainerReference 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 - - - `"container_reference"` - - - `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) - - - `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 CustomToolInputFormat` - - 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](https://platform.openai.com/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 CustomToolInputFormat` - - The input format for the custom tool. Default is unconstrained text. - - - `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: "tool_search_output"` - - The item type. Always `tool_search_output`. - - - `"tool_search_output"` - - - `id: optional string` - - The unique ID of this tool search output. - - - `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 output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `AdditionalTools object { role, tools, type, id }` - - - `role: "developer"` - - The role that provided the additional tools. Only `developer` is supported. - - - `"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` - - A list of additional tools made available at this item. - - - `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 ComparisonFilter or CompoundFilter` - - 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. - - - `CompoundFilter object { filters, type }` - - Combine multiple filters using `and` or `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. - - - `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 ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` - - Network access policy for the container. - - - `ContainerNetworkPolicyDisabled object { type }` - - - `ContainerNetworkPolicyAllowlist 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"` - - 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`. - - - `"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-2" or 3 more` - - 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` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"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`. - - - `"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 ContainerAuto or LocalEnvironment or ContainerReference` - - - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - - `LocalEnvironment object { type, skills }` - - - `ContainerReference 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](https://platform.openai.com/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 CustomToolInputFormat` - - The input format for the custom tool. Default is unconstrained text. - - - `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](https://platform.openai.com/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 CustomToolInputFormat` - - The input format for the custom tool. Default is unconstrained text. - - - `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. - - - `Reasoning object { id, summary, type, 3 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](https://platform.openai.com/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"` - - - `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 }` - - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/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. - - - `ImageGenerationCall object { id, result, status, type }` - - 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"` - - - `CodeInterpreterCall object { id, code, container_id, 3 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"` + - `"jpeg"` - - `"failed"` + - `partial_images: optional number` - - `type: "code_interpreter_call"` + Number of partial images to generate in streaming mode, from 0 (default value) to 3. - The type of the code interpreter tool call. Always `code_interpreter_call`. + - `quality: optional "low" or "medium" or "high" or "auto"` - - `"code_interpreter_call"` + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. - - `LocalShellCall object { id, action, call_id, 2 more }` + - `"low"` - A tool call to run a command on the local shell. + - `"medium"` - - `id: string` + - `"high"` - The unique ID of the local shell call. + - `"auto"` - - `action: object { command, env, type, 3 more }` + - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - Execute a shell command on the server. + 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`. - - `command: array of string` + - `string` - The command to run. + - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - `env: map[string]` + 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`. - Environment variables to set for the command. + - `"1024x1024"` - - `type: "exec"` + - `"1024x1536"` - The type of the local shell action. Always `exec`. + - `"1536x1024"` - - `"exec"` + - `"auto"` - - `timeout_ms: optional number` + - `LocalShell object { type }` - Optional timeout in milliseconds for the command. + A tool that allows the model to execute shell commands in a local environment. - - `user: optional string` + - `type: "local_shell"` - Optional user to run the command as. + The type of the local shell tool. Always `local_shell`. - - `working_directory: optional string` + - `"local_shell"` - Optional working directory to run the command in. + - `Shell object { type, allowed_callers, environment }` - - `call_id: string` + A tool that allows the model to execute shell commands. - The unique ID of the local shell tool call generated by the model. + - `type: "shell"` - - `status: "in_progress" or "completed" or "incomplete"` + The type of the shell tool. Always `shell`. - The status of the local shell call. + - `"shell"` - - `"in_progress"` + - `allowed_callers: optional array of "direct" or "programmatic"` - - `"completed"` + The tool invocation context(s). - - `"incomplete"` + - `"direct"` - - `type: "local_shell_call"` + - `"programmatic"` - The type of the local shell call. Always `local_shell_call`. + - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `"local_shell_call"` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `LocalShellCallOutput object { id, output, type, status }` + - `LocalEnvironment object { type, skills }` - The output of a local shell tool call. + - `ContainerReference object { container_id, type }` - - `id: string` + - `Custom object { name, type, allowed_callers, 3 more }` - The unique ID of the local shell tool call generated by the model. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - `output: string` + - `name: string` - A JSON string of the output of the local shell tool call. + The name of the custom tool, used to identify it in tool calls. - - `type: "local_shell_call_output"` + - `type: "custom"` - The type of the local shell tool call output. Always `local_shell_call_output`. + The type of the custom tool. Always `custom`. - - `"local_shell_call_output"` + - `"custom"` - - `status: optional "in_progress" or "completed" or "incomplete"` + - `allowed_callers: optional array of "direct" or "programmatic"` - The status of the item. One of `in_progress`, `completed`, or `incomplete`. + The tool invocation context(s). - - `"in_progress"` + - `"direct"` - - `"completed"` + - `"programmatic"` - - `"incomplete"` + - `defer_loading: optional boolean` - - `ShellCall object { action, call_id, type, 4 more }` + Whether this tool should be deferred and discovered via tool search. - A tool representing a request to execute one or more shell commands. + - `description: optional string` - - `action: object { commands, max_output_length, timeout_ms }` + Optional description of the custom tool, used to provide more context. - The shell commands and limits that describe how to run the tool call. + - `format: optional CustomToolInputFormat` - - `commands: array of string` + The input format for the custom tool. Default is unconstrained text. - Ordered shell commands for the execution environment to run. + - `Namespace object { description, name, tools, type }` - - `max_output_length: optional number` + Groups function/custom tools under a shared namespace. - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. + - `description: string` - - `timeout_ms: optional number` + A description of the namespace shown to the model. - Maximum wall-clock time in milliseconds to allow the shell commands to run. + - `name: string` - - `call_id: string` + The namespace name used in tool calls (for example, `crm`). - The unique ID of the shell tool call generated by the model. + - `tools: array of object { name, type, allowed_callers, 5 more } or object { name, type, allowed_callers, 3 more }` - - `type: "shell_call"` + The function/custom tools available inside this namespace. - The type of the item. Always `shell_call`. + - `Function object { name, type, allowed_callers, 5 more }` - - `"shell_call"` + - `name: string` - - `id: optional string` + - `type: "function"` - The unique ID of the shell tool call. Populated when this item is returned via API. + - `"function"` - - `caller: optional object { type } or object { caller_id, type }` + - `allowed_callers: optional array of "direct" or "programmatic"` - The execution context that produced this tool call. + The tool invocation context(s). - - `Direct object { type }` + - `"direct"` - - `type: "direct"` + - `"programmatic"` - The caller type. Always `direct`. + - `defer_loading: optional boolean` - - `"direct"` + Whether this function should be deferred and discovered via tool search. - - `Program object { caller_id, type }` + - `description: optional string` - - `caller_id: string` + - `output_schema: optional map[unknown]` - The call ID of the program item that produced this tool call. + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. - - `type: "program"` + - `parameters: optional unknown` - The caller type. Always `program`. + - `strict: optional boolean` - - `"program"` + 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. - - `environment: optional LocalEnvironment or ContainerReference` + - `Custom object { name, type, allowed_callers, 3 more }` - The environment to execute the shell commands in. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - `LocalEnvironment object { type, skills }` + - `name: string` - - `ContainerReference object { container_id, type }` + The name of the custom tool, used to identify it in tool calls. - - `status: optional "in_progress" or "completed" or "incomplete"` + - `type: "custom"` - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. + The type of the custom tool. Always `custom`. - - `"in_progress"` + - `"custom"` - - `"completed"` + - `allowed_callers: optional array of "direct" or "programmatic"` - - `"incomplete"` + The tool invocation context(s). - - `ShellCallOutput object { call_id, output, type, 4 more }` + - `"direct"` - The streamed output items emitted by a shell tool call. + - `"programmatic"` - - `call_id: string` + - `defer_loading: optional boolean` - The unique ID of the shell tool call generated by the model. + Whether this tool should be deferred and discovered via tool search. - - `output: array of ResponseFunctionShellCallOutputContent` + - `description: optional string` - Captured chunks of stdout and stderr output, along with their associated outcomes. + Optional description of the custom tool, used to provide more context. - - `outcome: object { type } or object { exit_code, type }` + - `format: optional CustomToolInputFormat` - The exit or timeout outcome associated with this shell call. + The input format for the custom tool. Default is unconstrained text. - - `Timeout object { type }` + - `type: "namespace"` - Indicates that the shell call exceeded its configured time limit. + The type of the tool. Always `namespace`. - - `type: "timeout"` + - `"namespace"` - The outcome type. Always `timeout`. + - `ToolSearch object { type, description, execution, parameters }` - - `"timeout"` + Hosted or BYOT tool search configuration for deferred tools. - - `Exit object { exit_code, type }` + - `type: "tool_search"` - Indicates that the shell commands finished and returned an exit code. + The type of the tool. Always `tool_search`. - - `exit_code: number` + - `"tool_search"` - The exit code returned by the shell process. + - `description: optional string` - - `type: "exit"` + Description shown to the model for a client-executed tool search tool. - The outcome type. Always `exit`. + - `execution: optional "server" or "client"` - - `"exit"` + Whether tool search is executed by the server or by the client. - - `stderr: string` + - `"server"` - Captured stderr output for the shell call. + - `"client"` - - `stdout: string` + - `parameters: optional unknown` - Captured stdout output for the shell call. + Parameter schema for a client-executed tool search tool. - - `type: "shell_call_output"` + - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }` - The type of the item. Always `shell_call_output`. + 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). - - `"shell_call_output"` + - `type: "web_search_preview" or "web_search_preview_2025_03_11"` - - `id: optional string` + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. - The unique ID of the shell tool call output. Populated when this item is returned via API. + - `"web_search_preview"` - - `caller: optional object { type } or object { caller_id, type }` + - `"web_search_preview_2025_03_11"` - The execution context that produced this tool call. + - `search_content_types: optional array of "text" or "image"` - - `Direct object { type }` + - `"text"` - - `type: "direct"` + - `"image"` - The caller type. Always `direct`. + - `search_context_size: optional "low" or "medium" or "high"` - - `"direct"` + 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. - - `Program object { caller_id, type }` + - `"low"` - - `caller_id: string` + - `"medium"` - The call ID of the program item that produced this tool call. + - `"high"` - - `type: "program"` + - `user_location: optional object { type, city, country, 2 more }` - The caller type. Always `program`. + The user's location. - - `"program"` + - `type: "approximate"` - - `max_output_length: optional number` + The type of location approximation. Always `approximate`. - The maximum number of UTF-8 characters captured for this shell call's combined output. + - `"approximate"` - - `status: optional "in_progress" or "completed" or "incomplete"` + - `city: optional string` - The status of the shell call output. + Free text input for the city of the user, e.g. `San Francisco`. - - `"in_progress"` + - `country: optional string` - - `"completed"` + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - `"incomplete"` + - `region: optional string` - - `ApplyPatchCall object { call_id, operation, status, 3 more }` + Free text input for the region of the user, e.g. `California`. - A tool call representing a request to create, delete, or update files using diff patches. + - `timezone: optional string` - - `call_id: string` + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - The unique ID of the apply patch tool call generated by the model. + - `ApplyPatch object { type, allowed_callers }` - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` + Allows the assistant to create, delete, or update files using unified diffs. - The specific create, delete, or update instruction for the apply_patch tool call. + - `type: "apply_patch"` - - `CreateFile object { diff, path, type }` + The type of the tool. Always `apply_patch`. - Instruction for creating a new file via the apply_patch tool. + - `"apply_patch"` - - `diff: string` + - `allowed_callers: optional array of "direct" or "programmatic"` - Unified diff content to apply when creating the file. + The tool invocation context(s). - - `path: string` + - `"direct"` - Path of the file to create relative to the workspace root. + - `"programmatic"` - - `type: "create_file"` + - `top_p: number` - The operation type. Always `create_file`. + 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. - - `"create_file"` + We generally recommend altering this or `temperature` but not both. - - `DeleteFile object { path, type }` + - `background: optional boolean` - Instruction for deleting an existing file via the apply_patch tool. + Whether to run the model response in the background. + [Learn more](/docs/guides/background). - - `path: string` + - `completed_at: optional number` - Path of the file to delete relative to the workspace root. + Unix timestamp (in seconds) of when this Response was completed. + Only present when the status is `completed`. - - `type: "delete_file"` + - `conversation: optional object { id }` - The operation type. Always `delete_file`. + The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - `"delete_file"` + - `id: string` - - `UpdateFile object { diff, path, type }` + The unique ID of the conversation that this response was associated with. - Instruction for updating an existing file via the apply_patch tool. + - `max_output_tokens: optional number` - - `diff: string` + 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). - Unified diff content to apply to the existing file. + - `max_tool_calls: optional number` - - `path: string` + 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. - Path of the file to update relative to the workspace root. + - `moderation: optional object { input, output }` - - `type: "update_file"` + Moderation results for the response input and output, if moderated completions were requested. - The operation type. Always `update_file`. + - `input: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` - - `"update_file"` + Moderation for the response input. - - `status: "in_progress" or "completed"` + - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }` - The status of the apply patch tool call. One of `in_progress` or `completed`. + A moderation result produced for the response input or output. - - `"in_progress"` + - `categories: map[boolean]` - - `"completed"` + A dictionary of moderation categories to booleans, True if the input is flagged under this category. - - `type: "apply_patch_call"` + - `category_applied_input_types: map[array of "text" or "image"]` - The type of the item. Always `apply_patch_call`. + Which modalities of input are reflected by the score for each category. - - `"apply_patch_call"` + - `"text"` - - `id: optional string` + - `"image"` - The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `category_scores: map[number]` - - `caller: optional object { type } or object { caller_id, type }` + A dictionary of moderation categories to scores. - The execution context that produced this tool call. + - `flagged: boolean` - - `Direct object { type }` + A boolean indicating whether the content was flagged by any category. - - `type: "direct"` + - `model: string` - The caller type. Always `direct`. + The moderation model that produced this result. - - `"direct"` + - `type: "moderation_result"` - - `Program object { caller_id, type }` + The object type, which was always `moderation_result` for successful moderation results. - - `caller_id: string` + - `"moderation_result"` - The call ID of the program item that produced this tool call. + - `Error object { code, message, type }` - - `type: "program"` + An error produced while attempting moderation for the response input or output. - The caller type. Always `program`. + - `code: string` - - `"program"` + The error code. - - `ApplyPatchCallOutput object { call_id, status, type, 3 more }` + - `message: string` - The streamed output emitted by an apply patch tool call. + The error message. - - `call_id: string` + - `type: "error"` - The unique ID of the apply patch tool call generated by the model. + The object type, which was always `error` for moderation failures. - - `status: "completed" or "failed"` + - `"error"` - The status of the apply patch tool call output. One of `completed` or `failed`. + - `output: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` - - `"completed"` + Moderation for the response output. - - `"failed"` + - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }` - - `type: "apply_patch_call_output"` + A moderation result produced for the response input or output. - The type of the item. Always `apply_patch_call_output`. + - `categories: map[boolean]` - - `"apply_patch_call_output"` + A dictionary of moderation categories to booleans, True if the input is flagged under this category. - - `id: optional string` + - `category_applied_input_types: map[array of "text" or "image"]` - The unique ID of the apply patch tool call output. Populated when this item is returned via API. + Which modalities of input are reflected by the score for each category. - - `caller: optional object { type } or object { caller_id, type }` + - `"text"` - The execution context that produced this tool call. + - `"image"` - - `Direct object { type }` + - `category_scores: map[number]` - - `type: "direct"` + A dictionary of moderation categories to scores. - The caller type. Always `direct`. + - `flagged: boolean` - - `"direct"` + A boolean indicating whether the content was flagged by any category. - - `Program object { caller_id, type }` + - `model: string` - - `caller_id: string` + The moderation model that produced this result. - The call ID of the program item that produced this tool call. + - `type: "moderation_result"` - - `type: "program"` + The object type, which was always `moderation_result` for successful moderation results. - The caller type. Always `program`. + - `"moderation_result"` - - `"program"` + - `Error object { code, message, type }` - - `output: optional string` + An error produced while attempting moderation for the response input or output. - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). + - `code: string` - - `McpListTools object { id, server_label, tools, 2 more }` + The error code. - A list of tools available on an MCP server. + - `message: string` - - `id: string` + The error message. - The unique ID of the list. + - `type: "error"` - - `server_label: string` + The object type, which was always `error` for moderation failures. - The label of the MCP server. + - `"error"` - - `tools: array of object { input_schema, name, annotations, description }` + - `output_text: optional string` - The tools available on the server. + 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. - - `input_schema: unknown` + - `previous_response_id: optional string` - The JSON schema describing the tool's input. + 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`. - - `name: string` + - `prompt: optional ResponsePrompt` - The name of the tool. + Reference to a prompt template and its variables. + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - `annotations: optional unknown` + - `id: string` - Additional annotations about the tool. + The unique identifier of the prompt template to use. - - `description: optional string` + - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile]` - The description of the tool. + 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. - - `type: "mcp_list_tools"` + - `string` - The type of the item. Always `mcp_list_tools`. + - `ResponseInputText object { text, type, prompt_cache_breakpoint }` - - `"mcp_list_tools"` + A text input to the model. - - `error: optional string` + - `ResponseInputImage object { detail, type, file_id, 2 more }` - Error message if the server could not list tools. + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `McpApprovalRequest object { id, arguments, name, 2 more }` + - `ResponseInputFile object { type, detail, file_data, 4 more }` - A request for human approval of a tool invocation. + A file input to the model. - - `id: string` + - `version: optional string` - The unique ID of the approval request. + Optional version of the prompt template. - - `arguments: string` + - `prompt_cache_key: optional string` - A JSON string of arguments for the tool. + 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). - - `name: string` + - `prompt_cache_options: optional object { mode, ttl }` - The name of the tool to run. + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. - - `server_label: string` + - `mode: "implicit" or "explicit"` - The label of the MCP server making the request. + Whether implicit prompt-cache breakpoints were enabled. - - `type: "mcp_approval_request"` + - `"implicit"` - The type of the item. Always `mcp_approval_request`. + - `"explicit"` - - `"mcp_approval_request"` + - `ttl: "30m"` - - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` + The minimum lifetime applied to each cache breakpoint. - A response to an MCP approval request. + - `"30m"` - - `approval_request_id: string` + - `prompt_cache_retention: optional "in_memory" or "24h"` - The ID of the approval request being answered. + Deprecated. Use `prompt_cache_options.ttl` instead. - - `approve: boolean` + 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. - Whether the request was approved. + For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: - - `type: "mcp_approval_response"` + - Organizations without ZDR enabled default to `24h`. + - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified. - The type of the item. Always `mcp_approval_response`. + - `"in_memory"` - - `"mcp_approval_response"` + - `"24h"` - - `id: optional string` + - `reasoning: optional Reasoning` - The unique ID of the approval response + **gpt-5 and o-series models only** - - `reason: optional string` + Configuration options for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Optional reason for the decision. + - `context: optional "auto" or "current_turn" or "all_turns"` - - `McpCall object { id, arguments, name, 6 more }` + 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. - An invocation of a tool on an MCP server. + - `"auto"` - - `id: string` + - `"current_turn"` - The unique ID of the tool call. + - `"all_turns"` - - `arguments: string` + - `effort: optional ReasoningEffort` - A JSON string of the arguments passed to the tool. + 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. - - `name: string` + - `"none"` - The name of the tool that was run. + - `"minimal"` - - `server_label: string` + - `"low"` - The label of the MCP server running the tool. + - `"medium"` - - `type: "mcp_call"` + - `"high"` - The type of the item. Always `mcp_call`. + - `"xhigh"` - - `"mcp_call"` + - `"max"` - - `approval_request_id: optional string` + - `generate_summary: optional "auto" or "concise" or "detailed"` - 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. + **Deprecated:** use `summary` instead. - - `error: optional string` + 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 error from the tool call, if any. + - `"auto"` - - `output: optional string` + - `"concise"` - The output from the tool call. + - `"detailed"` - - `status: optional "in_progress" or "completed" or "incomplete" or 2 more` + - `mode: optional string or "standard" or "pro"` - The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. + Controls the reasoning execution mode for the request. - - `"in_progress"` + When returned on a response, this is the effective execution mode. - - `"completed"` + - `string` - - `"incomplete"` + - `"standard" or "pro"` - - `"calling"` + Controls the reasoning execution mode for the request. - - `"failed"` + When returned on a response, this is the effective execution mode. - - `CustomToolCallOutput object { call_id, output, type, 2 more }` + - `"standard"` - The output of a custom tool call from your code, being sent back to the model. + - `"pro"` - - `call_id: string` + - `summary: optional "auto" or "concise" or "detailed"` - The call ID, used to map this custom tool call output to a custom tool call. + 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`. - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` + `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - The output from the custom tool call generated by your code. - Can be a string or an list of output content. + - `"auto"` - - `StringOutput = string` + - `"concise"` - A string of the output of the custom tool call. + - `"detailed"` - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` + - `safety_identifier: optional string` - Text, image, or file output of the custom tool call. + 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). - - `ResponseInputText object { text, type, prompt_cache_breakpoint }` + - `service_tier: optional "auto" or "default" or "flex" or 2 more` - A text input to the model. + Specifies the processing type used for serving the request. - - `ResponseInputImage object { detail, type, file_id, 2 more }` + - 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'. - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + 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. - - `ResponseInputFile object { type, detail, file_data, 4 more }` + - `"auto"` - A file input to the model. + - `"default"` - - `type: "custom_tool_call_output"` + - `"flex"` - The type of the custom tool call output. Always `custom_tool_call_output`. + - `"scale"` - - `"custom_tool_call_output"` + - `"priority"` - - `id: optional string` + - `status: optional ResponseStatus` - The unique ID of the custom tool call output in the OpenAI platform. + The status of the response generation. One of `completed`, `failed`, + `in_progress`, `cancelled`, `queued`, or `incomplete`. - - `caller: optional object { type } or object { caller_id, type }` + - `"completed"` - The execution context that produced this tool call. + - `"failed"` - - `Direct object { type }` + - `"in_progress"` - - `type: "direct"` + - `"cancelled"` - The caller type. Always `direct`. + - `"queued"` - - `"direct"` + - `"incomplete"` - - `Program object { caller_id, type }` + - `text: optional ResponseTextConfig` - - `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](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - - `type: "program"` + - `format: optional ResponseFormatTextConfig` - The caller type. Always `program`. + An object specifying the format that the model must output. - - `"program"` + 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). - - `CustomToolCall object { call_id, input, name, 4 more }` + The default format is `{ "type": "text" }` with no additional options. - A call to a custom tool created by the model. + **Not recommended for gpt-4o and newer models:** - - `call_id: string` + Setting to `{ "type": "json_object" }` enables the older JSON mode, which + ensures the message the model generates is valid JSON. Using `json_schema` + is preferred for models that support it. - An identifier used to map this custom tool call to a tool call output. + - `ResponseFormatText object { type }` - - `input: string` + Default response format. Used to generate text responses. - The input for the custom tool call generated by the model. + - `type: "text"` - - `name: string` + The type of response format being defined. Always `text`. - The name of the custom tool being called. + - `"text"` - - `type: "custom_tool_call"` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` - The type of the custom tool call. Always `custom_tool_call`. + JSON Schema response format. Used to generate structured JSON responses. + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - - `"custom_tool_call"` + - `name: string` - - `id: optional 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. - The unique ID of the custom tool call in the OpenAI platform. + - `schema: map[unknown]` - - `caller: optional object { type } or object { caller_id, type }` + The schema for the response format, described as a JSON Schema object. + Learn how to build JSON schemas [here](https://json-schema.org/). - The execution context that produced this tool call. + - `type: "json_schema"` - - `Direct object { type }` + The type of response format being defined. Always `json_schema`. - - `type: "direct"` + - `"json_schema"` - - `"direct"` + - `description: optional string` - - `Program object { caller_id, type }` + A description of what the response format is for, used by the model to + determine how to respond in the format. - - `caller_id: string` + - `strict: optional boolean` - The call ID of the program item that produced this tool call. + 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). - - `type: "program"` + - `ResponseFormatJSONObject object { type }` - - `"program"` + 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. - - `namespace: optional string` + - `type: "json_object"` - The namespace of the custom tool being called. + The type of response format being defined. Always `json_object`. - - `CompactionTrigger object { type }` + - `"json_object"` - Compacts the current context. Must be the final input item. + - `verbosity: optional "low" or "medium" or "high"` - - `type: "compaction_trigger"` + 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`. - The type of the item. Always `compaction_trigger`. + - `"low"` - - `"compaction_trigger"` + - `"medium"` - - `ItemReference object { id, type }` + - `"high"` - An internal identifier for an item to reference. + - `top_logprobs: optional number` - - `id: string` + 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. - The ID of the item to reference. + - `truncation: optional "auto" or "disabled"` - - `type: optional "item_reference"` + The truncation strategy to use for the model response. - The type of item to reference. Always `item_reference`. + - `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. - - `"item_reference"` + - `"auto"` - - `Program object { id, call_id, code, 2 more }` + - `"disabled"` - - `id: string` + - `usage: optional ResponseUsage` - The unique ID of this program 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 stable call ID of the program item. + The number of input tokens. - - `code: string` + - `input_tokens_details: object { cache_write_tokens, cached_tokens }` - The JavaScript source executed by programmatic tool calling. + A detailed breakdown of the input tokens. - - `fingerprint: string` + - `cache_write_tokens: number` - Opaque program replay fingerprint that must be round-tripped. + The number of input tokens that were written to the cache. - - `type: "program"` + - `cached_tokens: number` - The item type. Always `program`. + The number of tokens that were retrieved from the cache. + [More on prompt caching](/docs/guides/prompt-caching). - - `"program"` + - `output_tokens: number` - - `ProgramOutput object { id, call_id, result, 2 more }` + The number of output tokens. - - `id: string` + - `output_tokens_details: object { reasoning_tokens }` - The unique ID of this program output item. + A detailed breakdown of the output tokens. - - `call_id: string` + - `reasoning_tokens: number` - The call ID of the program item. + The number of reasoning tokens. - - `result: string` + - `total_tokens: number` - The result produced by the program item. + The total number of tokens used. - - `status: "completed" or "incomplete"` + - `user: optional string` - The terminal status of the program output. + 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). - - `"completed"` + - `sequence_number: number` - - `"incomplete"` + The sequence number of this event. - - `type: "program_output"` + - `type: "response.incomplete"` - The item type. Always `program_output`. + The type of the event. Always `response.incomplete`. - - `"program_output"` + - `"response.incomplete"` ### Response Input Audio @@ -112031,7 +103112,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -112215,7 +103296,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -112257,7 +103338,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -112328,7 +103409,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -112451,7 +103532,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -112864,7 +103945,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -112968,17 +104049,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` @@ -112994,6 +104065,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -113044,7 +104125,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -113112,7 +104193,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -113220,7 +104301,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -113352,7 +104433,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -113448,7 +104529,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -113491,206 +104572,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` - - A click action. - - - `Click object { button, type, x, 2 more }` + - `action: optional ComputerAction` 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 ComputerActionList` - - 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. @@ -113882,6 +104767,47 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"wait"` + - `actions: optional ComputerActionList` + + 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. + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -113956,13 +104882,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -114350,7 +105276,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"` @@ -114410,7 +105336,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` @@ -114462,7 +105388,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: @@ -114686,19 +105612,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"` @@ -114727,13 +105642,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`. @@ -114741,14 +105656,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`. @@ -114963,7 +105872,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` @@ -115077,7 +105986,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` @@ -115398,7 +106307,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"` @@ -115458,7 +106367,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` @@ -115510,7 +106419,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: @@ -115702,19 +106611,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"` @@ -115743,13 +106641,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`. @@ -115757,14 +106655,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`. @@ -115861,7 +106753,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` @@ -115943,7 +106835,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` @@ -116087,7 +106979,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -116868,7 +107760,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -116941,7 +107833,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -117045,17 +107937,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` @@ -117071,6 +107953,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -117121,7 +108013,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -117189,7 +108081,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -117297,7 +108189,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -117429,7 +108321,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -117525,7 +108417,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -117568,7 +108460,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -117763,202 +108655,47 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"wait"` - - `actions: optional ComputerActionList` - - 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. - - - `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 ComputerActionList` + + 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. + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -118033,13 +108770,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -118427,7 +109164,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"` @@ -118487,7 +109224,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` @@ -118539,7 +109276,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: @@ -118763,19 +109500,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"` @@ -118804,13 +109530,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`. @@ -118818,14 +109544,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`. @@ -119040,7 +109760,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` @@ -119154,7 +109874,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` @@ -119475,7 +110195,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"` @@ -119535,7 +110255,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` @@ -119587,7 +110307,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: @@ -119779,19 +110499,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"` @@ -119820,13 +110529,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`. @@ -119834,14 +110543,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`. @@ -119938,7 +110641,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` @@ -120020,7 +110723,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` @@ -120164,7 +110867,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -120945,7 +111648,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -121032,7 +111735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -121136,17 +111839,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` @@ -121162,6 +111855,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -121212,7 +111915,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -121280,7 +111983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -121388,7 +112091,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -121520,7 +112223,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -121616,7 +112319,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -121659,7 +112362,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -121854,202 +112557,47 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"wait"` - - `actions: optional ComputerActionList` - - 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. - - - `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 ComputerActionList` + + 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. + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -122124,13 +112672,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -122518,7 +113066,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"` @@ -122578,7 +113126,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` @@ -122630,7 +113178,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: @@ -122854,19 +113402,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"` @@ -122895,13 +113432,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`. @@ -122909,14 +113446,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`. @@ -123131,7 +113662,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` @@ -123245,7 +113776,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` @@ -123566,7 +114097,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"` @@ -123626,7 +114157,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` @@ -123678,7 +114209,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: @@ -123870,19 +114401,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"` @@ -123911,13 +114431,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`. @@ -123925,14 +114445,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`. @@ -124029,7 +114543,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` @@ -124111,7 +114625,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` @@ -124255,7 +114769,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -125036,7 +115550,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -125115,7 +115629,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -125219,17 +115733,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` @@ -125245,6 +115749,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -125310,7 +115824,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Output Text -- `ResponseOutputText object { annotations, text, type, logprobs }` +- `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -125414,17 +115928,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` @@ -125440,6 +115944,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"` + ### Response Output Text Annotation Added Event - `ResponseOutputTextAnnotationAddedEvent object { annotation, annotation_index, content_index, 4 more }` @@ -125481,7 +115995,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponsePrompt 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). + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - `id: string` @@ -125521,7 +116035,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -125755,7 +116269,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -125918,7 +116432,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -126022,17 +116536,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` @@ -126048,6 +116552,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -126098,7 +116612,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -126166,7 +116680,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -126209,7 +116723,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -126413,193 +116927,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -126666,7 +117025,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -126762,7 +117121,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -126829,7 +117188,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -126837,7 +117196,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -126867,7 +117226,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -127251,7 +117610,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"` @@ -127311,7 +117670,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` @@ -127363,7 +117722,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: @@ -127587,19 +117946,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"` @@ -127628,13 +117976,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`. @@ -127642,14 +117990,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`. @@ -127864,7 +118206,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` @@ -127978,7 +118320,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` @@ -128303,7 +118645,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"` @@ -128363,7 +118705,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` @@ -128415,7 +118757,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: @@ -128607,19 +118949,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"` @@ -128648,13 +118979,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`. @@ -128662,14 +118993,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`. @@ -128766,7 +119091,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` @@ -128848,7 +119173,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` @@ -128999,13 +119324,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -129057,7 +119382,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -129762,7 +120087,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -129941,12 +120266,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -130164,7 +120489,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -130232,7 +120557,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -130320,7 +120645,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -130374,7 +120699,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -130470,7 +120795,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -130513,201 +120838,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -130772,13 +120906,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -130790,8 +120924,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -131099,7 +121231,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"` @@ -131159,7 +121291,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` @@ -131211,7 +121343,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: @@ -131403,19 +121535,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"` @@ -131444,13 +121565,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`. @@ -131458,14 +121579,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`. @@ -131562,7 +121677,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` @@ -131644,7 +121759,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` @@ -131965,7 +122080,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"` @@ -132025,7 +122140,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` @@ -132077,7 +122192,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: @@ -132269,19 +122384,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"` @@ -132310,13 +122414,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`. @@ -132324,14 +122428,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`. @@ -132428,7 +122526,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` @@ -132510,7 +122608,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` @@ -132654,7 +122752,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -133435,7 +123533,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -133558,12 +123656,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -133673,16 +123771,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 }` @@ -133830,7 +123928,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"` @@ -133890,7 +123988,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` @@ -133942,7 +124040,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: @@ -134134,19 +124232,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"` @@ -134175,13 +124262,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`. @@ -134189,14 +124276,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`. @@ -134293,7 +124374,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` @@ -134375,7 +124456,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` @@ -134523,7 +124604,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` @@ -134540,7 +124621,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` @@ -134606,72 +124687,78 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"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"` + - `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` - The object type, which was always `error` for moderation failures. - - - `"error"` + 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 ResponsePrompt` 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` @@ -134691,7 +124778,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -134703,7 +124790,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 }` @@ -134727,7 +124814,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. @@ -134834,7 +124921,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` @@ -134842,7 +124929,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. @@ -134879,8 +124966,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 ResponseFormatTextConfig` @@ -134888,7 +124975,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. @@ -134911,7 +124998,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -134940,7 +125027,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). - `ResponseFormatJSONObject object { type }` @@ -135008,7 +125095,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` @@ -135030,7 +125117,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` @@ -135676,7 +125763,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -135839,7 +125926,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -135943,17 +126030,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` @@ -135969,6 +126046,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -136019,7 +126106,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -136087,7 +126174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -136130,7 +126217,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -136325,202 +126412,47 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"wait"` - - `actions: optional ComputerActionList` - - 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. - - - `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 ComputerActionList` + + 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. + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -136587,7 +126519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -136683,7 +126615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -136750,7 +126682,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -136758,7 +126690,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -136788,7 +126720,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -137172,7 +127104,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"` @@ -137232,7 +127164,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` @@ -137284,7 +127216,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: @@ -137508,19 +127440,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"` @@ -137549,13 +127470,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`. @@ -137563,14 +127484,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`. @@ -137785,7 +127700,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` @@ -137899,7 +127814,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` @@ -138224,7 +128139,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"` @@ -138284,7 +128199,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` @@ -138336,7 +128251,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: @@ -138528,19 +128443,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"` @@ -138569,13 +128473,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`. @@ -138583,14 +128487,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`. @@ -138687,7 +128585,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` @@ -138769,7 +128667,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` @@ -138920,13 +128818,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -138978,7 +128876,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -139683,7 +129581,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -139862,12 +129760,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -140085,7 +129983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -140153,7 +130051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -140241,7 +130139,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -140295,7 +130193,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -140391,7 +130289,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -140434,201 +130332,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -140693,13 +130400,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -140711,8 +130418,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -141020,7 +130725,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"` @@ -141080,7 +130785,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` @@ -141132,7 +130837,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: @@ -141324,19 +131029,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"` @@ -141365,13 +131059,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`. @@ -141379,14 +131073,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`. @@ -141483,7 +131171,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` @@ -141565,7 +131253,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` @@ -141886,7 +131574,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"` @@ -141946,7 +131634,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` @@ -141998,7 +131686,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: @@ -142190,19 +131878,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"` @@ -142231,13 +131908,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`. @@ -142245,14 +131922,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`. @@ -142349,7 +132020,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` @@ -142431,7 +132102,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` @@ -142575,7 +132246,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -143356,7 +133027,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -143479,12 +133150,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -143594,16 +133265,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 }` @@ -143751,7 +133422,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"` @@ -143811,7 +133482,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` @@ -143863,7 +133534,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: @@ -144055,19 +133726,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"` @@ -144096,13 +133756,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`. @@ -144110,14 +133770,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`. @@ -144214,7 +133868,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` @@ -144296,7 +133950,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` @@ -144444,7 +134098,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` @@ -144461,7 +134115,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` @@ -144583,16 +134237,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 ResponsePrompt` 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` @@ -144612,7 +134272,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -144624,7 +134284,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 }` @@ -144648,7 +134308,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. @@ -144755,7 +134415,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` @@ -144763,7 +134423,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. @@ -144800,8 +134460,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 ResponseFormatTextConfig` @@ -144809,7 +134469,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. @@ -144832,7 +134492,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -144861,7 +134521,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). - `ResponseFormatJSONObject object { type }` @@ -144929,7 +134589,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` @@ -144951,7 +134611,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` @@ -144983,7 +134643,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -145035,7 +134695,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -145300,24 +134960,24 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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, 5 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, 4 more }` - `WebSearchCall object { id, action, status, type }` 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, 4 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, 4 more }` @@ -145326,7 +134986,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, 2 more }` @@ -145340,7 +135000,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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, type }` @@ -146264,8 +135924,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 ResponseFormatTextConfig` @@ -146273,7 +135933,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. @@ -146296,7 +135956,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -146325,7 +135985,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). - `ResponseFormatJSONObject object { type }` @@ -146486,7 +136146,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` @@ -146589,7 +136249,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 }` @@ -146648,24 +136308,24 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message.output_text.logprobs"` - - `input: optional string or ResponseInput` + - `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 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. - - `ResponseInput = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 more` + - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 29 more` A list of one or many input items to the model, containing different content types. @@ -146718,7 +136378,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -146881,7 +136541,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -146985,17 +136645,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` @@ -147011,6 +136661,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -147061,7 +136721,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -147129,7 +136789,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -147172,7 +136832,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -147376,193 +137036,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -147629,7 +137134,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -147725,7 +137230,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -147792,7 +137297,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -147800,7 +137305,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -147830,7 +137335,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -148214,7 +137719,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"` @@ -148274,7 +137779,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` @@ -148326,7 +137831,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: @@ -148550,19 +138055,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"` @@ -148591,13 +138085,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`. @@ -148605,14 +138099,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`. @@ -148827,7 +138315,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` @@ -148941,7 +138429,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` @@ -149266,7 +138754,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"` @@ -149326,7 +138814,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` @@ -149378,7 +138866,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: @@ -149570,19 +139058,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"` @@ -149611,13 +139088,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`. @@ -149625,14 +139102,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`. @@ -149729,7 +139200,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` @@ -149811,7 +139282,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` @@ -149962,13 +139433,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -150020,7 +139491,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -150725,7 +140196,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -150901,7 +140372,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` @@ -150920,12 +140391,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -151159,12 +140630,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 ResponsePrompt` 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` @@ -151184,7 +140655,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -151196,11 +140667,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"` @@ -151220,7 +140691,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. @@ -151327,7 +140798,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` @@ -151335,7 +140806,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. @@ -151359,7 +140830,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 }` @@ -151386,8 +140857,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 ResponseFormatTextConfig` @@ -151395,7 +140866,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. @@ -151418,7 +140889,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -151447,7 +140918,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). - `ResponseFormatJSONObject object { type }` @@ -151537,12 +141008,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -151652,16 +141123,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 }` @@ -151809,7 +141280,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"` @@ -151869,7 +141340,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` @@ -151921,7 +141392,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: @@ -152113,19 +141584,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"` @@ -152154,13 +141614,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`. @@ -152168,14 +141628,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`. @@ -152272,7 +141726,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` @@ -152354,7 +141808,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` @@ -152524,7 +141978,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). ### Responses Server Event @@ -152858,7 +142312,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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"` @@ -153021,7 +142475,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -153125,17 +142579,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` @@ -153151,6 +142595,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -153201,7 +142655,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -153269,7 +142723,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -153312,7 +142766,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -153516,193 +142970,38 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -153769,7 +143068,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -153865,7 +143164,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -153932,7 +143231,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 ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -153940,7 +143239,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -153970,7 +143269,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImageContent 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"` @@ -154354,7 +143653,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"` @@ -154414,7 +143713,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` @@ -154466,7 +143765,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: @@ -154690,19 +143989,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"` @@ -154731,13 +144019,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`. @@ -154745,14 +144033,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`. @@ -154967,7 +144249,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` @@ -155081,7 +144363,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` @@ -155406,7 +144688,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"` @@ -155466,7 +144748,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` @@ -155518,7 +144800,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: @@ -155710,19 +144992,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"` @@ -155751,13 +145022,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`. @@ -155765,14 +145036,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`. @@ -155869,7 +145134,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` @@ -155951,7 +145216,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` @@ -156102,13 +145367,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -156160,7 +145425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { encrypted_content, type, id }` - 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` @@ -156865,7 +146130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -157044,12 +146309,12 @@ 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. - `string` - - `ChatModel = "gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` + - `"gpt-5.6-sol" or "gpt-5.6-terra" or "gpt-5.6-luna" or 78 more` - `"gpt-5.6-sol"` @@ -157267,7 +146532,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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` @@ -157335,7 +146600,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FunctionCall object { arguments, call_id, name, 5 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` @@ -157423,7 +146688,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -157477,7 +146742,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `WebSearchCall object { id, action, status, type }` 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` @@ -157573,7 +146838,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -157616,201 +146881,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` 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 ComputerActionList` Flattened batched actions for `computer_use`. Each action includes an @@ -157875,13 +146949,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -157893,8 +146967,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -158202,7 +147274,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"` @@ -158262,7 +147334,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` @@ -158314,7 +147386,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: @@ -158506,19 +147578,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"` @@ -158547,13 +147608,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`. @@ -158561,14 +147622,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`. @@ -158665,7 +147720,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` @@ -158747,7 +147802,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` @@ -159068,7 +148123,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"` @@ -159128,7 +148183,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` @@ -159180,7 +148235,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: @@ -159372,19 +148427,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"` @@ -159413,13 +148457,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`. @@ -159427,14 +148471,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`. @@ -159531,7 +148569,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` @@ -159613,7 +148651,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` @@ -159757,7 +148795,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -160538,7 +149576,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -160661,12 +149699,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -160776,16 +149814,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 }` @@ -160933,7 +149971,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"` @@ -160993,7 +150031,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` @@ -161045,7 +150083,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: @@ -161237,19 +150275,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"` @@ -161278,13 +150305,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`. @@ -161292,14 +150319,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`. @@ -161396,7 +150417,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` @@ -161478,7 +150499,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` @@ -161626,7 +150647,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` @@ -161643,7 +150664,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` @@ -161709,72 +150730,78 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"error"` - - `output: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }` + - `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` - 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"` + 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 ResponsePrompt` 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` @@ -161794,7 +150821,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -161806,7 +150833,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 }` @@ -161830,7 +150857,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. @@ -161937,7 +150964,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` @@ -161945,7 +150972,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. @@ -161982,8 +151009,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 ResponseFormatTextConfig` @@ -161991,7 +151018,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. @@ -162014,7 +151041,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ResponseFormatTextJSONSchemaConfig 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` @@ -162043,7 +151070,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). - `ResponseFormatJSONObject object { type }` @@ -162111,7 +151138,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` @@ -162133,7 +151160,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` @@ -162165,7 +151192,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -162217,7 +151244,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -162482,24 +151509,24 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `FileSearchCall object { id, queries, status, 2 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, 5 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, 4 more }` - `WebSearchCall object { id, action, status, type }` 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, 4 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, 4 more }` @@ -162508,7 +151535,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, 2 more }` @@ -162522,7 +151549,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `Compaction object { id, encrypted_content, type, created_by }` - 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, type }` @@ -163596,12 +152623,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `ToolChoiceTypes 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: @@ -163635,7 +152662,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ **get** `/responses/{response_id}/input_items` -List input items +Returns a list of input items for a given response. ### Path Parameters @@ -163731,7 +152758,7 @@ List input items - `ResponseInputImage 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"` @@ -163854,7 +152881,7 @@ List input items The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -163958,17 +152985,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` @@ -163984,6 +153001,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -164034,7 +153061,7 @@ List input items - `FileSearchCall object { id, queries, status, 2 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` @@ -164102,7 +153129,7 @@ List input items - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -164145,7 +153172,7 @@ List input items - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -164349,193 +153376,38 @@ List input items 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"` - - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -164608,7 +153480,7 @@ List input items - `WebSearchCall object { id, action, status, type }` 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` @@ -164793,7 +153665,7 @@ List input items - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -165130,7 +154002,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"` @@ -165190,7 +154062,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` @@ -165242,7 +154114,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: @@ -165466,19 +154338,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"` @@ -165507,13 +154368,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`. @@ -165521,14 +154382,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`. @@ -165743,7 +154598,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` @@ -165857,7 +154712,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` @@ -166178,7 +155033,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"` @@ -166238,7 +155093,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` @@ -166290,7 +155145,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: @@ -166482,19 +155337,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"` @@ -166523,13 +155367,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`. @@ -166537,14 +155381,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`. @@ -166641,7 +155479,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` @@ -166723,7 +155561,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` @@ -166870,13 +155708,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -166980,7 +155818,7 @@ List input items - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -167774,7 +156612,7 @@ List input items - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -167959,7 +156797,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `ResponseInputImage 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"` @@ -168082,7 +156920,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -168186,17 +157024,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` @@ -168212,6 +157040,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -168262,7 +157100,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `FileSearchCall object { id, queries, status, 2 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` @@ -168330,7 +157168,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -168373,7 +157211,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -168577,193 +157415,38 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ 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"` - - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -168836,7 +157519,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `WebSearchCall object { id, action, status, type }` 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` @@ -169021,7 +157704,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -169358,7 +158041,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"` @@ -169418,7 +158101,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` @@ -169470,7 +158153,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: @@ -169694,19 +158377,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"` @@ -169735,13 +158407,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`. @@ -169749,14 +158421,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`. @@ -169971,7 +158637,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` @@ -170085,7 +158751,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` @@ -170406,7 +159072,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"` @@ -170466,7 +159132,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` @@ -170518,7 +159184,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: @@ -170710,19 +159376,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"` @@ -170751,13 +159406,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`. @@ -170765,14 +159420,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`. @@ -170869,7 +159518,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` @@ -170951,7 +159600,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` @@ -171098,13 +159747,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -171208,7 +159857,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `Compaction object { id, encrypted_content, type, created_by }` - 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` @@ -172002,7 +160651,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -172077,7 +160726,9 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ **post** `/responses/input_tokens` -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. ### Body Parameters @@ -172158,7 +160809,7 @@ Get input token counts - `ResponseInputImage 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"` @@ -172321,7 +160972,7 @@ Get input token counts The content of the output message. - - `ResponseOutputText object { annotations, text, type, logprobs }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -172425,17 +161076,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` @@ -172451,6 +161092,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"` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -172501,7 +161152,7 @@ Get input token counts - `FileSearchCall object { id, queries, status, 2 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` @@ -172569,7 +161220,7 @@ Get input token counts - `ComputerCall object { id, call_id, pending_safety_checks, 4 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` @@ -172612,7 +161263,7 @@ Get input token counts - `"computer_call"` - - `action: optional object { button, type, x, 2 more } or object { keys, type, x, y } or object { path, type, keys } or 6 more` + - `action: optional ComputerAction` A click action. @@ -172816,193 +161467,38 @@ Get input token counts 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"` - - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -173069,7 +161565,7 @@ Get input token counts - `WebSearchCall object { id, action, status, type }` 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` @@ -173165,7 +161661,7 @@ Get input token counts - `FunctionCall object { arguments, call_id, name, 5 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` @@ -173232,7 +161728,7 @@ Get input token counts The unique ID of the function tool call generated by the model. - - `output: string or ResponseFunctionCallOutputItemList` + - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` Text, image, or file output of the function tool call. @@ -173240,7 +161736,7 @@ Get input token counts A JSON string of the output of the function tool call. - - `ResponseFunctionCallOutputItemList = array of ResponseFunctionCallOutputItem` + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` An array of content outputs (text, image, file) for the function tool call. @@ -173270,7 +161766,7 @@ Get input token counts - `ResponseInputImageContent 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"` @@ -173654,7 +162150,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"` @@ -173714,7 +162210,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` @@ -173766,7 +162262,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: @@ -173990,19 +162486,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"` @@ -174031,13 +162516,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`. @@ -174045,14 +162530,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`. @@ -174267,7 +162746,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` @@ -174381,7 +162860,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` @@ -174706,7 +163185,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"` @@ -174766,7 +163245,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` @@ -174818,7 +163297,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: @@ -175010,19 +163489,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"` @@ -175051,13 +163519,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`. @@ -175065,14 +163533,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`. @@ -175169,7 +163631,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` @@ -175251,7 +163713,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` @@ -175402,13 +163864,13 @@ 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` The unique identifier of the reasoning content. - - `summary: array of object { text, type }` + - `summary: array of SummaryTextContent` Reasoning summary content. @@ -175460,7 +163922,7 @@ Get input token counts - `Compaction object { encrypted_content, type, id }` - 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` @@ -176165,7 +164627,7 @@ Get input token counts - `ResponseInputImage 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). - `ResponseInputFile object { type, detail, file_data, 4 more }` @@ -176338,7 +164800,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` @@ -176360,7 +164822,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 Reasoning` @@ -176453,8 +164915,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 ResponseFormatTextConfig` @@ -176462,7 +164924,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. @@ -176485,7 +164947,7 @@ Get input token counts - `ResponseFormatTextJSONSchemaConfig 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` @@ -176514,7 +164976,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). - `ResponseFormatJSONObject object { type }` @@ -176602,12 +165064,12 @@ Get input token counts - `ToolChoiceTypes 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: @@ -176858,7 +165320,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"` @@ -176918,7 +165380,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` @@ -176970,7 +165432,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: @@ -177162,19 +165624,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"` @@ -177203,13 +165654,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`. @@ -177217,14 +165668,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`. @@ -177321,7 +165766,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` @@ -177403,7 +165848,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`