diff --git a/en/resources/responses/index.md b/en/resources/responses/index.md index 6f5f765..2d70db7 100644 --- a/en/resources/responses/index.md +++ b/en/resources/responses/index.md @@ -40,7 +40,7 @@ as input for the model's response. The unique ID of the conversation. - - `ResponseConversationParam = object { id }` + - `ResponseConversationParam object { id }` The conversation that this response belongs to. @@ -98,7 +98,7 @@ as input for the model's response. A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -120,7 +120,7 @@ as input for the model's response. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -134,7 +134,7 @@ as input for the model's response. - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -164,7 +164,7 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -227,7 +227,7 @@ as input for the model's response. - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -238,84 +238,6 @@ as input for the model's response. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -343,7 +265,7 @@ as input for the model's response. - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -355,7 +277,7 @@ as input for the model's response. The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -363,7 +285,7 @@ as input for the model's response. The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -385,7 +307,7 @@ as input for the model's response. - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -411,7 +333,7 @@ as input for the model's response. The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -441,7 +363,7 @@ as input for the model's response. - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -485,7 +407,7 @@ as input for the model's response. - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -532,7 +454,7 @@ as input for the model's response. - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -600,7 +522,7 @@ as input for the model's response. The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -650,7 +572,7 @@ as input for the model's response. A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -686,7 +608,7 @@ as input for the model's response. The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -708,7 +630,7 @@ as input for the model's response. The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -741,7 +663,7 @@ as input for the model's response. The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -755,7 +677,7 @@ as input for the model's response. - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -777,7 +699,7 @@ as input for the model's response. The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -787,7 +709,7 @@ as input for the model's response. - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -817,7 +739,7 @@ as input for the model's response. The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -831,7 +753,7 @@ as input for the model's response. - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -846,198 +768,43 @@ as input for the model's response. Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -1100,7 +867,7 @@ as input for the model's response. - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -1114,7 +881,7 @@ as input for the model's response. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -1146,7 +913,7 @@ as input for the model's response. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -1160,7 +927,7 @@ as input for the model's response. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -1196,7 +963,7 @@ as input for the model's response. - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -1238,7 +1005,7 @@ as input for the model's response. - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -1258,7 +1025,7 @@ as input for the model's response. An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -1272,7 +1039,7 @@ as input for the model's response. - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -1302,7 +1069,7 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -1356,7 +1123,7 @@ as input for the model's response. - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -1394,13 +1161,13 @@ as input for the model's response. - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -1430,7 +1197,7 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -1448,7 +1215,7 @@ as input for the model's response. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -1501,7 +1268,7 @@ as input for the model's response. - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -1509,59 +1276,10 @@ as input for the model's response. Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -1604,7 +1322,7 @@ as input for the model's response. 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 }` + - `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). @@ -1614,7 +1332,7 @@ as input for the model's response. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -1646,7 +1364,7 @@ as input for the model's response. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -1706,7 +1424,7 @@ as input for the model's response. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -1729,7 +1447,7 @@ as input for the model's response. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -1795,7 +1513,7 @@ as input for the model's response. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -1848,7 +1566,7 @@ as input for the model's response. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -1862,7 +1580,7 @@ as input for the model's response. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -1892,7 +1610,7 @@ as input for the model's response. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -1900,7 +1618,7 @@ as input for the model's response. - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -1934,7 +1652,7 @@ as input for the model's response. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -2055,7 +1773,7 @@ as input for the model's response. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -2065,7 +1783,7 @@ as input for the model's response. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -2077,7 +1795,7 @@ as input for the model's response. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -2105,47 +1823,15 @@ as input for the model's response. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -2161,7 +1847,7 @@ as input for the model's response. Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -2197,7 +1883,7 @@ as input for the model's response. - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -2221,7 +1907,7 @@ as input for the model's response. The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -2233,7 +1919,7 @@ as input for the model's response. - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -2259,7 +1945,7 @@ as input for the model's response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -2269,7 +1955,7 @@ as input for the model's response. - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -2291,7 +1977,7 @@ as input for the model's response. - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -2307,7 +1993,7 @@ as input for the model's response. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -2325,7 +2011,7 @@ as input for the model's response. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -2351,45 +2037,13 @@ as input for the model's response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -2415,7 +2069,7 @@ as input for the model's response. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -2469,7 +2123,7 @@ as input for the model's response. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -2511,7 +2165,7 @@ as input for the model's response. - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -2572,7 +2226,7 @@ as input for the model's response. - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -2590,7 +2244,7 @@ as input for the model's response. The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -2620,7 +2274,7 @@ as input for the model's response. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -2641,7 +2295,7 @@ as input for the model's response. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -2655,7 +2309,7 @@ as input for the model's response. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -2689,7 +2343,7 @@ as input for the model's response. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -2747,7 +2401,7 @@ as input for the model's response. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -2775,7 +2429,7 @@ as input for the model's response. - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -2813,41 +2467,9 @@ as input for the model's response. The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -2859,7 +2481,7 @@ as input for the model's response. - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -2875,7 +2497,7 @@ as input for the model's response. The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -2885,7 +2507,7 @@ as input for the model's response. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -2931,7 +2553,7 @@ as input for the model's response. - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -2943,7 +2565,7 @@ as input for the model's response. The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -2961,7 +2583,7 @@ as input for the model's response. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -2975,7 +2597,7 @@ as input for the model's response. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -3011,7 +2633,7 @@ as input for the model's response. The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -3041,7 +2663,7 @@ as input for the model's response. Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -3083,7 +2705,7 @@ as input for the model's response. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -3109,7 +2731,7 @@ as input for the model's response. - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -3135,7 +2757,7 @@ as input for the model's response. Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -3188,7 +2810,7 @@ as input for the model's response. - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -3209,84 +2831,18 @@ as input for the model's response. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -3297,7 +2853,7 @@ as input for the model's response. The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -3327,7 +2883,7 @@ as input for the model's response. The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -3590,84 +3146,18 @@ as input for the model's response. - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -3825,7 +3315,7 @@ as input for the model's response. ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -3835,7 +3325,7 @@ as input for the model's response. - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -3869,7 +3359,7 @@ as input for the model's response. `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -3917,7 +3407,7 @@ as input for the model's response. - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -3954,7 +3444,7 @@ as input for the model's response. - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -3990,7 +3480,7 @@ as input for the model's response. - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -4004,7 +3494,7 @@ as input for the model's response. - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -4022,7 +3512,7 @@ as input for the model's response. The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -4036,7 +3526,7 @@ as input for the model's response. - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -4046,7 +3536,7 @@ as input for the model's response. - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -4076,7 +3566,7 @@ as input for the model's response. [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -4106,7 +3596,7 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -4124,130 +3614,14 @@ as input for the model's response. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -4280,7 +3654,7 @@ as input for the model's response. 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 }` + - `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). @@ -4290,7 +3664,7 @@ as input for the model's response. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -4322,7 +3696,7 @@ as input for the model's response. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -4382,7 +3756,7 @@ as input for the model's response. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -4405,7 +3779,7 @@ as input for the model's response. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -4471,7 +3845,7 @@ as input for the model's response. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -4524,7 +3898,7 @@ as input for the model's response. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -4538,7 +3912,7 @@ as input for the model's response. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -4568,41 +3942,9 @@ as input for the model's response. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -4610,7 +3952,7 @@ as input for the model's response. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -4731,7 +4073,7 @@ as input for the model's response. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -4741,7 +4083,7 @@ as input for the model's response. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -4753,163 +4095,13 @@ as input for the model's response. - `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 + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `"container_auto"` + - `LocalEnvironment object { type, skills }` - - `file_ids: optional array of string` - - An optional list of uploaded files to make available to your code. + - `ContainerReference object { container_id, type }` - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -4935,39 +4127,7 @@ as input for the model's response. 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -4983,7 +4143,7 @@ as input for the model's response. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -5001,7 +4161,7 @@ as input for the model's response. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -5027,45 +4187,13 @@ as input for the model's response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -5091,7 +4219,7 @@ as input for the model's response. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -5145,7 +4273,7 @@ as input for the model's response. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -5191,7 +4319,7 @@ as input for the model's response. ### Returns -- `Response = object { id, created_at, error, 30 more }` +- `Response object { id, created_at, error, 30 more }` - `id: string` @@ -5279,7 +4407,7 @@ as input for the model's response. A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -5301,7 +4429,7 @@ as input for the model's response. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -5315,7 +4443,7 @@ as input for the model's response. - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -5345,7 +4473,7 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -5408,7 +4536,7 @@ as input for the model's response. - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -5419,84 +4547,6 @@ as input for the model's response. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -5524,7 +4574,7 @@ as input for the model's response. - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -5536,7 +4586,7 @@ as input for the model's response. The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -5544,7 +4594,7 @@ as input for the model's response. The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -5566,7 +4616,7 @@ as input for the model's response. - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -5592,7 +4642,7 @@ as input for the model's response. The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -5622,7 +4672,7 @@ as input for the model's response. - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -5666,7 +4716,7 @@ as input for the model's response. - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -5713,7 +4763,7 @@ as input for the model's response. - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -5781,7 +4831,7 @@ as input for the model's response. The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -5831,7 +4881,7 @@ as input for the model's response. A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -5867,7 +4917,7 @@ as input for the model's response. The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -5889,7 +4939,7 @@ as input for the model's response. The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -5922,7 +4972,7 @@ as input for the model's response. The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -5936,7 +4986,7 @@ as input for the model's response. - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -5958,7 +5008,7 @@ as input for the model's response. The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -5968,7 +5018,7 @@ as input for the model's response. - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -5998,7 +5048,7 @@ as input for the model's response. The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -6012,7 +5062,7 @@ as input for the model's response. - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -6027,198 +5077,43 @@ as input for the model's response. Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -6281,7 +5176,7 @@ as input for the model's response. - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -6295,7 +5190,7 @@ as input for the model's response. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -6327,7 +5222,7 @@ as input for the model's response. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -6341,7 +5236,7 @@ as input for the model's response. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -6377,7 +5272,7 @@ as input for the model's response. - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -6419,7 +5314,7 @@ as input for the model's response. - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -6439,7 +5334,7 @@ as input for the model's response. An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -6453,7 +5348,7 @@ as input for the model's response. - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -6483,7 +5378,7 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -6537,7 +5432,7 @@ as input for the model's response. - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -6575,13 +5470,13 @@ as input for the model's response. - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -6611,7 +5506,7 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -6629,7 +5524,7 @@ as input for the model's response. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -6682,7 +5577,7 @@ as input for the model's response. - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -6690,59 +5585,10 @@ as input for the model's response. Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -6785,7 +5631,7 @@ as input for the model's response. 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 }` + - `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). @@ -6795,7 +5641,7 @@ as input for the model's response. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -6827,7 +5673,7 @@ as input for the model's response. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -6887,7 +5733,7 @@ as input for the model's response. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -6910,7 +5756,7 @@ as input for the model's response. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -6976,7 +5822,7 @@ as input for the model's response. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -7029,7 +5875,7 @@ as input for the model's response. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -7043,7 +5889,7 @@ as input for the model's response. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -7073,7 +5919,7 @@ as input for the model's response. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -7081,7 +5927,7 @@ as input for the model's response. - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -7115,7 +5961,7 @@ as input for the model's response. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -7236,7 +6082,7 @@ as input for the model's response. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -7246,7 +6092,7 @@ as input for the model's response. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -7258,7 +6104,7 @@ as input for the model's response. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -7286,47 +6132,15 @@ as input for the model's response. 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -7342,7 +6156,7 @@ as input for the model's response. Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -7378,7 +6192,7 @@ as input for the model's response. - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -7402,7 +6216,7 @@ as input for the model's response. The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -7414,7 +6228,7 @@ as input for the model's response. - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -7440,7 +6254,7 @@ as input for the model's response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -7450,7 +6264,7 @@ as input for the model's response. - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -7472,7 +6286,7 @@ as input for the model's response. - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -7488,7 +6302,7 @@ as input for the model's response. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -7506,7 +6320,7 @@ as input for the model's response. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -7532,45 +6346,13 @@ as input for the model's response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -7596,7 +6378,7 @@ as input for the model's response. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -7650,7 +6432,7 @@ as input for the model's response. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -7692,7 +6474,7 @@ as input for the model's response. - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -7753,7 +6535,7 @@ as input for the model's response. - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -7771,7 +6553,7 @@ as input for the model's response. The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -7801,7 +6583,7 @@ as input for the model's response. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -7822,7 +6604,7 @@ as input for the model's response. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -7836,7 +6618,7 @@ as input for the model's response. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -7870,7 +6652,7 @@ as input for the model's response. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -7928,7 +6710,7 @@ as input for the model's response. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -7956,7 +6738,7 @@ as input for the model's response. - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -7994,41 +6776,9 @@ as input for the model's response. The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -8040,7 +6790,7 @@ as input for the model's response. - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -8056,7 +6806,7 @@ as input for the model's response. The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -8066,7 +6816,7 @@ as input for the model's response. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -8112,7 +6862,7 @@ as input for the model's response. - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -8124,7 +6874,7 @@ as input for the model's response. The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -8142,7 +6892,7 @@ as input for the model's response. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -8156,7 +6906,7 @@ as input for the model's response. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -8192,7 +6942,7 @@ as input for the model's response. The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -8222,7 +6972,7 @@ as input for the model's response. Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -8264,7 +7014,7 @@ as input for the model's response. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -8290,7 +7040,7 @@ as input for the model's response. - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -8316,7 +7066,7 @@ as input for the model's response. Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -8369,7 +7119,7 @@ as input for the model's response. - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -8390,84 +7140,18 @@ as input for the model's response. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -8478,7 +7162,7 @@ as input for the model's response. The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -8508,7 +7192,7 @@ as input for the model's response. The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -8745,196 +7429,11 @@ as input for the model's response. the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -9002,7 +7501,7 @@ as input for the model's response. The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -9044,7 +7543,7 @@ as input for the model's response. - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -9067,84 +7566,18 @@ as input for the model's response. Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -9166,7 +7599,7 @@ as input for the model's response. The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -9180,7 +7613,7 @@ as input for the model's response. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -9212,7 +7645,7 @@ as input for the model's response. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -9226,7 +7659,7 @@ as input for the model's response. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -9262,7 +7695,7 @@ as input for the model's response. - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -9312,394 +7745,12 @@ as input for the model's response. 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -9713,21 +7764,6 @@ as input for the model's response. 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 @@ -9768,7 +7804,7 @@ as input for the model's response. The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -9791,8 +7827,6 @@ as input for the model's response. The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -9829,7 +7863,7 @@ as input for the model's response. - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -9871,7 +7905,7 @@ as input for the model's response. The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -9903,7 +7937,7 @@ as input for the model's response. The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -9933,7 +7967,7 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -9951,130 +7985,14 @@ as input for the model's response. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -10107,7 +8025,7 @@ as input for the model's response. 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 }` + - `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). @@ -10117,7 +8035,7 @@ as input for the model's response. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -10149,7 +8067,7 @@ as input for the model's response. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -10209,7 +8127,7 @@ as input for the model's response. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -10232,7 +8150,7 @@ as input for the model's response. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -10298,7 +8216,7 @@ as input for the model's response. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -10351,7 +8269,7 @@ as input for the model's response. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -10365,7 +8283,7 @@ as input for the model's response. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -10395,41 +8313,9 @@ as input for the model's response. 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -10437,7 +8323,7 @@ as input for the model's response. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -10558,7 +8444,7 @@ as input for the model's response. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -10568,7 +8454,7 @@ as input for the model's response. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -10580,163 +8466,13 @@ as input for the model's response. - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -10762,39 +8498,7 @@ as input for the model's response. 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -10810,7 +8514,7 @@ as input for the model's response. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -10828,7 +8532,7 @@ as input for the model's response. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -10854,45 +8558,13 @@ as input for the model's response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -10918,7 +8590,7 @@ as input for the model's response. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -10972,7 +8644,7 @@ as input for the model's response. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -10992,7 +8664,7 @@ as input for the model's response. The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -11014,7 +8686,7 @@ as input for the model's response. The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -11044,7 +8716,7 @@ as input for the model's response. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -11065,7 +8737,7 @@ as input for the model's response. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -11079,7 +8751,7 @@ as input for the model's response. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -11113,7 +8785,7 @@ as input for the model's response. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -11171,7 +8843,7 @@ as input for the model's response. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -11199,7 +8871,7 @@ as input for the model's response. - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -11229,7 +8901,7 @@ as input for the model's response. Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -11239,7 +8911,7 @@ as input for the model's response. - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -11271,7 +8943,7 @@ as input for the model's response. The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -11295,7 +8967,7 @@ as input for the model's response. Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -11305,7 +8977,7 @@ as input for the model's response. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -11351,7 +9023,7 @@ as input for the model's response. The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -11367,7 +9039,7 @@ as input for the model's response. One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -11385,7 +9057,7 @@ as input for the model's response. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -11399,7 +9071,7 @@ as input for the model's response. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -11435,7 +9107,7 @@ as input for the model's response. The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -11469,7 +9141,7 @@ as input for the model's response. Optional textual output returned by the apply patch tool. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -11522,7 +9194,7 @@ as input for the model's response. - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -11564,7 +9236,7 @@ as input for the model's response. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -11590,7 +9262,7 @@ as input for the model's response. - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -11616,7 +9288,7 @@ as input for the model's response. Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -11646,7 +9318,7 @@ as input for the model's response. The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -11669,84 +9341,18 @@ as input for the model's response. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -11800,7 +9406,7 @@ as input for the model's response. - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -11837,7 +9443,7 @@ as input for the model's response. - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -11873,7 +9479,7 @@ as input for the model's response. - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -11887,7 +9493,7 @@ as input for the model's response. - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -11905,7 +9511,7 @@ as input for the model's response. The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -11919,7 +9525,7 @@ as input for the model's response. - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -11929,7 +9535,7 @@ as input for the model's response. - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -11959,7 +9565,7 @@ as input for the model's response. [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -11989,7 +9595,7 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -12007,130 +9613,14 @@ as input for the model's response. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -12163,7 +9653,7 @@ as input for the model's response. 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 }` + - `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). @@ -12173,7 +9663,7 @@ as input for the model's response. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -12205,7 +9695,7 @@ as input for the model's response. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -12265,7 +9755,7 @@ as input for the model's response. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -12288,7 +9778,7 @@ as input for the model's response. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -12354,7 +9844,7 @@ as input for the model's response. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -12407,7 +9897,7 @@ as input for the model's response. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -12421,7 +9911,7 @@ as input for the model's response. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -12451,41 +9941,9 @@ as input for the model's response. 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -12493,7 +9951,7 @@ as input for the model's response. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -12614,7 +10072,7 @@ as input for the model's response. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -12624,7 +10082,7 @@ as input for the model's response. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -12636,163 +10094,73 @@ as input for the model's response. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -12818,137 +10186,13 @@ as input for the model's response. 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -12974,7 +10218,7 @@ as input for the model's response. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -13028,7 +10272,7 @@ as input for the model's response. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -13102,84 +10346,18 @@ as input for the model's response. - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -13323,7 +10501,7 @@ as input for the model's response. ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -13333,7 +10511,7 @@ as input for the model's response. - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -13367,7 +10545,7 @@ as input for the model's response. `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -14403,7 +11581,7 @@ Retrieves a model response with the given ID. ### Returns -- `Response = object { id, created_at, error, 30 more }` +- `Response object { id, created_at, error, 30 more }` - `id: string` @@ -14491,7 +11669,7 @@ Retrieves a model response with the given ID. A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -14513,7 +11691,7 @@ Retrieves a model response with the given ID. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -14527,7 +11705,7 @@ Retrieves a model response with the given ID. - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -14557,7 +11735,7 @@ Retrieves a model response with the given ID. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -14620,7 +11798,7 @@ Retrieves a model response with the given ID. - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -14631,84 +11809,6 @@ Retrieves a model response with the given ID. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -14736,7 +11836,7 @@ Retrieves a model response with the given ID. - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -14748,7 +11848,7 @@ Retrieves a model response with the given ID. The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -14756,7 +11856,7 @@ Retrieves a model response with the given ID. The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -14778,7 +11878,7 @@ Retrieves a model response with the given ID. - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -14804,7 +11904,7 @@ Retrieves a model response with the given ID. The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -14834,7 +11934,7 @@ Retrieves a model response with the given ID. - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -14878,7 +11978,7 @@ Retrieves a model response with the given ID. - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -14925,7 +12025,7 @@ Retrieves a model response with the given ID. - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -14993,7 +12093,7 @@ Retrieves a model response with the given ID. The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -15043,7 +12143,7 @@ Retrieves a model response with the given ID. A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -15079,7 +12179,7 @@ Retrieves a model response with the given ID. The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -15101,7 +12201,7 @@ Retrieves a model response with the given ID. The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -15134,7 +12234,7 @@ Retrieves a model response with the given ID. The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -15148,7 +12248,7 @@ Retrieves a model response with the given ID. - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -15170,7 +12270,7 @@ Retrieves a model response with the given ID. The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -15180,7 +12280,7 @@ Retrieves a model response with the given ID. - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -15210,7 +12310,7 @@ Retrieves a model response with the given ID. The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -15224,7 +12324,7 @@ Retrieves a model response with the given ID. - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -15239,198 +12339,43 @@ Retrieves a model response with the given ID. Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -15493,7 +12438,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -15507,7 +12452,7 @@ Retrieves a model response with the given ID. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -15539,7 +12484,7 @@ Retrieves a model response with the given ID. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -15553,7 +12498,7 @@ Retrieves a model response with the given ID. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -15589,7 +12534,7 @@ Retrieves a model response with the given ID. - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -15631,7 +12576,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -15651,7 +12596,7 @@ Retrieves a model response with the given ID. An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -15665,7 +12610,7 @@ Retrieves a model response with the given ID. - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -15695,7 +12640,7 @@ Retrieves a model response with the given ID. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -15749,7 +12694,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -15787,13 +12732,13 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -15823,7 +12768,7 @@ Retrieves a model response with the given ID. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -15841,7 +12786,7 @@ Retrieves a model response with the given ID. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -15894,7 +12839,7 @@ Retrieves a model response with the given ID. - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -15902,59 +12847,10 @@ Retrieves a model response with the given ID. Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -15997,7 +12893,7 @@ Retrieves a model response with the given ID. 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 }` + - `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). @@ -16007,7 +12903,7 @@ Retrieves a model response with the given ID. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -16039,7 +12935,7 @@ Retrieves a model response with the given ID. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -16099,7 +12995,7 @@ Retrieves a model response with the given ID. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -16122,7 +13018,7 @@ Retrieves a model response with the given ID. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -16188,7 +13084,7 @@ Retrieves a model response with the given ID. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -16241,7 +13137,7 @@ Retrieves a model response with the given ID. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -16255,7 +13151,7 @@ Retrieves a model response with the given ID. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -16285,7 +13181,7 @@ Retrieves a model response with the given ID. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -16293,7 +13189,7 @@ Retrieves a model response with the given ID. - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -16327,7 +13223,7 @@ Retrieves a model response with the given ID. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -16448,7 +13344,7 @@ Retrieves a model response with the given ID. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -16458,7 +13354,7 @@ Retrieves a model response with the given ID. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -16470,7 +13366,7 @@ Retrieves a model response with the given ID. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -16498,47 +13394,15 @@ Retrieves a model response with the given ID. 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -16554,7 +13418,7 @@ Retrieves a model response with the given ID. Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -16590,7 +13454,7 @@ Retrieves a model response with the given ID. - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -16614,7 +13478,7 @@ Retrieves a model response with the given ID. The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -16626,7 +13490,7 @@ Retrieves a model response with the given ID. - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -16652,7 +13516,7 @@ Retrieves a model response with the given ID. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -16662,7 +13526,7 @@ Retrieves a model response with the given ID. - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -16684,7 +13548,7 @@ Retrieves a model response with the given ID. - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -16700,7 +13564,7 @@ Retrieves a model response with the given ID. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -16718,7 +13582,7 @@ Retrieves a model response with the given ID. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -16744,45 +13608,13 @@ Retrieves a model response with the given ID. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -16808,7 +13640,7 @@ Retrieves a model response with the given ID. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -16862,7 +13694,7 @@ Retrieves a model response with the given ID. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -16904,7 +13736,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -16965,7 +13797,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -16983,7 +13815,7 @@ Retrieves a model response with the given ID. The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -17013,7 +13845,7 @@ Retrieves a model response with the given ID. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -17034,7 +13866,7 @@ Retrieves a model response with the given ID. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -17048,7 +13880,7 @@ Retrieves a model response with the given ID. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -17082,7 +13914,7 @@ Retrieves a model response with the given ID. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -17140,7 +13972,7 @@ Retrieves a model response with the given ID. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -17168,7 +14000,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -17206,41 +14038,9 @@ Retrieves a model response with the given ID. The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -17252,7 +14052,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -17268,7 +14068,7 @@ Retrieves a model response with the given ID. The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -17278,7 +14078,7 @@ Retrieves a model response with the given ID. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -17324,7 +14124,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -17336,7 +14136,7 @@ Retrieves a model response with the given ID. The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -17354,7 +14154,7 @@ Retrieves a model response with the given ID. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -17368,7 +14168,7 @@ Retrieves a model response with the given ID. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -17404,7 +14204,7 @@ Retrieves a model response with the given ID. The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -17434,7 +14234,7 @@ Retrieves a model response with the given ID. Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -17476,7 +14276,7 @@ Retrieves a model response with the given ID. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -17502,7 +14302,7 @@ Retrieves a model response with the given ID. - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -17528,7 +14328,7 @@ Retrieves a model response with the given ID. Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -17581,7 +14381,7 @@ Retrieves a model response with the given ID. - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -17602,84 +14402,18 @@ Retrieves a model response with the given ID. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -17690,7 +14424,7 @@ Retrieves a model response with the given ID. The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -17720,7 +14454,7 @@ Retrieves a model response with the given ID. The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -17957,196 +14691,11 @@ Retrieves a model response with the given ID. the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -18214,7 +14763,7 @@ Retrieves a model response with the given ID. The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -18256,7 +14805,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -18279,84 +14828,18 @@ Retrieves a model response with the given ID. Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -18378,7 +14861,7 @@ Retrieves a model response with the given ID. The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -18392,7 +14875,7 @@ Retrieves a model response with the given ID. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -18424,7 +14907,7 @@ Retrieves a model response with the given ID. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -18438,7 +14921,7 @@ Retrieves a model response with the given ID. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -18474,7 +14957,7 @@ Retrieves a model response with the given ID. - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -18524,394 +15007,12 @@ Retrieves a model response with the given ID. 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -18925,21 +15026,6 @@ Retrieves a model response with the given ID. 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 @@ -18980,7 +15066,7 @@ Retrieves a model response with the given ID. The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -19003,8 +15089,6 @@ Retrieves a model response with the given ID. The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -19041,7 +15125,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -19083,7 +15167,7 @@ Retrieves a model response with the given ID. The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -19115,7 +15199,7 @@ Retrieves a model response with the given ID. The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -19145,7 +15229,7 @@ Retrieves a model response with the given ID. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -19163,130 +15247,14 @@ Retrieves a model response with the given ID. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -19319,7 +15287,7 @@ Retrieves a model response with the given ID. 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 }` + - `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). @@ -19329,7 +15297,7 @@ Retrieves a model response with the given ID. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -19361,7 +15329,7 @@ Retrieves a model response with the given ID. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -19421,7 +15389,7 @@ Retrieves a model response with the given ID. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -19444,7 +15412,7 @@ Retrieves a model response with the given ID. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -19510,7 +15478,7 @@ Retrieves a model response with the given ID. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -19563,7 +15531,7 @@ Retrieves a model response with the given ID. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -19577,7 +15545,7 @@ Retrieves a model response with the given ID. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -19607,41 +15575,9 @@ Retrieves a model response with the given ID. 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -19649,7 +15585,7 @@ Retrieves a model response with the given ID. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -19770,7 +15706,7 @@ Retrieves a model response with the given ID. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -19780,7 +15716,7 @@ Retrieves a model response with the given ID. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -19792,163 +15728,13 @@ Retrieves a model response with the given ID. - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -19974,39 +15760,7 @@ Retrieves a model response with the given ID. 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -20022,7 +15776,7 @@ Retrieves a model response with the given ID. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -20040,7 +15794,7 @@ Retrieves a model response with the given ID. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -20066,45 +15820,13 @@ Retrieves a model response with the given ID. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -20130,7 +15852,7 @@ Retrieves a model response with the given ID. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -20184,7 +15906,7 @@ Retrieves a model response with the given ID. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -20204,7 +15926,7 @@ Retrieves a model response with the given ID. The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -20226,7 +15948,7 @@ Retrieves a model response with the given ID. The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -20256,7 +15978,7 @@ Retrieves a model response with the given ID. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -20277,7 +15999,7 @@ Retrieves a model response with the given ID. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -20291,7 +16013,7 @@ Retrieves a model response with the given ID. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -20325,7 +16047,7 @@ Retrieves a model response with the given ID. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -20383,7 +16105,7 @@ Retrieves a model response with the given ID. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -20411,7 +16133,7 @@ Retrieves a model response with the given ID. - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -20441,7 +16163,7 @@ Retrieves a model response with the given ID. Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -20451,7 +16173,7 @@ Retrieves a model response with the given ID. - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -20483,7 +16205,7 @@ Retrieves a model response with the given ID. The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -20507,7 +16229,7 @@ Retrieves a model response with the given ID. Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -20517,7 +16239,7 @@ Retrieves a model response with the given ID. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -20563,7 +16285,7 @@ Retrieves a model response with the given ID. The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -20579,7 +16301,7 @@ Retrieves a model response with the given ID. One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -20597,7 +16319,7 @@ Retrieves a model response with the given ID. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -20611,7 +16333,7 @@ Retrieves a model response with the given ID. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -20647,7 +16369,7 @@ Retrieves a model response with the given ID. The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -20681,7 +16403,7 @@ Retrieves a model response with the given ID. Optional textual output returned by the apply patch tool. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -20734,7 +16456,7 @@ Retrieves a model response with the given ID. - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -20776,7 +16498,7 @@ Retrieves a model response with the given ID. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -20802,7 +16524,7 @@ Retrieves a model response with the given ID. - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -20828,7 +16550,7 @@ Retrieves a model response with the given ID. Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -20858,7 +16580,7 @@ Retrieves a model response with the given ID. The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -20881,84 +16603,18 @@ Retrieves a model response with the given ID. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -21012,7 +16668,7 @@ Retrieves a model response with the given ID. - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -21049,7 +16705,7 @@ Retrieves a model response with the given ID. - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -21085,7 +16741,7 @@ Retrieves a model response with the given ID. - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -21099,7 +16755,7 @@ Retrieves a model response with the given ID. - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -21117,7 +16773,7 @@ Retrieves a model response with the given ID. The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -21131,7 +16787,7 @@ Retrieves a model response with the given ID. - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -21141,7 +16797,7 @@ Retrieves a model response with the given ID. - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -21171,7 +16827,7 @@ Retrieves a model response with the given ID. [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -21201,7 +16857,7 @@ Retrieves a model response with the given ID. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -21219,130 +16875,14 @@ Retrieves a model response with the given ID. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -21375,7 +16915,7 @@ Retrieves a model response with the given ID. 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 }` + - `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). @@ -21385,7 +16925,7 @@ Retrieves a model response with the given ID. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -21417,7 +16957,7 @@ Retrieves a model response with the given ID. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -21477,7 +17017,7 @@ Retrieves a model response with the given ID. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -21500,7 +17040,7 @@ Retrieves a model response with the given ID. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -21566,7 +17106,7 @@ Retrieves a model response with the given ID. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -21619,7 +17159,7 @@ Retrieves a model response with the given ID. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -21633,7 +17173,7 @@ Retrieves a model response with the given ID. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -21663,41 +17203,9 @@ Retrieves a model response with the given ID. 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -21705,7 +17213,7 @@ Retrieves a model response with the given ID. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -21826,7 +17334,7 @@ Retrieves a model response with the given ID. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -21836,7 +17344,7 @@ Retrieves a model response with the given ID. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -21848,163 +17356,73 @@ Retrieves a model response with the given ID. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -22030,137 +17448,13 @@ Retrieves a model response with the given ID. 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -22186,7 +17480,7 @@ Retrieves a model response with the given ID. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -22240,7 +17534,7 @@ Retrieves a model response with the given ID. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -22314,84 +17608,18 @@ Retrieves a model response with the given ID. - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -22535,7 +17763,7 @@ Retrieves a model response with the given ID. ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -22545,7 +17773,7 @@ Retrieves a model response with the given ID. - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -22579,7 +17807,7 @@ Retrieves a model response with the given ID. `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -22915,7 +18143,7 @@ the `background` parameter set to `true` can be cancelled. ### Returns -- `Response = object { id, created_at, error, 30 more }` +- `Response object { id, created_at, error, 30 more }` - `id: string` @@ -23003,7 +18231,7 @@ the `background` parameter set to `true` can be cancelled. A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -23025,7 +18253,7 @@ the `background` parameter set to `true` can be cancelled. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -23039,7 +18267,7 @@ the `background` parameter set to `true` can be cancelled. - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -23069,7 +18297,7 @@ the `background` parameter set to `true` can be cancelled. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -23132,7 +18360,7 @@ the `background` parameter set to `true` can be cancelled. - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -23143,84 +18371,6 @@ the `background` parameter set to `true` can be cancelled. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -23248,7 +18398,7 @@ the `background` parameter set to `true` can be cancelled. - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -23260,7 +18410,7 @@ the `background` parameter set to `true` can be cancelled. The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -23268,7 +18418,7 @@ the `background` parameter set to `true` can be cancelled. The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -23290,7 +18440,7 @@ the `background` parameter set to `true` can be cancelled. - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -23316,7 +18466,7 @@ the `background` parameter set to `true` can be cancelled. The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -23346,7 +18496,7 @@ the `background` parameter set to `true` can be cancelled. - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -23390,7 +18540,7 @@ the `background` parameter set to `true` can be cancelled. - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -23437,7 +18587,7 @@ the `background` parameter set to `true` can be cancelled. - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -23505,7 +18655,7 @@ the `background` parameter set to `true` can be cancelled. The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -23555,7 +18705,7 @@ the `background` parameter set to `true` can be cancelled. A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -23591,7 +18741,7 @@ the `background` parameter set to `true` can be cancelled. The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -23613,7 +18763,7 @@ the `background` parameter set to `true` can be cancelled. The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -23646,7 +18796,7 @@ the `background` parameter set to `true` can be cancelled. The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -23660,7 +18810,7 @@ the `background` parameter set to `true` can be cancelled. - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -23682,7 +18832,7 @@ the `background` parameter set to `true` can be cancelled. The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -23692,7 +18842,7 @@ the `background` parameter set to `true` can be cancelled. - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -23722,7 +18872,7 @@ the `background` parameter set to `true` can be cancelled. The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -23736,7 +18886,7 @@ the `background` parameter set to `true` can be cancelled. - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -23751,198 +18901,43 @@ the `background` parameter set to `true` can be cancelled. Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -24005,7 +19000,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -24019,7 +19014,7 @@ the `background` parameter set to `true` can be cancelled. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -24051,7 +19046,7 @@ the `background` parameter set to `true` can be cancelled. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -24065,7 +19060,7 @@ the `background` parameter set to `true` can be cancelled. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -24101,7 +19096,7 @@ the `background` parameter set to `true` can be cancelled. - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -24143,7 +19138,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -24163,7 +19158,7 @@ the `background` parameter set to `true` can be cancelled. An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -24177,7 +19172,7 @@ the `background` parameter set to `true` can be cancelled. - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -24207,7 +19202,7 @@ the `background` parameter set to `true` can be cancelled. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -24261,7 +19256,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -24299,13 +19294,13 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -24335,7 +19330,7 @@ the `background` parameter set to `true` can be cancelled. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -24353,7 +19348,7 @@ the `background` parameter set to `true` can be cancelled. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -24406,7 +19401,7 @@ the `background` parameter set to `true` can be cancelled. - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -24414,59 +19409,10 @@ the `background` parameter set to `true` can be cancelled. Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -24509,7 +19455,7 @@ the `background` parameter set to `true` can be cancelled. 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 }` + - `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). @@ -24519,7 +19465,7 @@ the `background` parameter set to `true` can be cancelled. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -24551,7 +19497,7 @@ the `background` parameter set to `true` can be cancelled. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -24611,7 +19557,7 @@ the `background` parameter set to `true` can be cancelled. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -24634,7 +19580,7 @@ the `background` parameter set to `true` can be cancelled. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -24700,7 +19646,7 @@ the `background` parameter set to `true` can be cancelled. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -24753,7 +19699,7 @@ the `background` parameter set to `true` can be cancelled. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -24767,7 +19713,7 @@ the `background` parameter set to `true` can be cancelled. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -24797,7 +19743,7 @@ the `background` parameter set to `true` can be cancelled. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -24805,7 +19751,7 @@ the `background` parameter set to `true` can be cancelled. - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -24839,7 +19785,7 @@ the `background` parameter set to `true` can be cancelled. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -24960,7 +19906,7 @@ the `background` parameter set to `true` can be cancelled. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -24970,7 +19916,7 @@ the `background` parameter set to `true` can be cancelled. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -24982,7 +19928,7 @@ the `background` parameter set to `true` can be cancelled. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -25010,47 +19956,15 @@ the `background` parameter set to `true` can be cancelled. 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -25066,7 +19980,7 @@ the `background` parameter set to `true` can be cancelled. Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -25102,7 +20016,7 @@ the `background` parameter set to `true` can be cancelled. - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -25126,7 +20040,7 @@ the `background` parameter set to `true` can be cancelled. The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -25138,7 +20052,7 @@ the `background` parameter set to `true` can be cancelled. - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -25164,7 +20078,7 @@ the `background` parameter set to `true` can be cancelled. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -25174,7 +20088,7 @@ the `background` parameter set to `true` can be cancelled. - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -25196,7 +20110,7 @@ the `background` parameter set to `true` can be cancelled. - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -25212,7 +20126,7 @@ the `background` parameter set to `true` can be cancelled. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -25230,7 +20144,7 @@ the `background` parameter set to `true` can be cancelled. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -25256,45 +20170,13 @@ the `background` parameter set to `true` can be cancelled. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -25320,7 +20202,7 @@ the `background` parameter set to `true` can be cancelled. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -25374,7 +20256,7 @@ the `background` parameter set to `true` can be cancelled. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -25416,7 +20298,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -25477,7 +20359,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -25495,7 +20377,7 @@ the `background` parameter set to `true` can be cancelled. The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -25525,7 +20407,7 @@ the `background` parameter set to `true` can be cancelled. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -25546,7 +20428,7 @@ the `background` parameter set to `true` can be cancelled. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -25560,7 +20442,7 @@ the `background` parameter set to `true` can be cancelled. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -25594,7 +20476,7 @@ the `background` parameter set to `true` can be cancelled. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -25652,7 +20534,7 @@ the `background` parameter set to `true` can be cancelled. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -25680,7 +20562,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -25718,41 +20600,9 @@ the `background` parameter set to `true` can be cancelled. The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -25764,7 +20614,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -25780,7 +20630,7 @@ the `background` parameter set to `true` can be cancelled. The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -25790,7 +20640,7 @@ the `background` parameter set to `true` can be cancelled. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -25836,7 +20686,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -25848,7 +20698,7 @@ the `background` parameter set to `true` can be cancelled. The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -25866,7 +20716,7 @@ the `background` parameter set to `true` can be cancelled. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -25880,7 +20730,7 @@ the `background` parameter set to `true` can be cancelled. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -25916,7 +20766,7 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -25946,7 +20796,7 @@ the `background` parameter set to `true` can be cancelled. Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -25988,7 +20838,7 @@ the `background` parameter set to `true` can be cancelled. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -26014,7 +20864,7 @@ the `background` parameter set to `true` can be cancelled. - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -26040,7 +20890,7 @@ the `background` parameter set to `true` can be cancelled. Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -26093,7 +20943,7 @@ the `background` parameter set to `true` can be cancelled. - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -26114,84 +20964,18 @@ the `background` parameter set to `true` can be cancelled. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -26202,7 +20986,7 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -26232,7 +21016,7 @@ the `background` parameter set to `true` can be cancelled. The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -26469,196 +21253,11 @@ the `background` parameter set to `true` can be cancelled. the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -26726,7 +21325,7 @@ the `background` parameter set to `true` can be cancelled. The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -26768,7 +21367,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -26791,84 +21390,18 @@ the `background` parameter set to `true` can be cancelled. Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -26890,7 +21423,7 @@ the `background` parameter set to `true` can be cancelled. The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -26904,7 +21437,7 @@ the `background` parameter set to `true` can be cancelled. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -26936,7 +21469,7 @@ the `background` parameter set to `true` can be cancelled. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -26950,7 +21483,7 @@ the `background` parameter set to `true` can be cancelled. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -26986,7 +21519,7 @@ the `background` parameter set to `true` can be cancelled. - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -27036,394 +21569,12 @@ the `background` parameter set to `true` can be cancelled. 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -27437,21 +21588,6 @@ the `background` parameter set to `true` can be cancelled. 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 @@ -27492,7 +21628,7 @@ the `background` parameter set to `true` can be cancelled. The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -27515,8 +21651,6 @@ the `background` parameter set to `true` can be cancelled. The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -27553,7 +21687,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -27595,7 +21729,7 @@ the `background` parameter set to `true` can be cancelled. The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -27627,7 +21761,7 @@ the `background` parameter set to `true` can be cancelled. The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -27657,7 +21791,7 @@ the `background` parameter set to `true` can be cancelled. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -27675,130 +21809,14 @@ the `background` parameter set to `true` can be cancelled. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -27831,7 +21849,7 @@ the `background` parameter set to `true` can be cancelled. 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 }` + - `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). @@ -27841,7 +21859,7 @@ the `background` parameter set to `true` can be cancelled. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -27873,7 +21891,7 @@ the `background` parameter set to `true` can be cancelled. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -27933,7 +21951,7 @@ the `background` parameter set to `true` can be cancelled. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -27956,7 +21974,7 @@ the `background` parameter set to `true` can be cancelled. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -28022,7 +22040,7 @@ the `background` parameter set to `true` can be cancelled. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -28075,7 +22093,7 @@ the `background` parameter set to `true` can be cancelled. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -28089,7 +22107,7 @@ the `background` parameter set to `true` can be cancelled. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -28119,41 +22137,9 @@ the `background` parameter set to `true` can be cancelled. 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -28161,7 +22147,7 @@ the `background` parameter set to `true` can be cancelled. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -28282,7 +22268,7 @@ the `background` parameter set to `true` can be cancelled. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -28292,7 +22278,7 @@ the `background` parameter set to `true` can be cancelled. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -28304,163 +22290,13 @@ the `background` parameter set to `true` can be cancelled. - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -28486,39 +22322,7 @@ the `background` parameter set to `true` can be cancelled. 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -28534,7 +22338,7 @@ the `background` parameter set to `true` can be cancelled. The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -28552,7 +22356,7 @@ the `background` parameter set to `true` can be cancelled. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -28578,45 +22382,13 @@ the `background` parameter set to `true` can be cancelled. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -28642,7 +22414,7 @@ the `background` parameter set to `true` can be cancelled. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -28696,7 +22468,7 @@ the `background` parameter set to `true` can be cancelled. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -28716,7 +22488,7 @@ the `background` parameter set to `true` can be cancelled. The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -28738,7 +22510,7 @@ the `background` parameter set to `true` can be cancelled. The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -28768,7 +22540,7 @@ the `background` parameter set to `true` can be cancelled. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -28789,7 +22561,7 @@ the `background` parameter set to `true` can be cancelled. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -28803,7 +22575,7 @@ the `background` parameter set to `true` can be cancelled. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -28837,7 +22609,7 @@ the `background` parameter set to `true` can be cancelled. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -28895,7 +22667,7 @@ the `background` parameter set to `true` can be cancelled. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -28923,7 +22695,7 @@ the `background` parameter set to `true` can be cancelled. - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -28953,7 +22725,7 @@ the `background` parameter set to `true` can be cancelled. Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -28963,7 +22735,7 @@ the `background` parameter set to `true` can be cancelled. - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -28995,7 +22767,7 @@ the `background` parameter set to `true` can be cancelled. The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -29019,7 +22791,7 @@ the `background` parameter set to `true` can be cancelled. Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -29029,7 +22801,7 @@ the `background` parameter set to `true` can be cancelled. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -29075,7 +22847,7 @@ the `background` parameter set to `true` can be cancelled. The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -29091,7 +22863,7 @@ the `background` parameter set to `true` can be cancelled. One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -29109,7 +22881,7 @@ the `background` parameter set to `true` can be cancelled. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -29123,7 +22895,7 @@ the `background` parameter set to `true` can be cancelled. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -29159,7 +22931,7 @@ the `background` parameter set to `true` can be cancelled. The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -29193,7 +22965,7 @@ the `background` parameter set to `true` can be cancelled. Optional textual output returned by the apply patch tool. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -29246,7 +23018,7 @@ the `background` parameter set to `true` can be cancelled. - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -29288,7 +23060,7 @@ the `background` parameter set to `true` can be cancelled. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -29314,7 +23086,7 @@ the `background` parameter set to `true` can be cancelled. - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -29340,7 +23112,7 @@ the `background` parameter set to `true` can be cancelled. Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -29370,7 +23142,7 @@ the `background` parameter set to `true` can be cancelled. The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -29393,84 +23165,18 @@ the `background` parameter set to `true` can be cancelled. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -29524,7 +23230,7 @@ the `background` parameter set to `true` can be cancelled. - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -29561,7 +23267,7 @@ the `background` parameter set to `true` can be cancelled. - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -29597,7 +23303,7 @@ the `background` parameter set to `true` can be cancelled. - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -29611,7 +23317,7 @@ the `background` parameter set to `true` can be cancelled. - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -29629,7 +23335,7 @@ the `background` parameter set to `true` can be cancelled. The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -29643,7 +23349,7 @@ the `background` parameter set to `true` can be cancelled. - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -29653,7 +23359,7 @@ the `background` parameter set to `true` can be cancelled. - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -29683,7 +23389,7 @@ the `background` parameter set to `true` can be cancelled. [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -29713,7 +23419,7 @@ the `background` parameter set to `true` can be cancelled. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -29731,130 +23437,14 @@ the `background` parameter set to `true` can be cancelled. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -29887,7 +23477,7 @@ the `background` parameter set to `true` can be cancelled. 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 }` + - `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). @@ -29897,7 +23487,7 @@ the `background` parameter set to `true` can be cancelled. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -29929,7 +23519,7 @@ the `background` parameter set to `true` can be cancelled. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -29989,7 +23579,7 @@ the `background` parameter set to `true` can be cancelled. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -30012,7 +23602,7 @@ the `background` parameter set to `true` can be cancelled. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -30078,7 +23668,7 @@ the `background` parameter set to `true` can be cancelled. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -30131,7 +23721,7 @@ the `background` parameter set to `true` can be cancelled. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -30145,7 +23735,7 @@ the `background` parameter set to `true` can be cancelled. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -30175,41 +23765,9 @@ the `background` parameter set to `true` can be cancelled. 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -30217,7 +23775,7 @@ the `background` parameter set to `true` can be cancelled. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -30338,7 +23896,7 @@ the `background` parameter set to `true` can be cancelled. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -30348,7 +23906,7 @@ the `background` parameter set to `true` can be cancelled. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -30360,163 +23918,73 @@ the `background` parameter set to `true` can be cancelled. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -30542,137 +24010,13 @@ the `background` parameter set to `true` can be cancelled. 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -30698,7 +24042,7 @@ the `background` parameter set to `true` can be cancelled. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -30752,7 +24096,7 @@ the `background` parameter set to `true` can be cancelled. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -30826,84 +24170,18 @@ the `background` parameter set to `true` can be cancelled. - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -31047,7 +24325,7 @@ the `background` parameter set to `true` can be cancelled. ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -31057,7 +24335,7 @@ the `background` parameter set to `true` can be cancelled. - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -31091,7 +24369,7 @@ the `background` parameter set to `true` can be cancelled. `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -31585,7 +24863,7 @@ Learn when and how to compact long-running conversations in the [conversation st A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -31607,7 +24885,7 @@ Learn when and how to compact long-running conversations in the [conversation st A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -31621,7 +24899,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -31651,7 +24929,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -31714,7 +24992,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -31725,84 +25003,6 @@ Learn when and how to compact long-running conversations in the [conversation st A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -31830,7 +25030,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -31842,7 +25042,7 @@ Learn when and how to compact long-running conversations in the [conversation st The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -31850,7 +25050,7 @@ Learn when and how to compact long-running conversations in the [conversation st The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -31872,7 +25072,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -31898,7 +25098,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -31928,7 +25128,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -31972,7 +25172,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -32019,7 +25219,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -32087,7 +25287,7 @@ Learn when and how to compact long-running conversations in the [conversation st The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -32137,7 +25337,7 @@ Learn when and how to compact long-running conversations in the [conversation st A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -32173,7 +25373,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -32195,7 +25395,7 @@ Learn when and how to compact long-running conversations in the [conversation st The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -32228,7 +25428,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -32242,7 +25442,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -32264,7 +25464,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -32274,7 +25474,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -32304,7 +25504,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -32318,7 +25518,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -32333,198 +25533,43 @@ Learn when and how to compact long-running conversations in the [conversation st Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -32587,7 +25632,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -32601,7 +25646,7 @@ Learn when and how to compact long-running conversations in the [conversation st 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -32633,7 +25678,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -32647,7 +25692,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -32683,7 +25728,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -32725,7 +25770,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -32745,7 +25790,7 @@ Learn when and how to compact long-running conversations in the [conversation st An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -32759,7 +25804,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -32789,7 +25834,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -32843,7 +25888,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -32881,13 +25926,13 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -32917,7 +25962,7 @@ Learn when and how to compact long-running conversations in the [conversation st A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -32935,7 +25980,7 @@ Learn when and how to compact long-running conversations in the [conversation st A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -32988,7 +26033,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -32996,59 +26041,10 @@ Learn when and how to compact long-running conversations in the [conversation st Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -33091,7 +26087,7 @@ Learn when and how to compact long-running conversations in the [conversation st 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 }` + - `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). @@ -33101,7 +26097,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -33133,7 +26129,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -33193,7 +26189,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -33216,7 +26212,7 @@ Learn when and how to compact long-running conversations in the [conversation st A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -33282,7 +26278,7 @@ Learn when and how to compact long-running conversations in the [conversation st Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -33335,7 +26331,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -33349,7 +26345,7 @@ Learn when and how to compact long-running conversations in the [conversation st The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -33379,7 +26375,7 @@ Learn when and how to compact long-running conversations in the [conversation st Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -33387,7 +26383,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -33421,7 +26417,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -33542,7 +26538,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -33552,7 +26548,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -33564,7 +26560,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -33592,47 +26588,15 @@ Learn when and how to compact long-running conversations in the [conversation st 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -33648,7 +26612,7 @@ Learn when and how to compact long-running conversations in the [conversation st Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -33684,7 +26648,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -33708,7 +26672,7 @@ Learn when and how to compact long-running conversations in the [conversation st The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -33720,7 +26684,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -33746,7 +26710,7 @@ Learn when and how to compact long-running conversations in the [conversation st The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -33756,7 +26720,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -33778,7 +26742,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -33794,7 +26758,7 @@ Learn when and how to compact long-running conversations in the [conversation st The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -33812,7 +26776,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -33838,45 +26802,13 @@ Learn when and how to compact long-running conversations in the [conversation st The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -33902,7 +26834,7 @@ Learn when and how to compact long-running conversations in the [conversation st Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -33956,7 +26888,7 @@ Learn when and how to compact long-running conversations in the [conversation st The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -33998,7 +26930,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -34059,7 +26991,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -34077,7 +27009,7 @@ Learn when and how to compact long-running conversations in the [conversation st The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -34107,7 +27039,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -34128,7 +27060,7 @@ Learn when and how to compact long-running conversations in the [conversation st The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -34142,7 +27074,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -34176,7 +27108,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -34234,7 +27166,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -34262,7 +27194,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -34300,41 +27232,9 @@ Learn when and how to compact long-running conversations in the [conversation st The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -34346,7 +27246,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -34362,7 +27262,7 @@ Learn when and how to compact long-running conversations in the [conversation st The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -34372,7 +27272,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -34418,7 +27318,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -34430,7 +27330,7 @@ Learn when and how to compact long-running conversations in the [conversation st The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -34448,7 +27348,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -34462,7 +27362,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -34498,7 +27398,7 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -34528,7 +27428,7 @@ Learn when and how to compact long-running conversations in the [conversation st Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -34570,7 +27470,7 @@ Learn when and how to compact long-running conversations in the [conversation st Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -34596,7 +27496,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -34622,7 +27522,7 @@ Learn when and how to compact long-running conversations in the [conversation st Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -34675,7 +27575,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -34696,84 +27596,18 @@ Learn when and how to compact long-running conversations in the [conversation st Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -34784,7 +27618,7 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -34814,7 +27648,7 @@ Learn when and how to compact long-running conversations in the [conversation st The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -34841,9 +27675,17 @@ Learn when and how to compact long-running conversations in the [conversation st A key to use when reading from or writing to the prompt cache. +- `prompt_cache_retention: optional "in_memory" or "24h"` + + How long to retain a prompt cache entry created by this request. + + - `"in_memory"` + + - `"24h"` + ### Returns -- `CompactedResponse = object { id, created_at, object, 2 more }` +- `CompactedResponse object { id, created_at, object, 2 more }` - `id: string` @@ -34863,7 +27705,7 @@ Learn when and how to compact long-running conversations in the [conversation st The compacted list of output items. - - `Message = object { id, content, role, 3 more }` + - `Message object { id, content, role, 3 more }` A message to or from the model. @@ -34875,7 +27717,7 @@ Learn when and how to compact long-running conversations in the [conversation st The content of the message - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -34889,7 +27731,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"input_text"` - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -34897,7 +27739,7 @@ Learn when and how to compact long-running conversations in the [conversation st The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -34919,7 +27761,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -34945,7 +27787,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -34975,7 +27817,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -35019,7 +27861,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"output_text"` - - `TextContent = object { text, type }` + - `TextContent object { text, type }` A text content. @@ -35029,7 +27871,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"text"` - - `SummaryTextContent = object { text, type }` + - `SummaryTextContent object { text, type }` A summary text from the model. @@ -35043,7 +27885,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"summary_text"` - - `ReasoningText = object { text, type }` + - `ReasoningText object { text, type }` Reasoning text from the model. @@ -35057,7 +27899,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"reasoning_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -35071,7 +27913,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"refusal"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -35101,7 +27943,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ComputerScreenshotContent = object { detail, file_id, image_url, type }` + - `ComputerScreenshotContent object { detail, file_id, image_url, type }` A screenshot of a computer. @@ -35131,7 +27973,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"computer_screenshot"` - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -35209,7 +28051,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"final_answer"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -35251,7 +28093,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -35293,7 +28135,7 @@ Learn when and how to compact long-running conversations in the [conversation st The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -35325,7 +28167,7 @@ Learn when and how to compact long-running conversations in the [conversation st The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -35355,7 +28197,7 @@ Learn when and how to compact long-running conversations in the [conversation st A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -35373,7 +28215,7 @@ Learn when and how to compact long-running conversations in the [conversation st A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -35426,7 +28268,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -35434,59 +28276,10 @@ Learn when and how to compact long-running conversations in the [conversation st Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -35529,7 +28322,7 @@ Learn when and how to compact long-running conversations in the [conversation st 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 }` + - `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). @@ -35539,7 +28332,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -35571,7 +28364,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -35631,7 +28424,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -35654,7 +28447,7 @@ Learn when and how to compact long-running conversations in the [conversation st A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -35720,7 +28513,7 @@ Learn when and how to compact long-running conversations in the [conversation st Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -35773,7 +28566,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -35787,7 +28580,7 @@ Learn when and how to compact long-running conversations in the [conversation st The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -35817,7 +28610,7 @@ Learn when and how to compact long-running conversations in the [conversation st Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -35825,7 +28618,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -35859,7 +28652,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -35980,7 +28773,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -35990,7 +28783,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -36002,7 +28795,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -36030,47 +28823,15 @@ Learn when and how to compact long-running conversations in the [conversation st 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `name: string` - - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -36086,7 +28847,7 @@ Learn when and how to compact long-running conversations in the [conversation st Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -36122,7 +28883,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -36146,7 +28907,7 @@ Learn when and how to compact long-running conversations in the [conversation st The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -36158,7 +28919,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -36184,7 +28945,7 @@ Learn when and how to compact long-running conversations in the [conversation st The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -36194,7 +28955,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -36216,7 +28977,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -36232,7 +28993,7 @@ Learn when and how to compact long-running conversations in the [conversation st The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -36250,7 +29011,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -36276,45 +29037,13 @@ Learn when and how to compact long-running conversations in the [conversation st The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -36340,7 +29069,7 @@ Learn when and how to compact long-running conversations in the [conversation st Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -36394,7 +29123,7 @@ Learn when and how to compact long-running conversations in the [conversation st The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -36414,7 +29143,7 @@ Learn when and how to compact long-running conversations in the [conversation st The identifier of the actor that created the item. - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -36435,84 +29164,18 @@ Learn when and how to compact long-running conversations in the [conversation st Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "function_call_output"` The type of the function tool call output. Always `function_call_output`. @@ -36535,7 +29198,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -36603,7 +29266,7 @@ Learn when and how to compact long-running conversations in the [conversation st The text that was retrieved from the file. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -36617,7 +29280,7 @@ Learn when and how to compact long-running conversations in the [conversation st 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -36649,7 +29312,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -36663,7 +29326,7 @@ Learn when and how to compact long-running conversations in the [conversation st The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -36699,7 +29362,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"web_search_call"` - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -36729,7 +29392,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"image_generation_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -36779,7 +29442,7 @@ Learn when and how to compact long-running conversations in the [conversation st A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -36815,7 +29478,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -36837,7 +29500,7 @@ Learn when and how to compact long-running conversations in the [conversation st The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -36870,7 +29533,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -36884,7 +29547,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -36906,7 +29569,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -36916,7 +29579,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -36946,7 +29609,7 @@ Learn when and how to compact long-running conversations in the [conversation st The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -36960,7 +29623,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -36975,198 +29638,43 @@ Learn when and how to compact long-running conversations in the [conversation st Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -37235,7 +29743,7 @@ Learn when and how to compact long-running conversations in the [conversation st The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -37258,8 +29766,6 @@ Learn when and how to compact long-running conversations in the [conversation st The type of the object. Always `summary_text`. - - `"summary_text"` - - `type: "reasoning"` The type of the object. Always `reasoning`. @@ -37296,7 +29802,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -37318,7 +29824,7 @@ Learn when and how to compact long-running conversations in the [conversation st The identifier of the actor that created the item. - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -37339,7 +29845,7 @@ Learn when and how to compact long-running conversations in the [conversation st The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -37353,7 +29859,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -37387,7 +29893,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -37445,7 +29951,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -37473,7 +29979,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -37503,7 +30009,7 @@ Learn when and how to compact long-running conversations in the [conversation st Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -37513,7 +30019,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -37545,7 +30051,7 @@ Learn when and how to compact long-running conversations in the [conversation st The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -37569,7 +30075,7 @@ Learn when and how to compact long-running conversations in the [conversation st Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -37579,7 +30085,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -37625,7 +30131,7 @@ Learn when and how to compact long-running conversations in the [conversation st The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -37641,7 +30147,7 @@ Learn when and how to compact long-running conversations in the [conversation st One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -37659,7 +30165,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -37673,7 +30179,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -37709,7 +30215,7 @@ Learn when and how to compact long-running conversations in the [conversation st The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -37743,7 +30249,7 @@ Learn when and how to compact long-running conversations in the [conversation st Optional textual output returned by the apply patch tool. - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -37785,7 +30291,7 @@ Learn when and how to compact long-running conversations in the [conversation st Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -37811,7 +30317,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -37837,7 +30343,7 @@ Learn when and how to compact long-running conversations in the [conversation st Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -37890,7 +30396,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `"failed"` - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -37920,7 +30426,7 @@ Learn when and how to compact long-running conversations in the [conversation st The namespace of the custom tool being called. - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -37941,84 +30447,18 @@ Learn when and how to compact long-running conversations in the [conversation st Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -38185,7 +30625,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Compacted Response -- `CompactedResponse = object { id, created_at, object, 2 more }` +- `CompactedResponse object { id, created_at, object, 2 more }` - `id: string` @@ -38205,7 +30645,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The compacted list of output items. - - `Message = object { id, content, role, 3 more }` + - `Message object { id, content, role, 3 more }` A message to or from the model. @@ -38217,7 +30657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the message - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -38231,7 +30671,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -38239,7 +30679,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -38261,7 +30701,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -38287,7 +30727,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -38317,7 +30757,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -38361,7 +30801,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `TextContent = object { text, type }` + - `TextContent object { text, type }` A text content. @@ -38371,7 +30811,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `SummaryTextContent = object { text, type }` + - `SummaryTextContent object { text, type }` A summary text from the model. @@ -38385,7 +30825,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"summary_text"` - - `ReasoningText = object { text, type }` + - `ReasoningText object { text, type }` Reasoning text from the model. @@ -38399,7 +30839,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"reasoning_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -38413,7 +30853,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"refusal"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -38443,7 +30883,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ComputerScreenshotContent = object { detail, file_id, image_url, type }` + - `ComputerScreenshotContent object { detail, file_id, image_url, type }` A screenshot of a computer. @@ -38473,7 +30913,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_screenshot"` - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -38551,7 +30991,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -38593,7 +31033,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -38635,7 +31075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -38667,7 +31107,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -38697,7 +31137,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -38715,7 +31155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -38768,7 +31208,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -38776,59 +31216,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -38871,7 +31262,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -38881,7 +31272,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -38913,7 +31304,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -38973,7 +31364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -38996,7 +31387,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -39062,7 +31453,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -39115,7 +31506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -39129,7 +31520,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -39159,7 +31550,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -39167,7 +31558,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -39201,7 +31592,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -39322,7 +31713,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -39332,7 +31723,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -39344,7 +31735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -39372,47 +31763,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -39428,7 +31787,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -39464,7 +31823,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -39488,7 +31847,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -39500,7 +31859,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -39526,7 +31885,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -39536,7 +31895,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -39558,7 +31917,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -39574,7 +31933,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -39592,7 +31951,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -39618,45 +31977,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -39682,7 +32009,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -39736,7 +32063,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -39756,7 +32083,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -39777,84 +32104,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "function_call_output"` The type of the function tool call output. Always `function_call_output`. @@ -39877,7 +32138,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -39945,7 +32206,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -39959,7 +32220,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -39991,7 +32252,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -40005,7 +32266,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -40041,7 +32302,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -40071,7 +32332,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -40121,7 +32382,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -40157,7 +32418,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -40179,7 +32440,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -40212,7 +32473,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -40226,7 +32487,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -40248,7 +32509,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -40258,7 +32519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -40288,7 +32549,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -40302,7 +32563,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -40317,198 +32578,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -40577,7 +32683,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -40600,8 +32706,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`. @@ -40638,7 +32742,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -40660,7 +32764,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -40681,7 +32785,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -40695,7 +32799,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -40729,7 +32833,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -40787,7 +32891,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -40815,7 +32919,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -40845,7 +32949,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -40855,7 +32959,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -40887,7 +32991,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -40911,7 +33015,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -40921,7 +33025,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -40967,7 +33071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -40983,7 +33087,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -41001,7 +33105,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -41015,7 +33119,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -41051,7 +33155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -41085,7 +33189,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional textual output returned by the apply patch tool. - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -41127,7 +33231,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -41153,7 +33257,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -41179,7 +33283,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -41232,7 +33336,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -41262,7 +33366,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -41283,84 +33387,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -41410,7 +33448,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -41446,7 +33484,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -41468,7 +33506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -41501,7 +33539,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -41515,7 +33553,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -41537,7 +33575,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -41547,7 +33585,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -41577,7 +33615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -41591,7 +33629,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -41608,7 +33646,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -41644,7 +33682,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -41666,7 +33704,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -41699,7 +33737,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -41713,7 +33751,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -41735,7 +33773,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -41745,7 +33783,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -41775,7 +33813,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -41789,7 +33827,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -41801,7 +33839,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Container Auto -- `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` +- `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -41829,7 +33867,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -41837,7 +33875,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -41869,7 +33907,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An optional list of skills referenced by id or inline data. - - `SkillReference = object { skill_id, type, version }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -41885,7 +33923,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -41923,7 +33961,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Container Network Policy Allowlist -- `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` +- `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -41953,7 +33991,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Container Network Policy Disabled -- `ContainerNetworkPolicyDisabled = object { type }` +- `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -41963,7 +34001,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Container Network Policy Domain Secret -- `ContainerNetworkPolicyDomainSecret = object { domain, name, value }` +- `ContainerNetworkPolicyDomainSecret object { domain, name, value }` - `domain: string` @@ -41979,7 +34017,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Container Reference -- `ContainerReference = object { container_id, type }` +- `ContainerReference object { container_id, type }` - `container_id: string` @@ -41993,7 +34031,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Easy Input Message -- `EasyInputMessage = object { content, role, phase, type }` +- `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 @@ -42015,7 +34053,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -42029,7 +34067,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -42059,7 +34097,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -42124,7 +34162,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Inline Skill -- `InlineSkill = object { description, name, source, type }` +- `InlineSkill object { description, name, source, type }` - `description: string` @@ -42162,7 +34200,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Inline Skill Source -- `InlineSkillSource = object { data, media_type, type }` +- `InlineSkillSource object { data, media_type, type }` Inline skill payload @@ -42184,7 +34222,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Local Environment -- `LocalEnvironment = object { type, skills }` +- `LocalEnvironment object { type, skills }` - `type: "local"` @@ -42210,7 +34248,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Local Skill -- `LocalSkill = object { description, name, path }` +- `LocalSkill object { description, name, path }` - `description: string` @@ -42226,7 +34264,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response -- `Response = object { id, created_at, error, 30 more }` +- `Response object { id, created_at, error, 30 more }` - `id: string` @@ -42314,7 +34352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -42336,7 +34374,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -42350,7 +34388,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -42380,7 +34418,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -42443,7 +34481,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -42454,84 +34492,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -42559,7 +34519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -42571,7 +34531,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -42579,7 +34539,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -42601,7 +34561,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -42627,7 +34587,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -42657,7 +34617,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -42701,7 +34661,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -42748,7 +34708,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -42816,7 +34776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -42866,7 +34826,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -42902,7 +34862,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -42924,7 +34884,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -42957,7 +34917,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -42971,7 +34931,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -42993,7 +34953,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -43003,7 +34963,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -43033,7 +34993,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -43047,7 +35007,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -43062,198 +35022,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -43316,7 +35121,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -43330,7 +35135,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -43362,7 +35167,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -43376,7 +35181,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -43412,7 +35217,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -43454,7 +35259,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -43474,7 +35279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -43488,7 +35293,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -43518,7 +35323,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -43572,7 +35377,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -43610,13 +35415,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -43646,7 +35451,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -43664,7 +35469,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -43717,7 +35522,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -43725,59 +35530,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -43820,7 +35576,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -43830,7 +35586,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -43862,7 +35618,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -43922,7 +35678,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -43945,7 +35701,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -44011,7 +35767,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -44064,7 +35820,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -44078,7 +35834,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -44108,7 +35864,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -44116,7 +35872,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -44150,7 +35906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -44271,7 +36027,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -44281,7 +36037,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -44293,7 +36049,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -44321,47 +36077,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -44377,7 +36101,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -44413,7 +36137,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -44437,7 +36161,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -44449,7 +36173,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -44475,7 +36199,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -44485,7 +36209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -44507,7 +36231,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -44523,7 +36247,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -44541,7 +36265,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -44567,45 +36291,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -44631,7 +36323,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -44685,7 +36377,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -44727,7 +36419,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -44788,7 +36480,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -44806,7 +36498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -44836,7 +36528,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -44857,7 +36549,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -44871,7 +36563,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -44905,7 +36597,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -44963,7 +36655,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -44991,7 +36683,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -45029,41 +36721,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` - - - `type: "local"` - - Use a local computer environment. - - - `"local"` - - - `skills: optional array of LocalSkill` + - `LocalEnvironment object { type, skills }` - 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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -45075,7 +36735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -45091,7 +36751,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -45101,7 +36761,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -45147,7 +36807,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -45159,7 +36819,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -45177,7 +36837,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -45191,7 +36851,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -45227,7 +36887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -45257,7 +36917,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -45299,7 +36959,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -45325,7 +36985,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -45351,7 +37011,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -45404,7 +37064,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -45425,84 +37085,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -45513,7 +37107,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -45543,7 +37137,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -45780,196 +37374,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -46037,7 +37446,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -46079,7 +37488,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -46102,84 +37511,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -46201,7 +37544,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -46215,7 +37558,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -46247,7 +37590,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -46261,7 +37604,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -46297,7 +37640,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -46347,394 +37690,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -46748,21 +37709,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -46803,7 +37749,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -46826,8 +37772,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`. @@ -46864,7 +37808,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -46906,7 +37850,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -46938,7 +37882,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -46968,7 +37912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -46986,130 +37930,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -47142,7 +37970,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -47152,7 +37980,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -47184,7 +38012,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -47244,7 +38072,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -47267,7 +38095,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -47333,7 +38161,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -47386,7 +38214,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -47400,7 +38228,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -47430,41 +38258,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -47472,7 +38268,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -47593,7 +38389,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -47603,7 +38399,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -47615,163 +38411,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -47797,39 +38443,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -47845,7 +38459,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -47863,7 +38477,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -47889,45 +38503,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -47953,7 +38535,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -48007,7 +38589,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -48027,7 +38609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -48049,7 +38631,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -48079,7 +38661,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -48100,7 +38682,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -48114,7 +38696,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -48148,7 +38730,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -48206,7 +38788,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -48234,7 +38816,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -48264,7 +38846,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -48274,7 +38856,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -48306,7 +38888,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -48330,7 +38912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -48340,7 +38922,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -48386,7 +38968,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -48402,7 +38984,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -48420,7 +39002,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -48434,7 +39016,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -48470,7 +39052,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -48504,7 +39086,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -48557,7 +39139,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -48599,7 +39181,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -48625,7 +39207,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -48651,7 +39233,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -48681,7 +39263,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -48704,84 +39286,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -48835,7 +39351,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -48872,7 +39388,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -48908,7 +39424,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -48922,7 +39438,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -48940,7 +39456,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -48954,7 +39470,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -48964,7 +39480,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -48994,7 +39510,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -49024,7 +39540,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -49042,130 +39558,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -49198,7 +39598,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -49208,7 +39608,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -49240,7 +39640,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -49300,7 +39700,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -49323,7 +39723,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -49389,7 +39789,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -49442,7 +39842,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -49456,7 +39856,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -49486,41 +39886,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -49528,7 +39896,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -49649,7 +40017,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -49659,7 +40027,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -49671,163 +40039,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -49853,137 +40131,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -50009,7 +40163,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -50063,7 +40217,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -50137,84 +40291,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -50358,7 +40446,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -50368,7 +40456,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -50402,7 +40490,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -50488,7 +40576,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Audio Delta Event -- `ResponseAudioDeltaEvent = object { delta, sequence_number, type }` +- `ResponseAudioDeltaEvent object { delta, sequence_number, type }` Emitted when there is a partial audio response. @@ -50508,7 +40596,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Audio Done Event -- `ResponseAudioDoneEvent = object { sequence_number, type }` +- `ResponseAudioDoneEvent object { sequence_number, type }` Emitted when the audio response is complete. @@ -50524,7 +40612,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Audio Transcript Delta Event -- `ResponseAudioTranscriptDeltaEvent = object { delta, sequence_number, type }` +- `ResponseAudioTranscriptDeltaEvent object { delta, sequence_number, type }` Emitted when there is a partial transcript of audio. @@ -50544,7 +40632,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Audio Transcript Done Event -- `ResponseAudioTranscriptDoneEvent = object { sequence_number, type }` +- `ResponseAudioTranscriptDoneEvent object { sequence_number, type }` Emitted when the full audio transcript is completed. @@ -50560,7 +40648,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Code Interpreter Call Code Delta Event -- `ResponseCodeInterpreterCallCodeDeltaEvent = object { delta, item_id, output_index, 2 more }` +- `ResponseCodeInterpreterCallCodeDeltaEvent object { delta, item_id, output_index, 2 more }` Emitted when a partial code snippet is streamed by the code interpreter. @@ -50588,7 +40676,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Code Interpreter Call Code Done Event -- `ResponseCodeInterpreterCallCodeDoneEvent = object { code, item_id, output_index, 2 more }` +- `ResponseCodeInterpreterCallCodeDoneEvent object { code, item_id, output_index, 2 more }` Emitted when the code snippet is finalized by the code interpreter. @@ -50616,7 +40704,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Code Interpreter Call Completed Event -- `ResponseCodeInterpreterCallCompletedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseCodeInterpreterCallCompletedEvent object { item_id, output_index, sequence_number, type }` Emitted when the code interpreter call is completed. @@ -50640,7 +40728,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Code Interpreter Call In Progress Event -- `ResponseCodeInterpreterCallInProgressEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseCodeInterpreterCallInProgressEvent object { item_id, output_index, sequence_number, type }` Emitted when a code interpreter call is in progress. @@ -50664,7 +40752,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Code Interpreter Call Interpreting Event -- `ResponseCodeInterpreterCallInterpretingEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseCodeInterpreterCallInterpretingEvent object { item_id, output_index, sequence_number, type }` Emitted when the code interpreter is actively interpreting the code snippet. @@ -50688,7 +40776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Completed Event -- `ResponseCompletedEvent = object { response, sequence_number, type }` +- `ResponseCompletedEvent object { response, sequence_number, type }` Emitted when the model response is complete. @@ -50782,7 +40870,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -50804,7 +40892,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -50818,7 +40906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -50848,7 +40936,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -50911,7 +40999,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -50922,84 +41010,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -51027,7 +41037,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -51039,7 +41049,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -51047,7 +41057,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -51069,7 +41079,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -51095,7 +41105,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -51125,7 +41135,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -51169,7 +41179,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -51216,7 +41226,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -51284,7 +41294,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -51334,7 +41344,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -51370,7 +41380,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -51392,7 +41402,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -51425,7 +41435,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -51439,7 +41449,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -51461,7 +41471,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -51471,7 +41481,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -51501,7 +41511,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -51515,7 +41525,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -51530,198 +41540,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -51784,7 +41639,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -51798,7 +41653,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -51830,7 +41685,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -51844,7 +41699,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -51880,7 +41735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -51922,7 +41777,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -51942,7 +41797,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -51956,7 +41811,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -51986,7 +41841,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -52040,7 +41895,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -52078,13 +41933,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -52114,7 +41969,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -52132,7 +41987,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -52185,7 +42040,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -52193,59 +42048,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -52288,7 +42094,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -52298,7 +42104,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -52330,7 +42136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -52390,7 +42196,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -52413,7 +42219,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -52479,7 +42285,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -52532,7 +42338,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -52546,7 +42352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -52576,7 +42382,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -52584,7 +42390,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -52618,7 +42424,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -52739,7 +42545,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -52749,7 +42555,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -52761,7 +42567,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -52789,47 +42595,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -52845,7 +42619,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -52881,7 +42655,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -52905,7 +42679,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -52917,7 +42691,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -52943,7 +42717,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -52953,7 +42727,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -52975,7 +42749,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -52991,7 +42765,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -53009,7 +42783,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -53035,45 +42809,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -53099,7 +42841,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -53153,7 +42895,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -53195,7 +42937,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -53256,7 +42998,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -53274,7 +43016,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -53304,7 +43046,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -53325,7 +43067,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -53339,7 +43081,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -53373,7 +43115,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -53431,7 +43173,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -53459,7 +43201,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -53497,41 +43239,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -53543,7 +43253,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -53559,7 +43269,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -53569,7 +43279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -53615,7 +43325,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -53627,7 +43337,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -53645,7 +43355,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -53659,7 +43369,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -53695,7 +43405,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -53725,7 +43435,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -53767,7 +43477,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -53793,7 +43503,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -53819,7 +43529,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -53872,7 +43582,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -53893,84 +43603,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -53981,7 +43625,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -54011,7 +43655,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -54248,196 +43892,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -54505,7 +43964,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -54547,7 +44006,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -54570,84 +44029,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -54669,7 +44062,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -54683,7 +44076,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -54715,7 +44108,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -54729,7 +44122,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -54765,7 +44158,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -54815,394 +44208,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -55216,21 +44227,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -55271,7 +44267,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -55294,8 +44290,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`. @@ -55332,7 +44326,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -55374,7 +44368,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -55406,7 +44400,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -55436,7 +44430,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -55454,130 +44448,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -55610,7 +44488,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -55620,7 +44498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -55652,7 +44530,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -55712,7 +44590,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -55735,7 +44613,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -55801,7 +44679,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -55854,7 +44732,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -55868,7 +44746,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -55898,41 +44776,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -55940,7 +44786,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -56061,7 +44907,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -56071,7 +44917,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -56083,163 +44929,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -56265,39 +44961,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -56313,7 +44977,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -56331,7 +44995,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -56357,45 +45021,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -56421,7 +45053,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -56475,7 +45107,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -56495,7 +45127,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -56517,7 +45149,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -56547,7 +45179,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -56568,7 +45200,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -56582,7 +45214,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -56616,7 +45248,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -56674,7 +45306,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -56702,7 +45334,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -56732,7 +45364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -56742,7 +45374,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -56774,7 +45406,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -56798,7 +45430,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -56808,7 +45440,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -56854,7 +45486,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -56870,7 +45502,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -56888,7 +45520,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -56902,7 +45534,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -56938,7 +45570,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -56972,7 +45604,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -57025,7 +45657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -57067,7 +45699,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -57093,7 +45725,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -57119,7 +45751,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -57149,7 +45781,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -57172,84 +45804,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -57303,7 +45869,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -57340,7 +45906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -57376,7 +45942,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -57390,7 +45956,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -57408,7 +45974,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -57422,7 +45988,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -57432,7 +45998,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -57462,7 +46028,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -57492,7 +46058,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -57510,130 +46076,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -57666,7 +46116,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -57676,7 +46126,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -57708,7 +46158,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -57768,7 +46218,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -57791,7 +46241,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -57857,7 +46307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -57910,7 +46360,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -57924,7 +46374,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -57954,41 +46404,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -57996,7 +46414,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -58117,7 +46535,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -58127,7 +46545,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -58139,163 +46557,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -58321,137 +46649,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -58477,7 +46681,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -58531,7 +46735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -58605,84 +46809,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -58826,7 +46964,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -58836,7 +46974,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -58870,7 +47008,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -58966,7 +47104,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Computer Tool Call Output Screenshot -- `ResponseComputerToolCallOutputScreenshot = object { type, file_id, image_url }` +- `ResponseComputerToolCallOutputScreenshot object { type, file_id, image_url }` A computer screenshot image used with the computer use tool. @@ -58987,7 +47125,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Container Reference -- `ResponseContainerReference = object { container_id, type }` +- `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -59005,7 +47143,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Multi-modal input and output contents. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -59019,7 +47157,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -59049,7 +47187,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -59083,7 +47221,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the file to be sent to the model. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -59091,7 +47229,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -59113,7 +47251,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -59139,7 +47277,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -59169,7 +47307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -59213,7 +47351,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -59227,7 +47365,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"refusal"` - - `ReasoningText = object { text, type }` + - `ReasoningText object { text, type }` Reasoning text from the model. @@ -59243,7 +47381,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Content Part Added Event -- `ResponseContentPartAddedEvent = object { content_index, item_id, output_index, 3 more }` +- `ResponseContentPartAddedEvent object { content_index, item_id, output_index, 3 more }` Emitted when a new content part is added. @@ -59263,7 +47401,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -59271,7 +47409,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -59293,7 +47431,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -59319,7 +47457,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -59349,7 +47487,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -59393,7 +47531,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -59407,7 +47545,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"refusal"` - - `ReasoningText = object { text, type }` + - `ReasoningText object { text, type }` Reasoning text from the model. @@ -59433,7 +47571,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Content Part Done Event -- `ResponseContentPartDoneEvent = object { content_index, item_id, output_index, 3 more }` +- `ResponseContentPartDoneEvent object { content_index, item_id, output_index, 3 more }` Emitted when a content part is done. @@ -59453,7 +47591,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that is done. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -59461,7 +47599,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -59483,7 +47621,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -59509,7 +47647,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -59539,7 +47677,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -59583,7 +47721,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -59597,7 +47735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"refusal"` - - `ReasoningText = object { text, type }` + - `ReasoningText object { text, type }` Reasoning text from the model. @@ -59623,7 +47761,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Conversation Param -- `ResponseConversationParam = object { id }` +- `ResponseConversationParam object { id }` The conversation that this response belongs to. @@ -59633,7 +47771,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Created Event -- `ResponseCreatedEvent = object { response, sequence_number, type }` +- `ResponseCreatedEvent object { response, sequence_number, type }` An event that is emitted when a response is created. @@ -59727,7 +47865,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -59749,7 +47887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -59763,7 +47901,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -59793,7 +47931,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -59856,7 +47994,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -59867,84 +48005,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -59972,7 +48032,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -59984,7 +48044,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -59992,7 +48052,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -60014,7 +48074,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -60040,7 +48100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -60070,7 +48130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -60114,7 +48174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -60161,7 +48221,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -60229,7 +48289,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -60279,7 +48339,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -60315,7 +48375,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -60337,7 +48397,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -60370,7 +48430,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -60384,7 +48444,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -60406,7 +48466,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -60416,7 +48476,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -60446,7 +48506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -60460,7 +48520,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -60475,198 +48535,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -60729,7 +48634,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -60743,7 +48648,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -60775,7 +48680,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -60789,7 +48694,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -60825,7 +48730,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -60867,7 +48772,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -60887,7 +48792,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -60901,7 +48806,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -60931,7 +48836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -60985,7 +48890,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -61023,13 +48928,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -61059,7 +48964,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -61077,7 +48982,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -61130,7 +49035,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -61138,59 +49043,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -61233,7 +49089,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -61243,7 +49099,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -61275,7 +49131,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -61335,7 +49191,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -61358,7 +49214,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -61424,7 +49280,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -61477,7 +49333,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -61491,7 +49347,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -61521,7 +49377,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -61529,7 +49385,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -61563,7 +49419,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -61684,7 +49540,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -61694,7 +49550,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -61706,7 +49562,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -61734,47 +49590,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -61790,7 +49614,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -61826,7 +49650,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -61850,7 +49674,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -61862,7 +49686,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -61888,7 +49712,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -61898,7 +49722,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -61920,7 +49744,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -61936,7 +49760,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -61954,7 +49778,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -61980,45 +49804,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -62044,7 +49836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -62098,7 +49890,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -62140,7 +49932,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -62201,7 +49993,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -62219,7 +50011,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -62249,7 +50041,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -62270,7 +50062,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -62284,7 +50076,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -62318,7 +50110,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -62376,7 +50168,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -62404,7 +50196,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -62442,41 +50234,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -62488,7 +50248,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -62504,7 +50264,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -62514,7 +50274,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -62560,7 +50320,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -62572,7 +50332,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -62590,7 +50350,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -62604,7 +50364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -62640,7 +50400,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -62670,7 +50430,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -62712,7 +50472,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -62738,7 +50498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -62764,7 +50524,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -62817,7 +50577,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -62838,84 +50598,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -62926,7 +50620,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -62956,7 +50650,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -63193,196 +50887,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -63450,7 +50959,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -63492,7 +51001,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -63515,84 +51024,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -63614,7 +51057,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -63628,7 +51071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -63660,7 +51103,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -63674,7 +51117,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -63710,7 +51153,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -63760,394 +51203,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -64161,21 +51222,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -64216,7 +51262,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -64239,8 +51285,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`. @@ -64277,7 +51321,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -64319,7 +51363,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -64351,7 +51395,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -64381,7 +51425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -64399,130 +51443,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -64555,7 +51483,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -64565,7 +51493,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -64597,7 +51525,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -64657,7 +51585,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -64680,7 +51608,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -64746,7 +51674,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -64799,7 +51727,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -64813,7 +51741,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -64843,41 +51771,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -64885,7 +51781,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -65006,7 +51902,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -65016,7 +51912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -65028,163 +51924,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -65210,39 +51956,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -65258,7 +51972,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -65276,7 +51990,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -65302,45 +52016,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -65366,7 +52048,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -65420,7 +52102,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -65440,7 +52122,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -65462,7 +52144,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -65492,7 +52174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -65513,7 +52195,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -65527,7 +52209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -65561,7 +52243,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -65619,7 +52301,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -65647,7 +52329,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -65677,7 +52359,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -65687,7 +52369,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -65719,7 +52401,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -65743,7 +52425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -65753,7 +52435,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -65799,7 +52481,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -65815,7 +52497,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -65833,7 +52515,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -65847,7 +52529,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -65883,7 +52565,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -65917,7 +52599,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -65970,7 +52652,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -66012,7 +52694,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -66038,7 +52720,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -66064,7 +52746,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -66094,7 +52776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -66117,84 +52799,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -66248,7 +52864,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -66285,7 +52901,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -66321,7 +52937,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -66335,7 +52951,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -66353,7 +52969,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -66367,7 +52983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -66377,7 +52993,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -66407,7 +53023,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -66437,7 +53053,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -66455,130 +53071,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -66611,7 +53111,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -66621,7 +53121,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -66653,7 +53153,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -66713,7 +53213,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -66736,7 +53236,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -66802,7 +53302,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -66855,7 +53355,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -66869,7 +53369,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -66899,41 +53399,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -66941,7 +53409,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -67062,7 +53530,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -67072,7 +53540,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -67084,163 +53552,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -67266,137 +53644,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -67422,7 +53676,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -67476,7 +53730,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -67550,84 +53804,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -67771,7 +53959,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -67781,7 +53969,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -67815,7 +54003,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -67911,7 +54099,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Custom Tool Call Input Delta Event -- `ResponseCustomToolCallInputDeltaEvent = object { delta, item_id, output_index, 2 more }` +- `ResponseCustomToolCallInputDeltaEvent object { delta, item_id, output_index, 2 more }` Event representing a delta (partial update) to the input of a custom tool call. @@ -67939,7 +54127,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Custom Tool Call Input Done Event -- `ResponseCustomToolCallInputDoneEvent = object { input, item_id, output_index, 2 more }` +- `ResponseCustomToolCallInputDoneEvent object { input, item_id, output_index, 2 more }` Event indicating that input for a custom tool call is complete. @@ -67967,7 +54155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Error -- `ResponseError = object { code, message }` +- `ResponseError object { code, message }` An error object returned when the model fails to generate a Response. @@ -68017,7 +54205,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Error Event -- `ResponseErrorEvent = object { code, message, param, 2 more }` +- `ResponseErrorEvent object { code, message, param, 2 more }` Emitted when an error occurs. @@ -68045,7 +54233,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Failed Event -- `ResponseFailedEvent = object { response, sequence_number, type }` +- `ResponseFailedEvent object { response, sequence_number, type }` An event that is emitted when a response fails. @@ -68139,7 +54327,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -68161,7 +54349,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -68175,7 +54363,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -68205,7 +54393,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -68268,7 +54456,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -68279,84 +54467,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -68384,7 +54494,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -68396,7 +54506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -68404,7 +54514,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -68426,7 +54536,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -68452,7 +54562,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -68482,7 +54592,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -68526,7 +54636,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -68573,7 +54683,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -68641,7 +54751,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -68691,7 +54801,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -68727,7 +54837,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -68749,7 +54859,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -68782,7 +54892,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -68796,7 +54906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -68818,7 +54928,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -68828,7 +54938,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -68858,7 +54968,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -68872,7 +54982,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -68887,198 +54997,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -69141,7 +55096,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -69155,7 +55110,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -69187,7 +55142,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -69201,7 +55156,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -69237,7 +55192,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -69279,7 +55234,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -69299,7 +55254,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -69313,7 +55268,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -69343,7 +55298,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -69397,7 +55352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -69435,13 +55390,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -69471,7 +55426,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -69489,7 +55444,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -69542,7 +55497,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -69550,59 +55505,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -69645,7 +55551,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -69655,7 +55561,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -69687,7 +55593,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -69747,7 +55653,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -69770,7 +55676,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -69836,7 +55742,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -69889,7 +55795,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -69903,7 +55809,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -69933,7 +55839,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -69941,7 +55847,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -69975,7 +55881,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -70096,7 +56002,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -70106,7 +56012,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -70118,7 +56024,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -70146,47 +56052,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -70202,7 +56076,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -70238,7 +56112,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -70262,7 +56136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -70274,7 +56148,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -70300,7 +56174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -70310,7 +56184,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -70332,7 +56206,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -70348,7 +56222,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -70366,7 +56240,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -70392,45 +56266,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -70456,7 +56298,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -70510,7 +56352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -70552,7 +56394,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -70613,7 +56455,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -70631,7 +56473,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -70661,7 +56503,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -70682,7 +56524,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -70696,7 +56538,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -70730,7 +56572,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -70788,7 +56630,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -70816,7 +56658,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -70854,41 +56696,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -70900,7 +56710,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -70916,7 +56726,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -70926,7 +56736,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -70972,7 +56782,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -70984,7 +56794,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -71002,7 +56812,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -71016,7 +56826,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -71052,7 +56862,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -71082,7 +56892,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -71124,7 +56934,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -71150,7 +56960,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -71176,7 +56986,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -71229,7 +57039,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -71250,84 +57060,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -71338,7 +57082,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -71368,7 +57112,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -71605,196 +57349,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -71862,7 +57421,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -71904,7 +57463,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -71927,84 +57486,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -72026,7 +57519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -72040,7 +57533,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -72072,7 +57565,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -72086,7 +57579,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -72122,7 +57615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -72172,394 +57665,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -72573,21 +57684,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -72628,7 +57724,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -72651,8 +57747,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`. @@ -72689,7 +57783,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -72731,7 +57825,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -72763,7 +57857,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -72793,7 +57887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -72811,130 +57905,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -72967,7 +57945,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -72977,7 +57955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -73009,7 +57987,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -73069,7 +58047,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -73092,7 +58070,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -73158,7 +58136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -73211,7 +58189,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -73225,7 +58203,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -73255,41 +58233,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -73297,7 +58243,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -73418,7 +58364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -73428,7 +58374,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -73440,163 +58386,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -73622,39 +58418,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -73670,7 +58434,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -73688,7 +58452,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -73714,45 +58478,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -73778,7 +58510,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -73832,7 +58564,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -73852,7 +58584,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -73874,7 +58606,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -73904,7 +58636,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -73925,7 +58657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -73939,7 +58671,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -73973,7 +58705,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -74031,7 +58763,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -74059,7 +58791,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -74089,7 +58821,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -74099,7 +58831,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -74131,7 +58863,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -74155,7 +58887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -74165,7 +58897,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -74211,7 +58943,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -74227,7 +58959,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -74245,7 +58977,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -74259,7 +58991,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -74295,7 +59027,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -74329,7 +59061,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -74382,7 +59114,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -74424,7 +59156,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -74450,7 +59182,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -74476,7 +59208,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -74506,7 +59238,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -74529,84 +59261,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -74660,7 +59326,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -74697,7 +59363,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -74733,7 +59399,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -74747,7 +59413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -74765,7 +59431,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -74779,7 +59445,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -74789,7 +59455,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -74819,7 +59485,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -74849,7 +59515,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -74867,130 +59533,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -75023,7 +59573,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -75033,7 +59583,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -75065,7 +59615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -75125,7 +59675,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -75148,7 +59698,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -75214,7 +59764,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -75267,7 +59817,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -75281,7 +59831,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -75311,41 +59861,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -75353,7 +59871,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -75474,7 +59992,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -75484,7 +60002,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -75496,163 +60014,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -75678,137 +60106,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -75834,7 +60138,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -75888,7 +60192,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -75962,84 +60266,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -76183,7 +60421,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -76193,7 +60431,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -76227,7 +60465,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -76323,7 +60561,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response File Search Call Completed Event -- `ResponseFileSearchCallCompletedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseFileSearchCallCompletedEvent object { item_id, output_index, sequence_number, type }` Emitted when a file search call is completed (results found). @@ -76347,7 +60585,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response File Search Call In Progress Event -- `ResponseFileSearchCallInProgressEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseFileSearchCallInProgressEvent object { item_id, output_index, sequence_number, type }` Emitted when a file search call is initiated. @@ -76371,7 +60609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response File Search Call Searching Event -- `ResponseFileSearchCallSearchingEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseFileSearchCallSearchingEvent object { item_id, output_index, sequence_number, type }` Emitted when a file search is currently searching. @@ -76411,7 +60649,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -76421,7 +60659,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -76455,7 +60693,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -76470,7 +60708,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Format Text JSON Schema Config -- `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` +- `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -76506,7 +60744,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Function Call Arguments Delta Event -- `ResponseFunctionCallArgumentsDeltaEvent = object { delta, item_id, output_index, 2 more }` +- `ResponseFunctionCallArgumentsDeltaEvent object { delta, item_id, output_index, 2 more }` Emitted when there is a partial function-call arguments delta. @@ -76534,7 +60772,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Function Call Arguments Done Event -- `ResponseFunctionCallArgumentsDoneEvent = object { arguments, item_id, name, 3 more }` +- `ResponseFunctionCallArgumentsDoneEvent object { arguments, item_id, name, 3 more }` Emitted when function-call arguments are finalized. @@ -76564,7 +60802,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Function Shell Call Output Content -- `ResponseFunctionShellCallOutputContent = object { outcome, stderr, stdout }` +- `ResponseFunctionShellCallOutputContent object { outcome, stderr, stdout }` Captured stdout and stderr for a portion of a shell tool call output. @@ -76572,7 +60810,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -76582,7 +60820,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -76606,7 +60844,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Image Gen Call Completed Event -- `ResponseImageGenCallCompletedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseImageGenCallCompletedEvent object { item_id, output_index, sequence_number, type }` Emitted when an image generation tool call has completed and the final image is available. @@ -76630,7 +60868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Image Gen Call Generating Event -- `ResponseImageGenCallGeneratingEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseImageGenCallGeneratingEvent object { item_id, output_index, sequence_number, type }` Emitted when an image generation tool call is actively generating an image (intermediate state). @@ -76654,7 +60892,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Image Gen Call In Progress Event -- `ResponseImageGenCallInProgressEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseImageGenCallInProgressEvent object { item_id, output_index, sequence_number, type }` Emitted when an image generation tool call is in progress. @@ -76678,7 +60916,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Image Gen Call Partial Image Event -- `ResponseImageGenCallPartialImageEvent = object { item_id, output_index, partial_image_b64, 3 more }` +- `ResponseImageGenCallPartialImageEvent object { item_id, output_index, partial_image_b64, 3 more }` Emitted when a partial image is available during image generation streaming. @@ -76710,7 +60948,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response In Progress Event -- `ResponseInProgressEvent = object { response, sequence_number, type }` +- `ResponseInProgressEvent object { response, sequence_number, type }` Emitted when the response is in progress. @@ -76804,7 +61042,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -76826,7 +61064,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -76840,7 +61078,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -76870,7 +61108,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -76933,7 +61171,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -76944,84 +61182,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -77049,7 +61209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -77061,7 +61221,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -77069,7 +61229,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -77091,7 +61251,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -77117,7 +61277,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -77147,7 +61307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -77191,7 +61351,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -77238,7 +61398,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -77306,7 +61466,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -77356,7 +61516,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -77392,7 +61552,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -77414,7 +61574,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -77447,7 +61607,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -77461,7 +61621,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -77483,7 +61643,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -77493,7 +61653,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -77523,7 +61683,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -77537,7 +61697,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -77552,198 +61712,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -77806,7 +61811,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -77820,7 +61825,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -77852,7 +61857,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -77866,7 +61871,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -77902,7 +61907,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -77944,7 +61949,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -77964,7 +61969,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -77978,7 +61983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -78008,7 +62013,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -78062,7 +62067,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -78100,13 +62105,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -78136,7 +62141,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -78154,7 +62159,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -78207,7 +62212,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -78215,59 +62220,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -78310,7 +62266,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -78320,7 +62276,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -78352,7 +62308,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -78412,7 +62368,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -78435,7 +62391,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -78501,7 +62457,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -78554,7 +62510,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -78568,7 +62524,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -78598,7 +62554,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -78606,7 +62562,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -78640,7 +62596,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -78761,7 +62717,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -78771,7 +62727,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -78783,7 +62739,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -78811,47 +62767,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -78867,7 +62791,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -78903,7 +62827,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -78927,7 +62851,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -78939,7 +62863,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -78965,7 +62889,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -78975,7 +62899,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -78997,7 +62921,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -79013,7 +62937,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -79031,7 +62955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -79057,45 +62981,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -79121,7 +63013,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -79175,7 +63067,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -79217,7 +63109,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -79278,7 +63170,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -79296,7 +63188,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -79326,7 +63218,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -79347,7 +63239,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -79361,7 +63253,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -79395,7 +63287,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -79453,7 +63345,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -79481,7 +63373,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -79519,41 +63411,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -79565,7 +63425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -79581,7 +63441,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -79591,7 +63451,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -79637,7 +63497,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -79649,7 +63509,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -79667,7 +63527,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -79681,7 +63541,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -79717,7 +63577,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -79747,7 +63607,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -79789,7 +63649,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -79815,7 +63675,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -79841,7 +63701,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -79894,7 +63754,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -79915,84 +63775,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -80003,7 +63797,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -80033,7 +63827,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -80270,196 +64064,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -80527,7 +64136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -80569,7 +64178,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -80592,84 +64201,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -80691,7 +64234,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -80705,7 +64248,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -80737,7 +64280,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -80751,7 +64294,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -80787,7 +64330,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -80837,394 +64380,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -81238,21 +64399,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -81293,7 +64439,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -81316,8 +64462,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`. @@ -81354,7 +64498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -81396,7 +64540,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -81428,7 +64572,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -81458,7 +64602,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -81476,130 +64620,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -81632,7 +64660,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -81642,7 +64670,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -81674,7 +64702,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -81734,7 +64762,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -81757,7 +64785,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -81823,7 +64851,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -81876,7 +64904,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -81890,7 +64918,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -81920,41 +64948,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -81962,7 +64958,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -82083,7 +65079,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -82093,7 +65089,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -82105,163 +65101,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -82287,39 +65133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -82335,7 +65149,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -82353,7 +65167,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -82379,45 +65193,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -82443,7 +65225,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -82497,7 +65279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -82517,7 +65299,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -82539,7 +65321,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -82569,7 +65351,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -82590,7 +65372,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -82604,7 +65386,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -82638,7 +65420,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -82696,7 +65478,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -82724,7 +65506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -82754,7 +65536,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -82764,7 +65546,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -82796,7 +65578,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -82820,7 +65602,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -82830,7 +65612,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -82876,7 +65658,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -82892,7 +65674,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -82910,7 +65692,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -82924,7 +65706,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -82960,7 +65742,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -82994,7 +65776,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -83047,7 +65829,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -83089,7 +65871,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -83115,7 +65897,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -83141,7 +65923,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -83171,7 +65953,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -83194,84 +65976,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -83325,7 +66041,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -83362,7 +66078,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -83398,7 +66114,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -83412,7 +66128,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -83430,7 +66146,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -83444,7 +66160,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -83454,7 +66170,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -83484,7 +66200,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -83514,7 +66230,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -83532,130 +66248,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -83688,7 +66288,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -83698,7 +66298,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -83730,7 +66330,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -83790,7 +66390,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -83813,7 +66413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -83879,7 +66479,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -83932,7 +66532,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -83946,7 +66546,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -83976,41 +66576,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -84018,7 +66586,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -84139,7 +66707,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -84149,7 +66717,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -84161,163 +66729,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -84343,137 +66821,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -84499,7 +66853,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -84553,7 +66907,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -84627,84 +66981,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -84848,7 +67136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -84858,7 +67146,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -84892,7 +67180,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -85018,7 +67306,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Incomplete Event -- `ResponseIncompleteEvent = object { response, sequence_number, type }` +- `ResponseIncompleteEvent object { response, sequence_number, type }` An event that is emitted when a response finishes as incomplete. @@ -85112,7 +67400,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -85134,7 +67422,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -85148,7 +67436,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -85178,7 +67466,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -85241,7 +67529,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -85252,84 +67540,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -85357,7 +67567,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -85369,7 +67579,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -85377,7 +67587,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -85399,7 +67609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -85425,7 +67635,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -85455,7 +67665,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -85499,7 +67709,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -85546,7 +67756,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -85614,7 +67824,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -85664,7 +67874,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -85700,7 +67910,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -85722,7 +67932,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -85755,7 +67965,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -85769,7 +67979,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -85791,7 +68001,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -85801,7 +68011,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -85831,7 +68041,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -85845,7 +68055,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -85860,198 +68070,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -86114,7 +68169,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -86128,7 +68183,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -86160,7 +68215,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -86174,7 +68229,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -86210,7 +68265,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -86252,7 +68307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -86272,7 +68327,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -86286,7 +68341,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -86316,7 +68371,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -86370,7 +68425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -86408,13 +68463,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -86444,7 +68499,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -86462,7 +68517,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -86515,7 +68570,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -86523,59 +68578,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -86618,7 +68624,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -86628,7 +68634,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -86660,7 +68666,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -86720,7 +68726,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -86743,7 +68749,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -86809,7 +68815,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -86862,7 +68868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -86876,7 +68882,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -86906,7 +68912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -86914,7 +68920,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -86948,7 +68954,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -87069,7 +69075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -87079,7 +69085,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -87091,7 +69097,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -87119,47 +69125,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -87175,7 +69149,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -87211,7 +69185,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -87235,7 +69209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -87247,7 +69221,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -87273,7 +69247,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -87283,7 +69257,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -87305,7 +69279,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -87321,7 +69295,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -87339,7 +69313,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -87365,45 +69339,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -87429,7 +69371,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -87483,7 +69425,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -87525,7 +69467,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -87586,7 +69528,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -87604,7 +69546,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -87634,7 +69576,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -87655,7 +69597,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -87669,7 +69611,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -87703,7 +69645,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -87761,7 +69703,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -87789,7 +69731,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -87827,41 +69769,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -87873,7 +69783,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -87889,7 +69799,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -87899,7 +69809,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -87945,7 +69855,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -87957,7 +69867,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -87975,7 +69885,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -87989,7 +69899,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -88025,7 +69935,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -88055,7 +69965,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -88097,7 +70007,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -88123,7 +70033,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -88149,7 +70059,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -88202,7 +70112,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -88223,84 +70133,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -88311,7 +70155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -88341,7 +70185,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -88578,196 +70422,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -88835,7 +70494,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -88877,7 +70536,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -88900,84 +70559,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -88999,7 +70592,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -89013,7 +70606,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -89045,7 +70638,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -89059,7 +70652,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -89095,7 +70688,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -89145,394 +70738,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -89546,21 +70757,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -89601,7 +70797,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -89624,8 +70820,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`. @@ -89662,7 +70856,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -89704,7 +70898,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -89736,7 +70930,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -89766,7 +70960,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -89784,130 +70978,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -89940,7 +71018,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -89950,7 +71028,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -89982,7 +71060,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -90042,7 +71120,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -90065,7 +71143,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -90131,7 +71209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -90184,7 +71262,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -90198,7 +71276,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -90228,41 +71306,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -90270,7 +71316,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -90391,7 +71437,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -90401,7 +71447,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -90413,163 +71459,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -90595,39 +71491,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -90643,7 +71507,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -90661,7 +71525,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -90687,45 +71551,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -90751,7 +71583,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -90805,7 +71637,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -90825,7 +71657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -90847,7 +71679,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -90877,7 +71709,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -90898,7 +71730,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -90912,7 +71744,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -90946,7 +71778,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -91004,7 +71836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -91032,7 +71864,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -91062,7 +71894,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -91072,7 +71904,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -91104,7 +71936,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -91128,7 +71960,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -91138,7 +71970,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -91184,7 +72016,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -91200,7 +72032,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -91218,7 +72050,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -91232,7 +72064,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -91268,7 +72100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -91302,7 +72134,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -91355,7 +72187,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -91397,7 +72229,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -91423,7 +72255,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -91449,7 +72281,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -91479,7 +72311,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -91502,84 +72334,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -91633,7 +72399,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -91670,7 +72436,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -91706,7 +72472,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -91720,7 +72486,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -91738,7 +72504,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -91752,7 +72518,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -91762,7 +72528,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -91792,7 +72558,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -91822,7 +72588,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -91840,130 +72606,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -91996,7 +72646,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -92006,7 +72656,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -92038,7 +72688,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -92098,7 +72748,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -92121,7 +72771,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -92187,7 +72837,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -92240,7 +72890,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -92254,7 +72904,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -92284,41 +72934,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -92326,7 +72944,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -92447,7 +73065,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -92457,7 +73075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -92469,163 +73087,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -92651,137 +73179,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -92807,7 +73211,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -92861,7 +73265,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -92935,84 +73339,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -93156,7 +73494,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -93166,7 +73504,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -93200,7 +73538,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -93296,7 +73634,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input Audio -- `ResponseInputAudio = object { input_audio, type }` +- `ResponseInputAudio object { input_audio, type }` An audio input to the model. @@ -93327,7 +73665,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A text input to the model. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -93341,7 +73679,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -93371,7 +73709,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -93407,7 +73745,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input File -- `ResponseInputFile = object { type, detail, file_data, 3 more }` +- `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -93443,7 +73781,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input File Content -- `ResponseInputFileContent = object { type, detail, file_data, 3 more }` +- `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -93479,7 +73817,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input Image -- `ResponseInputImage = object { detail, type, file_id, image_url }` +- `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -93511,7 +73849,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input Image Content -- `ResponseInputImageContent = object { type, detail, file_id, image_url }` +- `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -93548,7 +73886,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -93562,7 +73900,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -93592,7 +73930,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -93628,7 +73966,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input Message Item -- `ResponseInputMessageItem = object { id, content, role, 2 more }` +- `ResponseInputMessageItem object { id, content, role, 2 more }` - `id: string` @@ -93639,7 +73977,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -93653,7 +73991,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -93683,7 +74021,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -93746,7 +74084,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input Text -- `ResponseInputText = object { text, type }` +- `ResponseInputText object { text, type }` A text input to the model. @@ -93762,7 +74100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Input Text Content -- `ResponseInputTextContent = object { text, type }` +- `ResponseInputTextContent object { text, type }` A text input to the model. @@ -93778,7 +74116,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Local Environment -- `ResponseLocalEnvironment = object { type }` +- `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -93790,7 +74128,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp Call Arguments Delta Event -- `ResponseMcpCallArgumentsDeltaEvent = object { delta, item_id, output_index, 2 more }` +- `ResponseMcpCallArgumentsDeltaEvent object { delta, item_id, output_index, 2 more }` Emitted when there is a delta (partial update) to the arguments of an MCP tool call. @@ -93818,7 +74156,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp Call Arguments Done Event -- `ResponseMcpCallArgumentsDoneEvent = object { arguments, item_id, output_index, 2 more }` +- `ResponseMcpCallArgumentsDoneEvent object { arguments, item_id, output_index, 2 more }` Emitted when the arguments for an MCP tool call are finalized. @@ -93846,7 +74184,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp Call Completed Event -- `ResponseMcpCallCompletedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseMcpCallCompletedEvent object { item_id, output_index, sequence_number, type }` Emitted when an MCP tool call has completed successfully. @@ -93870,7 +74208,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp Call Failed Event -- `ResponseMcpCallFailedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseMcpCallFailedEvent object { item_id, output_index, sequence_number, type }` Emitted when an MCP tool call has failed. @@ -93894,7 +74232,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp Call In Progress Event -- `ResponseMcpCallInProgressEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseMcpCallInProgressEvent object { item_id, output_index, sequence_number, type }` Emitted when an MCP tool call is in progress. @@ -93918,7 +74256,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp List Tools Completed Event -- `ResponseMcpListToolsCompletedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseMcpListToolsCompletedEvent object { item_id, output_index, sequence_number, type }` Emitted when the list of available MCP tools has been successfully retrieved. @@ -93942,7 +74280,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp List Tools Failed Event -- `ResponseMcpListToolsFailedEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseMcpListToolsFailedEvent object { item_id, output_index, sequence_number, type }` Emitted when the attempt to list available MCP tools has failed. @@ -93966,7 +74304,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Mcp List Tools In Progress Event -- `ResponseMcpListToolsInProgressEvent = object { item_id, output_index, sequence_number, type }` +- `ResponseMcpListToolsInProgressEvent object { item_id, output_index, sequence_number, type }` Emitted when the system is in the process of retrieving the list of available MCP tools. @@ -93990,7 +74328,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Output Audio -- `ResponseOutputAudio = object { data, transcript, type }` +- `ResponseOutputAudio object { data, transcript, type }` An audio output from the model. @@ -94014,7 +74352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An output message from the model. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -94026,7 +74364,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -94034,7 +74372,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -94056,7 +74394,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -94082,7 +74420,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -94112,7 +74450,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -94156,7 +74494,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -94203,7 +74541,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -94271,7 +74609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -94313,7 +74651,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -94336,7 +74674,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -94350,7 +74688,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -94380,7 +74718,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -94435,7 +74773,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -94449,7 +74787,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -94481,7 +74819,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -94495,7 +74833,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -94531,7 +74869,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -94581,7 +74919,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -94617,7 +74955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -94639,7 +74977,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -94672,7 +75010,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -94686,7 +75024,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -94708,7 +75046,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -94718,7 +75056,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -94748,7 +75086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -94762,7 +75100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -94777,198 +75115,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -95037,7 +75220,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -95098,7 +75281,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -95140,7 +75323,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -95172,7 +75355,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -95202,7 +75385,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -95220,7 +75403,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -95273,7 +75456,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -95281,59 +75464,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -95376,7 +75510,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -95386,7 +75520,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -95418,7 +75552,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -95478,7 +75612,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -95501,7 +75635,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -95567,7 +75701,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -95620,7 +75754,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -95634,7 +75768,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -95664,7 +75798,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -95672,7 +75806,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -95706,7 +75840,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -95827,7 +75961,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -95837,7 +75971,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -95849,7 +75983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -95877,47 +76011,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` - - - `type: "disabled"` - - Disable outbound network access. Always `disabled`. + - `ContainerNetworkPolicyDisabled object { type }` - - `"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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -95933,7 +76035,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -95969,7 +76071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -95993,7 +76095,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -96005,7 +76107,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -96031,7 +76133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -96041,7 +76143,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -96063,7 +76165,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -96079,7 +76181,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -96097,7 +76199,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -96123,45 +76225,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -96187,7 +76257,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -96241,7 +76311,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -96261,7 +76331,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -96283,7 +76353,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -96313,7 +76383,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -96334,7 +76404,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -96348,7 +76418,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -96382,7 +76452,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -96440,7 +76510,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -96468,7 +76538,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -96498,7 +76568,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -96508,7 +76578,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -96540,7 +76610,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -96564,7 +76634,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -96574,7 +76644,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -96620,7 +76690,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -96636,7 +76706,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -96654,7 +76724,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -96668,7 +76738,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -96704,7 +76774,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -96738,7 +76808,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -96791,7 +76861,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -96833,7 +76903,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -96859,7 +76929,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -96885,7 +76955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -96915,7 +76985,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -96938,84 +77008,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -97039,7 +77043,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Output Item Added Event -- `ResponseOutputItemAddedEvent = object { item, output_index, sequence_number, type }` +- `ResponseOutputItemAddedEvent object { item, output_index, sequence_number, type }` Emitted when a new output item is added. @@ -97047,7 +77051,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The output item that was added. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -97059,7 +77063,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -97067,7 +77071,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -97089,7 +77093,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -97115,7 +77119,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -97145,7 +77149,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -97189,7 +77193,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -97236,7 +77240,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -97304,7 +77308,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -97346,7 +77350,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -97369,7 +77373,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -97383,7 +77387,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -97413,7 +77417,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -97468,7 +77472,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -97482,7 +77486,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -97514,7 +77518,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -97528,7 +77532,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -97564,7 +77568,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -97614,7 +77618,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -97650,7 +77654,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -97672,7 +77676,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -97705,7 +77709,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -97719,7 +77723,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -97741,7 +77745,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -97751,7 +77755,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -97781,7 +77785,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -97795,7 +77799,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -97810,198 +77814,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -98070,7 +77919,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -98131,7 +77980,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -98173,7 +78022,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -98205,7 +78054,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -98235,7 +78084,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -98253,7 +78102,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -98306,7 +78155,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -98314,59 +78163,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -98409,7 +78209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -98419,7 +78219,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -98451,7 +78251,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -98511,7 +78311,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -98534,7 +78334,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -98600,7 +78400,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -98653,7 +78453,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -98667,7 +78467,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -98697,7 +78497,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -98705,7 +78505,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -98739,7 +78539,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -98860,7 +78660,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -98870,7 +78670,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -98882,7 +78682,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -98910,47 +78710,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` - - - `type: "disabled"` - - Disable outbound network access. Always `disabled`. + - `ContainerNetworkPolicyDisabled object { type }` - - `"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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -98966,7 +78734,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -99002,7 +78770,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -99026,7 +78794,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -99038,7 +78806,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -99064,7 +78832,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -99074,7 +78842,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -99096,7 +78864,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -99112,7 +78880,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -99130,7 +78898,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -99156,45 +78924,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -99220,7 +78956,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -99274,7 +79010,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -99294,7 +79030,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -99316,7 +79052,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -99346,7 +79082,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -99367,7 +79103,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -99381,7 +79117,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -99415,7 +79151,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -99473,7 +79209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -99501,7 +79237,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -99531,7 +79267,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -99541,7 +79277,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -99573,7 +79309,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -99597,7 +79333,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -99607,7 +79343,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -99653,7 +79389,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -99669,7 +79405,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -99687,7 +79423,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -99701,7 +79437,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -99737,7 +79473,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -99771,7 +79507,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -99824,7 +79560,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -99866,7 +79602,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -99892,7 +79628,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -99918,7 +79654,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -99948,7 +79684,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -99971,84 +79707,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -100086,7 +79756,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Output Item Done Event -- `ResponseOutputItemDoneEvent = object { item, output_index, sequence_number, type }` +- `ResponseOutputItemDoneEvent object { item, output_index, sequence_number, type }` Emitted when an output item is marked done. @@ -100094,7 +79764,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The output item that was marked done. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -100106,7 +79776,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -100114,7 +79784,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -100136,7 +79806,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -100162,7 +79832,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -100192,7 +79862,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -100236,7 +79906,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -100283,7 +79953,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -100351,7 +80021,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -100393,7 +80063,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -100416,7 +80086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -100430,7 +80100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -100460,7 +80130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -100515,7 +80185,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -100529,7 +80199,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -100561,7 +80231,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -100575,7 +80245,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -100611,7 +80281,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -100661,7 +80331,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -100697,7 +80367,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -100719,7 +80389,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -100752,7 +80422,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -100766,7 +80436,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -100788,7 +80458,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -100798,7 +80468,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -100828,7 +80498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -100842,7 +80512,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -100857,198 +80527,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -101117,7 +80632,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -101178,7 +80693,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -101220,7 +80735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -101252,7 +80767,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -101282,7 +80797,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -101300,7 +80815,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -101353,7 +80868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -101361,59 +80876,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -101456,7 +80922,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -101466,7 +80932,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -101498,7 +80964,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -101558,7 +81024,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -101581,7 +81047,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -101647,7 +81113,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -101700,7 +81166,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -101714,7 +81180,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -101744,7 +81210,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -101752,7 +81218,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -101786,7 +81252,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -101907,7 +81373,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -101917,7 +81383,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -101929,7 +81395,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -101957,47 +81423,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -102013,7 +81447,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -102049,7 +81483,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -102073,7 +81507,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -102085,7 +81519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -102111,7 +81545,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -102121,7 +81555,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -102143,7 +81577,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -102159,7 +81593,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -102177,7 +81611,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -102203,45 +81637,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -102267,7 +81669,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -102321,7 +81723,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -102341,7 +81743,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -102363,7 +81765,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -102393,7 +81795,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -102414,7 +81816,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -102428,7 +81830,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -102462,7 +81864,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -102520,7 +81922,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -102548,7 +81950,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -102578,7 +81980,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -102588,7 +81990,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -102620,7 +82022,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -102644,7 +82046,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -102654,7 +82056,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -102700,7 +82102,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -102716,7 +82118,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -102734,7 +82136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -102748,7 +82150,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -102784,7 +82186,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -102818,7 +82220,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -102871,7 +82273,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -102913,7 +82315,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -102939,7 +82341,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -102965,7 +82367,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -102995,7 +82397,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -103018,88 +82420,221 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. - - `text: string` + - `ResponseInputImage object { detail, type, file_id, image_url }` - The text input to the model. + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `type: "input_text"` + - `ResponseInputFile object { type, detail, file_data, 3 more }` - The type of the input item. Always `input_text`. + A file input to the model. - - `"input_text"` + - `status: "in_progress" or "completed" or "incomplete"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. - An image input to the model. Learn about [image inputs](/docs/guides/vision). + - `"in_progress"` - - `detail: "low" or "high" or "auto" or "original"` + - `"completed"` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + - `"incomplete"` - - `"low"` + - `type: "custom_tool_call_output"` - - `"high"` + The type of the custom tool call output. Always `custom_tool_call_output`. - - `"auto"` + - `"custom_tool_call_output"` - - `"original"` + - `created_by: optional string` - - `type: "input_image"` + The identifier of the actor that created the item. - The type of the input item. Always `input_image`. + - `output_index: number` - - `"input_image"` + The index of the output item that was marked done. - - `file_id: optional string` + - `sequence_number: number` - The ID of the file to be sent to the model. + The sequence number of this event. - - `image_url: optional string` + - `type: "response.output_item.done"` - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + The type of the event. Always `response.output_item.done`. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `"response.output_item.done"` - A file input to the model. +### Response Output Message - - `type: "input_file"` +- `ResponseOutputMessage object { id, content, role, 3 more }` - The type of the input item. Always `input_file`. + An output message from the model. - - `"input_file"` + - `id: string` - - `detail: optional "low" or "high"` + The unique ID of the output message. - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + - `content: array of ResponseOutputText or ResponseOutputRefusal` - - `"low"` + The content of the output message. - - `"high"` + - `ResponseOutputText object { annotations, logprobs, text, type }` - - `file_data: optional string` + A text output from the model. - The content of the file to be sent to 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 }` - - `file_id: optional string` + The annotations of the text output. - The ID of the file to be sent to the model. + - `FileCitation object { file_id, filename, index, type }` - - `file_url: optional string` + A citation to a file. - The URL of the file to be sent to the model. + - `file_id: string` - - `filename: optional string` + The ID of the file. - The name of the file to be sent to the model. + - `filename: string` + + The filename of the file cited. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_citation"` + + The type of the file citation. Always `file_citation`. + + - `"file_citation"` + + - `URLCitation object { end_index, start_index, title, 2 more }` + + A citation for a web resource used to generate a model response. + + - `end_index: number` + + The index of the last character of the URL citation in the message. + + - `start_index: number` + + The index of the first character of the URL citation in the message. + + - `title: string` + + The title of the web resource. + + - `type: "url_citation"` + + The type of the URL citation. Always `url_citation`. + + - `"url_citation"` + + - `url: string` + + The URL of the web resource. + + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` + + A citation for a container file used to generate a model response. + + - `container_id: string` + + The ID of the container file. + + - `end_index: number` + + The index of the last character of the container file citation in the message. + + - `file_id: string` + + The ID of the file. + + - `filename: string` + + The filename of the container file cited. + + - `start_index: number` + + The index of the first character of the container file citation in the message. + + - `type: "container_file_citation"` + + The type of the container file citation. Always `container_file_citation`. + + - `"container_file_citation"` + + - `FilePath object { file_id, index, type }` + + A path to a file. + + - `file_id: string` + + The ID of the file. + + - `index: number` + + The index of the file in the list of files. + + - `type: "file_path"` + + The type of the file path. Always `file_path`. + + - `"file_path"` + + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + + - `top_logprobs: array of object { token, bytes, logprob }` + + - `token: string` + + - `bytes: array of number` + + - `logprob: number` + + - `text: string` + + The text output from the model. + + - `type: "output_text"` + + The type of the output text. Always `output_text`. + + - `"output_text"` + + - `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 item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. - `"in_progress"` @@ -103107,45 +82642,41 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `type: "custom_tool_call_output"` - - The type of the custom tool call output. Always `custom_tool_call_output`. - - - `"custom_tool_call_output"` - - - `created_by: optional string` + - `type: "message"` - The identifier of the actor that created the item. + The type of the output message. Always `message`. - - `output_index: number` + - `"message"` - The index of the output item that was marked done. + - `phase: optional "commentary" or "final_answer"` - - `sequence_number: number` + 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. - The sequence number of this event. + - `"commentary"` - - `type: "response.output_item.done"` + - `"final_answer"` - The type of the event. Always `response.output_item.done`. +### Response Output Refusal - - `"response.output_item.done"` +- `ResponseOutputRefusal object { refusal, type }` -### Response Output Message + A refusal from the model. -- `ResponseOutputMessage = object { id, content, role, 3 more }` + - `refusal: string` - An output message from the model. + The refusal explanation from the model. - - `id: string` + - `type: "refusal"` - The unique ID of the output message. + The type of the refusal. Always `refusal`. - - `content: array of ResponseOutputText or ResponseOutputRefusal` + - `"refusal"` - The content of the output message. +### Response Output Text - - `ResponseOutputText = object { annotations, logprobs, text, type }` +- `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -103153,7 +82684,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -103175,7 +82706,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -103201,7 +82732,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -103231,202 +82762,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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"` - -### Response Output Refusal - -- `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"` - -### Response Output Text - -- `ResponseOutputText = object { annotations, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -103472,7 +82808,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Output Text Annotation Added Event -- `ResponseOutputTextAnnotationAddedEvent = object { annotation, annotation_index, content_index, 4 more }` +- `ResponseOutputTextAnnotationAddedEvent object { annotation, annotation_index, content_index, 4 more }` Emitted when an annotation is added to output text content. @@ -103508,7 +82844,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Prompt -- `ResponsePrompt = object { id, variables, version }` +- `ResponsePrompt object { id, variables, version }` Reference to a prompt template and its variables. [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). @@ -103525,7 +82861,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -103539,7 +82875,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -103569,7 +82905,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -103609,7 +82945,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Queued Event -- `ResponseQueuedEvent = object { response, sequence_number, type }` +- `ResponseQueuedEvent object { response, sequence_number, type }` Emitted when a response is queued and waiting to be processed. @@ -103703,7 +83039,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -103725,7 +83061,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -103739,7 +83075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -103769,7 +83105,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -103832,7 +83168,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -103843,84 +83179,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -103948,7 +83206,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -103960,7 +83218,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -103968,7 +83226,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -103990,7 +83248,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -104016,7 +83274,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -104046,7 +83304,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -104090,7 +83348,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -104137,7 +83395,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -104205,7 +83463,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -104255,7 +83513,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -104291,7 +83549,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -104313,7 +83571,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -104346,7 +83604,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -104360,7 +83618,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -104382,7 +83640,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -104392,7 +83650,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -104422,7 +83680,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -104436,7 +83694,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -104451,198 +83709,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -104705,7 +83808,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -104719,7 +83822,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -104751,7 +83854,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -104765,7 +83868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -104801,7 +83904,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -104843,7 +83946,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -104863,7 +83966,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -104877,7 +83980,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -104907,7 +84010,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -104961,7 +84064,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -104999,13 +84102,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -105035,7 +84138,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -105053,7 +84156,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -105106,7 +84209,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -105114,59 +84217,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -105209,7 +84263,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -105219,7 +84273,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -105251,7 +84305,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -105311,7 +84365,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -105334,7 +84388,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -105400,7 +84454,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -105453,7 +84507,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -105467,7 +84521,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -105497,7 +84551,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -105505,7 +84559,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -105539,7 +84593,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -105660,7 +84714,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -105670,7 +84724,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -105682,7 +84736,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -105710,47 +84764,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -105766,7 +84788,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -105802,7 +84824,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -105826,7 +84848,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -105838,7 +84860,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -105864,7 +84886,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -105874,7 +84896,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -105896,7 +84918,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -105912,7 +84934,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -105930,7 +84952,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -105956,45 +84978,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -106020,7 +85010,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -106074,7 +85064,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -106116,7 +85106,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -106177,7 +85167,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -106195,7 +85185,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -106225,7 +85215,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -106246,7 +85236,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -106260,7 +85250,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -106294,7 +85284,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -106352,7 +85342,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -106380,7 +85370,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -106418,41 +85408,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -106464,7 +85422,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -106480,7 +85438,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -106490,7 +85448,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -106536,7 +85494,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -106548,7 +85506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -106566,7 +85524,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -106580,7 +85538,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -106616,7 +85574,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -106646,7 +85604,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -106688,7 +85646,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -106714,7 +85672,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -106740,7 +85698,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -106793,7 +85751,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -106814,84 +85772,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -106902,7 +85794,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -106932,7 +85824,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -107169,196 +86061,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -107426,7 +86133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -107468,7 +86175,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -107491,84 +86198,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -107590,7 +86231,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -107604,7 +86245,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -107636,7 +86277,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -107650,7 +86291,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -107686,7 +86327,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -107736,394 +86377,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -108137,21 +86396,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -108192,7 +86436,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -108215,8 +86459,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`. @@ -108253,7 +86495,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -108295,7 +86537,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -108327,7 +86569,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -108357,7 +86599,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -108375,130 +86617,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -108531,7 +86657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -108541,7 +86667,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -108573,7 +86699,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -108633,7 +86759,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -108656,7 +86782,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -108722,7 +86848,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -108775,7 +86901,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -108789,7 +86915,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -108819,41 +86945,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -108861,7 +86955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -108982,7 +87076,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -108992,7 +87086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -109004,163 +87098,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -109186,39 +87130,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -109234,7 +87146,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -109252,7 +87164,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -109278,45 +87190,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -109342,7 +87222,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -109396,7 +87276,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -109416,7 +87296,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -109438,7 +87318,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -109468,7 +87348,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -109489,7 +87369,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -109503,7 +87383,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -109537,7 +87417,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -109595,7 +87475,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -109623,7 +87503,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -109653,7 +87533,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -109663,7 +87543,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -109695,7 +87575,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -109719,7 +87599,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -109729,7 +87609,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -109775,7 +87655,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -109791,7 +87671,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -109809,7 +87689,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -109823,7 +87703,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -109859,7 +87739,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -109893,7 +87773,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -109946,7 +87826,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -109988,7 +87868,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -110014,7 +87894,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -110040,7 +87920,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -110070,7 +87950,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -110093,84 +87973,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -110224,7 +88038,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -110261,7 +88075,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -110297,7 +88111,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -110311,7 +88125,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -110329,7 +88143,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -110343,7 +88157,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -110353,7 +88167,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -110383,7 +88197,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -110413,7 +88227,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -110431,130 +88245,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -110587,7 +88285,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -110597,7 +88295,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -110629,7 +88327,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -110689,7 +88387,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -110712,7 +88410,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -110778,7 +88476,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -110831,7 +88529,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -110845,7 +88543,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -110875,41 +88573,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -110917,7 +88583,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -111038,7 +88704,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -111048,7 +88714,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -111060,163 +88726,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -111242,137 +88818,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -111398,7 +88850,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -111452,7 +88904,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -111526,84 +88978,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -111747,7 +89133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -111757,7 +89143,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -111791,7 +89177,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -111887,7 +89273,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Reasoning Summary Part Added Event -- `ResponseReasoningSummaryPartAddedEvent = object { item_id, output_index, part, 3 more }` +- `ResponseReasoningSummaryPartAddedEvent object { item_id, output_index, part, 3 more }` Emitted when a new reasoning summary part is added. @@ -111929,7 +89315,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Reasoning Summary Part Done Event -- `ResponseReasoningSummaryPartDoneEvent = object { item_id, output_index, part, 3 more }` +- `ResponseReasoningSummaryPartDoneEvent object { item_id, output_index, part, 3 more }` Emitted when a reasoning summary part is completed. @@ -111971,7 +89357,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Reasoning Summary Text Delta Event -- `ResponseReasoningSummaryTextDeltaEvent = object { delta, item_id, output_index, 3 more }` +- `ResponseReasoningSummaryTextDeltaEvent object { delta, item_id, output_index, 3 more }` Emitted when a delta is added to a reasoning summary text. @@ -112003,7 +89389,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Reasoning Summary Text Done Event -- `ResponseReasoningSummaryTextDoneEvent = object { item_id, output_index, sequence_number, 3 more }` +- `ResponseReasoningSummaryTextDoneEvent object { item_id, output_index, sequence_number, 3 more }` Emitted when a reasoning summary text is completed. @@ -112035,7 +89421,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Reasoning Text Delta Event -- `ResponseReasoningTextDeltaEvent = object { content_index, delta, item_id, 3 more }` +- `ResponseReasoningTextDeltaEvent object { content_index, delta, item_id, 3 more }` Emitted when a delta is added to a reasoning text. @@ -112067,7 +89453,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Reasoning Text Done Event -- `ResponseReasoningTextDoneEvent = object { content_index, item_id, output_index, 3 more }` +- `ResponseReasoningTextDoneEvent object { content_index, item_id, output_index, 3 more }` Emitted when a reasoning text is completed. @@ -112099,7 +89485,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Refusal Delta Event -- `ResponseRefusalDeltaEvent = object { content_index, delta, item_id, 3 more }` +- `ResponseRefusalDeltaEvent object { content_index, delta, item_id, 3 more }` Emitted when there is a partial refusal text. @@ -112131,7 +89517,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Response Refusal Done Event -- `ResponseRefusalDoneEvent = object { content_index, item_id, output_index, 3 more }` +- `ResponseRefusalDoneEvent object { content_index, item_id, output_index, 3 more }` Emitted when refusal text is finalized. @@ -112186,7 +89572,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Emitted when there is a partial audio response. - - `ResponseAudioDeltaEvent = object { delta, sequence_number, type }` + - `ResponseAudioDeltaEvent object { delta, sequence_number, type }` Emitted when there is a partial audio response. @@ -112204,7 +89590,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.audio.delta"` - - `ResponseAudioDoneEvent = object { sequence_number, type }` + - `ResponseAudioDoneEvent object { sequence_number, type }` Emitted when the audio response is complete. @@ -112218,7 +89604,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.audio.done"` - - `ResponseAudioTranscriptDeltaEvent = object { delta, sequence_number, type }` + - `ResponseAudioTranscriptDeltaEvent object { delta, sequence_number, type }` Emitted when there is a partial transcript of audio. @@ -112236,7 +89622,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.audio.transcript.delta"` - - `ResponseAudioTranscriptDoneEvent = object { sequence_number, type }` + - `ResponseAudioTranscriptDoneEvent object { sequence_number, type }` Emitted when the full audio transcript is completed. @@ -112250,7 +89636,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.audio.transcript.done"` - - `ResponseCodeInterpreterCallCodeDeltaEvent = object { delta, item_id, output_index, 2 more }` + - `ResponseCodeInterpreterCallCodeDeltaEvent object { delta, item_id, output_index, 2 more }` Emitted when a partial code snippet is streamed by the code interpreter. @@ -112276,7 +89662,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.code_interpreter_call_code.delta"` - - `ResponseCodeInterpreterCallCodeDoneEvent = object { code, item_id, output_index, 2 more }` + - `ResponseCodeInterpreterCallCodeDoneEvent object { code, item_id, output_index, 2 more }` Emitted when the code snippet is finalized by the code interpreter. @@ -112302,7 +89688,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.code_interpreter_call_code.done"` - - `ResponseCodeInterpreterCallCompletedEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallCompletedEvent object { item_id, output_index, sequence_number, type }` Emitted when the code interpreter call is completed. @@ -112324,7 +89710,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.code_interpreter_call.completed"` - - `ResponseCodeInterpreterCallInProgressEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallInProgressEvent object { item_id, output_index, sequence_number, type }` Emitted when a code interpreter call is in progress. @@ -112346,7 +89732,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.code_interpreter_call.in_progress"` - - `ResponseCodeInterpreterCallInterpretingEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallInterpretingEvent object { item_id, output_index, sequence_number, type }` Emitted when the code interpreter is actively interpreting the code snippet. @@ -112368,7 +89754,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.code_interpreter_call.interpreting"` - - `ResponseCompletedEvent = object { response, sequence_number, type }` + - `ResponseCompletedEvent object { response, sequence_number, type }` Emitted when the model response is complete. @@ -112462,7 +89848,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -112484,7 +89870,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -112498,7 +89884,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -112528,7 +89914,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -112591,7 +89977,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -112602,84 +89988,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -112707,7 +90015,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -112719,7 +90027,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -112727,7 +90035,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -112749,7 +90057,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -112775,7 +90083,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -112805,7 +90113,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -112849,7 +90157,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -112896,7 +90204,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -112964,7 +90272,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -113014,7 +90322,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -113050,7 +90358,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -113072,7 +90380,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -113105,7 +90413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -113119,7 +90427,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -113141,7 +90449,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -113151,7 +90459,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -113181,7 +90489,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -113195,7 +90503,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -113210,198 +90518,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -113464,7 +90617,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -113478,7 +90631,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -113510,7 +90663,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -113524,7 +90677,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -113560,7 +90713,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -113602,7 +90755,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -113622,7 +90775,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -113636,7 +90789,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -113666,7 +90819,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -113720,7 +90873,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -113758,13 +90911,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -113794,7 +90947,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -113812,7 +90965,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -113865,7 +91018,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -113873,59 +91026,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -113968,7 +91072,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -113978,7 +91082,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -114010,7 +91114,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -114070,7 +91174,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -114093,7 +91197,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -114159,7 +91263,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -114212,7 +91316,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -114226,7 +91330,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -114256,7 +91360,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -114264,7 +91368,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -114298,7 +91402,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -114419,7 +91523,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -114429,7 +91533,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -114441,7 +91545,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -114469,47 +91573,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -114525,7 +91597,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -114561,7 +91633,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -114585,7 +91657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -114597,7 +91669,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -114623,7 +91695,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -114633,7 +91705,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -114655,7 +91727,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -114671,7 +91743,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -114689,7 +91761,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -114715,45 +91787,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -114779,7 +91819,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -114833,7 +91873,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -114875,7 +91915,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -114936,7 +91976,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -114954,7 +91994,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -114984,7 +92024,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -115005,7 +92045,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -115019,7 +92059,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -115053,7 +92093,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -115111,7 +92151,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -115139,7 +92179,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -115177,41 +92217,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` + - `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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -115223,7 +92231,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -115239,7 +92247,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -115249,7 +92257,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -115295,7 +92303,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -115307,7 +92315,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -115325,7 +92333,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -115339,7 +92347,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -115375,7 +92383,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -115405,7 +92413,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -115447,7 +92455,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -115473,7 +92481,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -115499,7 +92507,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -115552,7 +92560,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -115573,84 +92581,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -115661,7 +92603,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -115691,7 +92633,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -115928,196 +92870,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -116185,7 +92942,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -116227,7 +92984,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -116250,84 +93007,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -116349,7 +93040,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -116363,7 +93054,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -116395,7 +93086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -116409,7 +93100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -116445,7 +93136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -116495,394 +93186,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -116896,21 +93205,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -116951,7 +93245,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -116974,8 +93268,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`. @@ -117012,7 +93304,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -117054,7 +93346,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -117086,7 +93378,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -117116,7 +93408,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -117134,130 +93426,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -117290,7 +93466,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -117300,7 +93476,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -117332,7 +93508,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -117392,7 +93568,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -117415,7 +93591,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -117481,7 +93657,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -117534,7 +93710,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -117548,7 +93724,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -117578,41 +93754,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -117620,7 +93764,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -117741,7 +93885,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -117751,7 +93895,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -117763,163 +93907,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `path: string` + - `LocalEnvironment object { type, skills }` - The path to the directory containing the skill. + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -117945,39 +93939,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -117993,7 +93955,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -118011,7 +93973,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -118037,45 +93999,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -118101,7 +94031,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -118155,7 +94085,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -118175,7 +94105,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -118197,7 +94127,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -118227,7 +94157,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -118248,7 +94178,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -118262,7 +94192,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -118296,7 +94226,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -118354,7 +94284,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -118382,7 +94312,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -118412,7 +94342,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -118422,7 +94352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -118454,7 +94384,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -118478,7 +94408,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -118488,7 +94418,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -118534,7 +94464,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -118550,7 +94480,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -118568,7 +94498,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -118582,7 +94512,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -118618,7 +94548,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -118652,7 +94582,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -118705,7 +94635,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -118747,7 +94677,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -118773,7 +94703,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -118799,7 +94729,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -118829,7 +94759,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -118852,84 +94782,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -118983,7 +94847,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -119020,7 +94884,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -119056,7 +94920,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -119070,7 +94934,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -119088,7 +94952,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -119102,7 +94966,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -119112,7 +94976,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -119142,7 +95006,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ [function calling](/docs/guides/function-calling). You can also use custom tools to call your own code. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -119172,7 +95036,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -119190,130 +95054,14 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -119346,7 +95094,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -119356,7 +95104,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -119388,7 +95136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -119448,7 +95196,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -119471,7 +95219,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -119537,7 +95285,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -119590,7 +95338,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -119604,7 +95352,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -119634,41 +95382,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `value: string` - - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -119676,7 +95392,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -119797,7 +95513,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -119807,7 +95523,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -119819,163 +95535,73 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `type: "container_auto"` + - `LocalEnvironment object { type, skills }` - Automatically creates a container for this request + - `ContainerReference object { container_id, type }` - - `"container_auto"` - - - `file_ids: optional array of string` + - `Custom object { name, type, defer_loading, 2 more }` - 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 }` - - - `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. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - `name: string` - The name of the secret to inject for the domain. - - - `value: string` - - The secret value to inject for the domain. + The name of the custom tool, used to identify it in tool calls. - - `skills: optional array of SkillReference or InlineSkill` + - `type: "custom"` - An optional list of skills referenced by id or inline data. + The type of the custom tool. Always `custom`. - - `SkillReference = object { skill_id, type, version }` + - `"custom"` - - `skill_id: string` + - `defer_loading: optional boolean` - The ID of the referenced skill. + Whether this tool should be deferred and discovered via tool search. - - `type: "skill_reference"` + - `description: optional string` - References a skill created with the /v1/skills endpoint. + Optional description of the custom tool, used to provide more context. - - `"skill_reference"` + - `format: optional CustomToolInputFormat` - - `version: optional string` + The input format for the custom tool. Default is unconstrained text. - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `Namespace object { description, name, tools, type }` - - `InlineSkill = object { description, name, source, type }` + Groups function/custom tools under a shared namespace. - `description: string` - The description of the skill. + A description of the namespace shown to the model. - `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` + The namespace name used in tool calls (for example, `crm`). - An optional list of skills. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `description: string` + The function/custom tools available inside this namespace. - The description of the skill. + - `Function object { name, type, defer_loading, 3 more }` - `name: string` - The name of the skill. - - - `path: string` - - The path to the directory containing the skill. + - `type: "function"` - - `ContainerReference = object { container_id, type }` + - `"function"` - - `container_id: string` + - `defer_loading: optional boolean` - The ID of the referenced container. + Whether this function should be deferred and discovered via tool search. - - `type: "container_reference"` + - `description: optional string` - References a container created with the /v1/containers endpoint + - `parameters: optional unknown` - - `"container_reference"` + - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -120001,137 +95627,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -120157,7 +95659,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -120211,7 +95713,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -120285,84 +95787,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `string` - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `version: optional string` Optional version of the prompt template. @@ -120506,7 +95942,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -120516,7 +95952,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -120550,7 +95986,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -120644,7 +96080,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.completed"` - - `ResponseContentPartAddedEvent = object { content_index, item_id, output_index, 3 more }` + - `ResponseContentPartAddedEvent object { content_index, item_id, output_index, 3 more }` Emitted when a new content part is added. @@ -120664,1617 +96100,1699 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content part that was added. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` + - `ResponseOutputRefusal object { refusal, type }` - The annotations of the text output. + A refusal from the model. - - `FileCitation = object { file_id, filename, index, type }` + - `ReasoningText object { text, type }` - A citation to a file. + Reasoning text from the model. - - `file_id: string` + - `text: string` - The ID of the file. + The reasoning text from the model. - - `filename: string` + - `type: "reasoning_text"` - The filename of the file cited. + The type of the reasoning text. Always `reasoning_text`. - - `index: number` + - `"reasoning_text"` - The index of the file in the list of files. + - `sequence_number: number` - - `type: "file_citation"` + The sequence number of this event. - The type of the file citation. Always `file_citation`. + - `type: "response.content_part.added"` - - `"file_citation"` + The type of the event. Always `response.content_part.added`. - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `"response.content_part.added"` - A citation for a web resource used to generate a model response. + - `ResponseContentPartDoneEvent object { content_index, item_id, output_index, 3 more }` - - `end_index: number` + Emitted when a content part is done. - The index of the last character of the URL citation in the message. + - `content_index: number` - - `start_index: number` + The index of the content part that is done. - The index of the first character of the URL citation in the message. + - `item_id: string` - - `title: string` + The ID of the output item that the content part was added to. - The title of the web resource. + - `output_index: number` - - `type: "url_citation"` + The index of the output item that the content part was added to. - The type of the URL citation. Always `url_citation`. + - `part: ResponseOutputText or ResponseOutputRefusal or object { text, type }` - - `"url_citation"` + The content part that is done. - - `url: string` + - `ResponseOutputText object { annotations, logprobs, text, type }` - The URL of the web resource. + A text output from the model. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ResponseOutputRefusal object { refusal, type }` - A citation for a container file used to generate a model response. + A refusal from the model. - - `container_id: string` + - `ReasoningText object { text, type }` - The ID of the container file. + Reasoning text from the model. - - `end_index: number` + - `text: string` - The index of the last character of the container file citation in the message. + The reasoning text from the model. - - `file_id: string` + - `type: "reasoning_text"` - The ID of the file. + The type of the reasoning text. Always `reasoning_text`. - - `filename: string` + - `"reasoning_text"` - The filename of the container file cited. + - `sequence_number: number` - - `start_index: number` + The sequence number of this event. - The index of the first character of the container file citation in the message. + - `type: "response.content_part.done"` - - `type: "container_file_citation"` + The type of the event. Always `response.content_part.done`. - The type of the container file citation. Always `container_file_citation`. + - `"response.content_part.done"` - - `"container_file_citation"` + - `ResponseCreatedEvent object { response, sequence_number, type }` + + An event that is emitted when a response is created. - - `FilePath = object { file_id, index, type }` + - `response: Response` - A path to a file. + The response that was created. - - `file_id: string` + - `sequence_number: number` - The ID of the file. + The sequence number for this event. - - `index: number` + - `type: "response.created"` - The index of the file in the list of files. + The type of the event. Always `response.created`. - - `type: "file_path"` + - `"response.created"` - The type of the file path. Always `file_path`. + - `ResponseErrorEvent object { code, message, param, 2 more }` - - `"file_path"` + Emitted when an error occurs. - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `code: string` - - `token: string` + The error code. - - `bytes: array of number` + - `message: string` - - `logprob: number` + The error message. - - `top_logprobs: array of object { token, bytes, logprob }` + - `param: string` - - `token: string` + The error parameter. - - `bytes: array of number` + - `sequence_number: number` - - `logprob: number` + The sequence number of this event. - - `text: string` + - `type: "error"` - The text output from the model. + The type of the event. Always `error`. - - `type: "output_text"` + - `"error"` - The type of the output text. Always `output_text`. + - `ResponseFileSearchCallCompletedEvent object { item_id, output_index, sequence_number, type }` - - `"output_text"` + Emitted when a file search call is completed (results found). - - `ResponseOutputRefusal = object { refusal, type }` + - `item_id: string` - A refusal from the model. + The ID of the output item that the file search call is initiated. - - `refusal: string` + - `output_index: number` - The refusal explanation from the model. + The index of the output item that the file search call is initiated. - - `type: "refusal"` + - `sequence_number: number` - The type of the refusal. Always `refusal`. + The sequence number of this event. - - `"refusal"` + - `type: "response.file_search_call.completed"` - - `ReasoningText = object { text, type }` + The type of the event. Always `response.file_search_call.completed`. - Reasoning text from the model. + - `"response.file_search_call.completed"` - - `text: string` + - `ResponseFileSearchCallInProgressEvent object { item_id, output_index, sequence_number, type }` - The reasoning text from the model. + Emitted when a file search call is initiated. - - `type: "reasoning_text"` + - `item_id: string` - The type of the reasoning text. Always `reasoning_text`. + The ID of the output item that the file search call is initiated. - - `"reasoning_text"` + - `output_index: number` + + The index of the output item that the file search call is initiated. - `sequence_number: number` The sequence number of this event. - - `type: "response.content_part.added"` - - The type of the event. Always `response.content_part.added`. - - - `"response.content_part.added"` + - `type: "response.file_search_call.in_progress"` - - `ResponseContentPartDoneEvent = object { content_index, item_id, output_index, 3 more }` + The type of the event. Always `response.file_search_call.in_progress`. - Emitted when a content part is done. + - `"response.file_search_call.in_progress"` - - `content_index: number` + - `ResponseFileSearchCallSearchingEvent object { item_id, output_index, sequence_number, type }` - The index of the content part that is done. + Emitted when a file search is currently searching. - `item_id: string` - The ID of the output item that the content part was added to. + The ID of the output item that the file search call is initiated. - `output_index: number` - The index of the output item that the content part was added to. + The index of the output item that the file search call is searching. - - `part: ResponseOutputText or ResponseOutputRefusal or object { text, type }` + - `sequence_number: number` - The content part that is done. + The sequence number of this event. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `type: "response.file_search_call.searching"` - A text output from the model. + The type of the event. Always `response.file_search_call.searching`. - - `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 }` + - `"response.file_search_call.searching"` - The annotations of the text output. + - `ResponseFunctionCallArgumentsDeltaEvent object { delta, item_id, output_index, 2 more }` - - `FileCitation = object { file_id, filename, index, type }` + Emitted when there is a partial function-call arguments delta. - A citation to a file. + - `delta: string` - - `file_id: string` + The function-call arguments delta that is added. - The ID of the file. + - `item_id: string` - - `filename: string` + The ID of the output item that the function-call arguments delta is added to. - The filename of the file cited. + - `output_index: number` - - `index: number` + The index of the output item that the function-call arguments delta is added to. - The index of the file in the list of files. + - `sequence_number: number` - - `type: "file_citation"` + The sequence number of this event. - The type of the file citation. Always `file_citation`. + - `type: "response.function_call_arguments.delta"` - - `"file_citation"` + The type of the event. Always `response.function_call_arguments.delta`. - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `"response.function_call_arguments.delta"` - A citation for a web resource used to generate a model response. + - `ResponseFunctionCallArgumentsDoneEvent object { arguments, item_id, name, 3 more }` - - `end_index: number` + Emitted when function-call arguments are finalized. - The index of the last character of the URL citation in the message. + - `arguments: string` - - `start_index: number` + The function-call arguments. - The index of the first character of the URL citation in the message. + - `item_id: string` - - `title: string` + The ID of the item. - The title of the web resource. + - `name: string` - - `type: "url_citation"` + The name of the function that was called. - The type of the URL citation. Always `url_citation`. + - `output_index: number` - - `"url_citation"` + The index of the output item. - - `url: string` + - `sequence_number: number` - The URL of the web resource. + The sequence number of this event. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `type: "response.function_call_arguments.done"` - A citation for a container file used to generate a model response. + - `"response.function_call_arguments.done"` - - `container_id: string` + - `ResponseInProgressEvent object { response, sequence_number, type }` - The ID of the container file. + Emitted when the response is in progress. - - `end_index: number` + - `response: Response` - The index of the last character of the container file citation in the message. + The response that is in progress. - - `file_id: string` + - `sequence_number: number` - The ID of the file. + The sequence number of this event. - - `filename: string` + - `type: "response.in_progress"` - The filename of the container file cited. + The type of the event. Always `response.in_progress`. - - `start_index: number` + - `"response.in_progress"` - The index of the first character of the container file citation in the message. + - `ResponseFailedEvent object { response, sequence_number, type }` - - `type: "container_file_citation"` + An event that is emitted when a response fails. - The type of the container file citation. Always `container_file_citation`. + - `response: Response` - - `"container_file_citation"` + The response that failed. - - `FilePath = object { file_id, index, type }` + - `sequence_number: number` - A path to a file. + The sequence number of this event. - - `file_id: string` + - `type: "response.failed"` - The ID of the file. + The type of the event. Always `response.failed`. - - `index: number` + - `"response.failed"` - The index of the file in the list of files. + - `ResponseIncompleteEvent object { response, sequence_number, type }` - - `type: "file_path"` + An event that is emitted when a response finishes as incomplete. - The type of the file path. Always `file_path`. + - `response: Response` - - `"file_path"` + The response that was incomplete. - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `sequence_number: number` - - `token: string` + The sequence number of this event. - - `bytes: array of number` + - `type: "response.incomplete"` - - `logprob: number` + The type of the event. Always `response.incomplete`. - - `top_logprobs: array of object { token, bytes, logprob }` + - `"response.incomplete"` - - `token: string` + - `ResponseOutputItemAddedEvent object { item, output_index, sequence_number, type }` - - `bytes: array of number` + Emitted when a new output item is added. - - `logprob: number` + - `item: ResponseOutputItem` - - `text: string` + The output item that was added. - The text output from the model. + - `ResponseOutputMessage object { id, content, role, 3 more }` - - `type: "output_text"` + An output message from the model. - The type of the output text. Always `output_text`. + - `FileSearchCall object { id, queries, status, 2 more }` - - `"output_text"` + The results of a file search tool call. See the + [file search guide](/docs/guides/tools-file-search) for more information. - - `ResponseOutputRefusal = object { refusal, type }` + - `FunctionCall object { arguments, call_id, name, 4 more }` - A refusal from the model. + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. - - `refusal: string` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - The refusal explanation from the model. + - `WebSearchCall object { id, action, status, type }` - - `type: "refusal"` + The results of a web search tool call. See the + [web search guide](/docs/guides/tools-web-search) for more information. - The type of the refusal. Always `refusal`. + - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }` - - `"refusal"` + A tool call to a computer use tool. See the + [computer use guide](/docs/guides/tools-computer-use) for more information. - - `ReasoningText = object { text, type }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - Reasoning text from the model. + - `Reasoning object { id, summary, type, 3 more }` - - `text: 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](/docs/guides/conversation-state). - The reasoning text from the model. + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - - `type: "reasoning_text"` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - The type of the reasoning text. Always `reasoning_text`. + - `Compaction object { id, encrypted_content, type, created_by }` - - `"reasoning_text"` + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). - - `sequence_number: number` + - `ImageGenerationCall object { id, result, status, type }` - The sequence number of this event. + An image generation request made by the model. - - `type: "response.content_part.done"` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` - The type of the event. Always `response.content_part.done`. + A tool call to run code. - - `"response.content_part.done"` + - `LocalShellCall object { id, action, call_id, 2 more }` - - `ResponseCreatedEvent = object { response, sequence_number, type }` + A tool call to run a command on the local shell. - An event that is emitted when a response is created. + - `LocalShellCallOutput object { id, output, type, status }` - - `response: Response` + The output of a local shell tool call. - The response that was created. + - `ShellCall object { id, action, call_id, 4 more }` - - `id: string` + A tool call that executes one or more shell commands in a managed environment. - Unique identifier for this Response. + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` - - `created_at: number` + The output of a shell tool call that was emitted. - Unix timestamp (in seconds) of when this Response was created. + - `ApplyPatchCall object { id, call_id, operation, 3 more }` - - `error: ResponseError` + A tool call that applies file diffs by creating, deleting, or updating files. - An error object returned when the model fails to generate a Response. + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` + The output emitted by an apply patch tool call. - The error code for the response. + - `McpCall object { id, arguments, name, 6 more }` - - `"server_error"` + An invocation of a tool on an MCP server. - - `"rate_limit_exceeded"` + - `McpListTools object { id, server_label, tools, 2 more }` - - `"invalid_prompt"` + A list of tools available on an MCP server. - - `"vector_store_timeout"` + - `McpApprovalRequest object { id, arguments, name, 2 more }` - - `"invalid_image"` + A request for human approval of a tool invocation. - - `"invalid_image_format"` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` - - `"invalid_base64_image"` + A response to an MCP approval request. - - `"invalid_image_url"` + - `CustomToolCall object { call_id, input, name, 3 more }` - - `"image_too_large"` + A call to a custom tool created by the model. - - `"image_too_small"` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - - `"image_parse_error"` + - `output_index: number` - - `"image_content_policy_violation"` + The index of the output item that was added. - - `"invalid_image_mode"` + - `sequence_number: number` - - `"image_file_too_large"` + The sequence number of this event. - - `"unsupported_image_media_type"` + - `type: "response.output_item.added"` - - `"empty_image_file"` + The type of the event. Always `response.output_item.added`. - - `"failed_to_download_image"` + - `"response.output_item.added"` - - `"image_file_not_found"` + - `ResponseOutputItemDoneEvent object { item, output_index, sequence_number, type }` - - `message: string` + Emitted when an output item is marked done. - A human-readable description of the error. + - `item: ResponseOutputItem` - - `incomplete_details: object { reason }` + The output item that was marked done. - Details about why the response is incomplete. + - `output_index: number` - - `reason: optional "max_output_tokens" or "content_filter"` + The index of the output item that was marked done. - The reason why the response is incomplete. + - `sequence_number: number` - - `"max_output_tokens"` + The sequence number of this event. - - `"content_filter"` + - `type: "response.output_item.done"` - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` + The type of the event. Always `response.output_item.done`. - A system (or developer) message inserted into the model's context. + - `"response.output_item.done"` - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. + - `ResponseReasoningSummaryPartAddedEvent object { item_id, output_index, part, 3 more }` - - `string` + Emitted when a new reasoning summary part is added. - A text input to the model, equivalent to a text input with the - `developer` role. + - `item_id: string` - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` + The ID of the item this summary part is associated with. - A list of one or many input items to the model, containing - different content types. + - `output_index: number` - - `EasyInputMessage = object { content, role, phase, type }` + The index of the output item this summary part is associated with. - 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. + - `part: object { text, type }` - - `content: string or ResponseInputMessageContentList` + The summary part that was added. - Text, image, or audio input to the model, used to generate a response. - Can also contain previous assistant responses. + - `text: string` - - `TextInput = string` + The text of the summary part. - A text input to the model. + - `type: "summary_text"` - - `ResponseInputMessageContentList = array of ResponseInputContent` + The type of the summary part. Always `summary_text`. - A list of one or many input items to the model, containing different content - types. + - `"summary_text"` - - `ResponseInputText = object { text, type }` + - `sequence_number: number` - A text input to the model. + The sequence number of this event. - - `text: string` + - `summary_index: number` - The text input to the model. + The index of the summary part within the reasoning summary. - - `type: "input_text"` + - `type: "response.reasoning_summary_part.added"` - The type of the input item. Always `input_text`. + The type of the event. Always `response.reasoning_summary_part.added`. - - `"input_text"` + - `"response.reasoning_summary_part.added"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseReasoningSummaryPartDoneEvent object { item_id, output_index, part, 3 more }` - An image input to the model. Learn about [image inputs](/docs/guides/vision). + Emitted when a reasoning summary part is completed. - - `detail: "low" or "high" or "auto" or "original"` + - `item_id: string` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + The ID of the item this summary part is associated with. - - `"low"` + - `output_index: number` - - `"high"` + The index of the output item this summary part is associated with. - - `"auto"` + - `part: object { text, type }` - - `"original"` + The completed summary part. - - `type: "input_image"` + - `text: string` - The type of the input item. Always `input_image`. + The text of the summary part. - - `"input_image"` + - `type: "summary_text"` - - `file_id: optional string` + The type of the summary part. Always `summary_text`. - The ID of the file to be sent to the model. + - `"summary_text"` - - `image_url: optional string` + - `sequence_number: number` - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + The sequence number of this event. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `summary_index: number` - A file input to the model. + The index of the summary part within the reasoning summary. - - `type: "input_file"` + - `type: "response.reasoning_summary_part.done"` - The type of the input item. Always `input_file`. + The type of the event. Always `response.reasoning_summary_part.done`. - - `"input_file"` + - `"response.reasoning_summary_part.done"` - - `detail: optional "low" or "high"` + - `ResponseReasoningSummaryTextDeltaEvent object { delta, item_id, output_index, 3 more }` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + Emitted when a delta is added to a reasoning summary text. - - `"low"` + - `delta: string` - - `"high"` + The text delta that was added to the summary. - - `file_data: optional string` + - `item_id: string` - The content of the file to be sent to the model. + The ID of the item this summary text delta is associated with. - - `file_id: optional string` + - `output_index: number` - The ID of the file to be sent to the model. + The index of the output item this summary text delta is associated with. - - `file_url: optional string` + - `sequence_number: number` - The URL of the file to be sent to the model. + The sequence number of this event. - - `filename: optional string` + - `summary_index: number` - The name of the file to be sent to the model. + The index of the summary part within the reasoning summary. - - `role: "user" or "assistant" or "system" or "developer"` + - `type: "response.reasoning_summary_text.delta"` - The role of the message input. One of `user`, `assistant`, `system`, or - `developer`. + The type of the event. Always `response.reasoning_summary_text.delta`. - - `"user"` + - `"response.reasoning_summary_text.delta"` - - `"assistant"` + - `ResponseReasoningSummaryTextDoneEvent object { item_id, output_index, sequence_number, 3 more }` - - `"system"` + Emitted when a reasoning summary text is completed. - - `"developer"` + - `item_id: string` - - `phase: optional "commentary" or "final_answer"` + The ID of the item this summary text is associated with. - 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. + - `output_index: number` - - `"commentary"` + The index of the output item this summary text is associated with. - - `"final_answer"` + - `sequence_number: number` - - `type: optional "message"` + The sequence number of this event. - The type of the message input. Always `message`. + - `summary_index: number` - - `"message"` + The index of the summary part within the reasoning summary. - - `Message = object { content, role, status, type }` + - `text: string` - 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. + The full text of the completed reasoning summary. - - `content: ResponseInputMessageContentList` + - `type: "response.reasoning_summary_text.done"` - A list of one or many input items to the model, containing different content - types. + The type of the event. Always `response.reasoning_summary_text.done`. - - `ResponseInputText = object { text, type }` + - `"response.reasoning_summary_text.done"` - A text input to the model. + - `ResponseReasoningTextDeltaEvent object { content_index, delta, item_id, 3 more }` - - `text: string` + Emitted when a delta is added to a reasoning text. - The text input to the model. + - `content_index: number` - - `type: "input_text"` + The index of the reasoning content part this delta is associated with. - The type of the input item. Always `input_text`. + - `delta: string` - - `"input_text"` + The text delta that was added to the reasoning content. - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `item_id: string` - An image input to the model. Learn about [image inputs](/docs/guides/vision). + The ID of the item this reasoning text delta is associated with. - - `detail: "low" or "high" or "auto" or "original"` + - `output_index: number` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + The index of the output item this reasoning text delta is associated with. - - `"low"` + - `sequence_number: number` - - `"high"` + The sequence number of this event. - - `"auto"` + - `type: "response.reasoning_text.delta"` - - `"original"` + The type of the event. Always `response.reasoning_text.delta`. - - `type: "input_image"` + - `"response.reasoning_text.delta"` - The type of the input item. Always `input_image`. + - `ResponseReasoningTextDoneEvent object { content_index, item_id, output_index, 3 more }` - - `"input_image"` + Emitted when a reasoning text is completed. - - `file_id: optional string` + - `content_index: number` - The ID of the file to be sent to the model. + The index of the reasoning content part. - - `image_url: optional string` + - `item_id: 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 ID of the item this reasoning text is associated with. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `output_index: number` - A file input to the model. + The index of the output item this reasoning text is associated with. - - `type: "input_file"` + - `sequence_number: number` - The type of the input item. Always `input_file`. + The sequence number of this event. - - `"input_file"` + - `text: string` - - `detail: optional "low" or "high"` + The full text of the completed reasoning content. - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + - `type: "response.reasoning_text.done"` - - `"low"` + The type of the event. Always `response.reasoning_text.done`. - - `"high"` + - `"response.reasoning_text.done"` - - `file_data: optional string` + - `ResponseRefusalDeltaEvent object { content_index, delta, item_id, 3 more }` - The content of the file to be sent to the model. + Emitted when there is a partial refusal text. - - `file_id: optional string` + - `content_index: number` - The ID of the file to be sent to the model. + The index of the content part that the refusal text is added to. - - `file_url: optional string` + - `delta: string` - The URL of the file to be sent to the model. + The refusal text that is added. - - `filename: optional string` + - `item_id: string` - The name of the file to be sent to the model. + The ID of the output item that the refusal text is added to. - - `role: "user" or "system" or "developer"` + - `output_index: number` - The role of the message input. One of `user`, `system`, or `developer`. + The index of the output item that the refusal text is added to. - - `"user"` + - `sequence_number: number` - - `"system"` + The sequence number of this event. - - `"developer"` + - `type: "response.refusal.delta"` - - `status: optional "in_progress" or "completed" or "incomplete"` + The type of the event. Always `response.refusal.delta`. - The status of item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + - `"response.refusal.delta"` - - `"in_progress"` + - `ResponseRefusalDoneEvent object { content_index, item_id, output_index, 3 more }` - - `"completed"` + Emitted when refusal text is finalized. - - `"incomplete"` + - `content_index: number` - - `type: optional "message"` + The index of the content part that the refusal text is finalized. - The type of the message input. Always set to `message`. + - `item_id: string` - - `"message"` + The ID of the output item that the refusal text is finalized. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `output_index: number` - An output message from the model. + The index of the output item that the refusal text is finalized. - - `id: string` + - `refusal: string` - The unique ID of the output message. + The refusal text that is finalized. - - `content: array of ResponseOutputText or ResponseOutputRefusal` + - `sequence_number: number` - The content of the output message. + The sequence number of this event. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `type: "response.refusal.done"` - A text output from the model. + The type of the event. Always `response.refusal.done`. - - `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 }` + - `"response.refusal.done"` - The annotations of the text output. + - `ResponseTextDeltaEvent object { content_index, delta, item_id, 4 more }` - - `FileCitation = object { file_id, filename, index, type }` + Emitted when there is an additional text delta. - A citation to a file. + - `content_index: number` - - `file_id: string` + The index of the content part that the text delta was added to. - The ID of the file. + - `delta: string` - - `filename: string` + The text delta that was added. - The filename of the file cited. + - `item_id: string` - - `index: number` + The ID of the output item that the text delta was added to. - The index of the file in the list of files. + - `logprobs: array of object { token, logprob, top_logprobs }` - - `type: "file_citation"` + The log probabilities of the tokens in the delta. - The type of the file citation. Always `file_citation`. + - `token: string` - - `"file_citation"` + A possible text token. - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `logprob: number` - A citation for a web resource used to generate a model response. + The log probability of this token. - - `end_index: number` + - `top_logprobs: optional array of object { token, logprob }` - The index of the last character of the URL citation in the message. + The log probability of the top 20 most likely tokens. - - `start_index: number` + - `token: optional string` - The index of the first character of the URL citation in the message. + A possible text token. - - `title: string` + - `logprob: optional number` - The title of the web resource. + The log probability of this token. - - `type: "url_citation"` + - `output_index: number` - The type of the URL citation. Always `url_citation`. + The index of the output item that the text delta was added to. - - `"url_citation"` + - `sequence_number: number` - - `url: string` + The sequence number for this event. - The URL of the web resource. + - `type: "response.output_text.delta"` - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + The type of the event. Always `response.output_text.delta`. - A citation for a container file used to generate a model response. + - `"response.output_text.delta"` - - `container_id: string` + - `ResponseTextDoneEvent object { content_index, item_id, logprobs, 4 more }` - The ID of the container file. + Emitted when text content is finalized. - - `end_index: number` + - `content_index: number` - The index of the last character of the container file citation in the message. + The index of the content part that the text content is finalized. - - `file_id: string` + - `item_id: string` - The ID of the file. + The ID of the output item that the text content is finalized. - - `filename: string` + - `logprobs: array of object { token, logprob, top_logprobs }` - The filename of the container file cited. + The log probabilities of the tokens in the delta. - - `start_index: number` + - `token: string` - The index of the first character of the container file citation in the message. + A possible text token. - - `type: "container_file_citation"` + - `logprob: number` - The type of the container file citation. Always `container_file_citation`. + The log probability of this token. - - `"container_file_citation"` + - `top_logprobs: optional array of object { token, logprob }` - - `FilePath = object { file_id, index, type }` + The log probability of the top 20 most likely tokens. - A path to a file. + - `token: optional string` - - `file_id: string` + A possible text token. - The ID of the file. + - `logprob: optional number` - - `index: number` + The log probability of this token. - The index of the file in the list of files. + - `output_index: number` - - `type: "file_path"` + The index of the output item that the text content is finalized. - The type of the file path. Always `file_path`. + - `sequence_number: number` - - `"file_path"` + The sequence number for this event. - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` + - `text: string` - - `token: string` + The text content that is finalized. - - `bytes: array of number` + - `type: "response.output_text.done"` - - `logprob: number` + The type of the event. Always `response.output_text.done`. - - `top_logprobs: array of object { token, bytes, logprob }` + - `"response.output_text.done"` - - `token: string` + - `ResponseWebSearchCallCompletedEvent object { item_id, output_index, sequence_number, type }` - - `bytes: array of number` + Emitted when a web search call is completed. - - `logprob: number` + - `item_id: string` - - `text: string` + Unique ID for the output item associated with the web search call. - The text output from the model. + - `output_index: number` - - `type: "output_text"` + The index of the output item that the web search call is associated with. - The type of the output text. Always `output_text`. + - `sequence_number: number` - - `"output_text"` + The sequence number of the web search call being processed. - - `ResponseOutputRefusal = object { refusal, type }` + - `type: "response.web_search_call.completed"` - A refusal from the model. + The type of the event. Always `response.web_search_call.completed`. - - `refusal: string` + - `"response.web_search_call.completed"` - The refusal explanation from the model. + - `ResponseWebSearchCallInProgressEvent object { item_id, output_index, sequence_number, type }` - - `type: "refusal"` + Emitted when a web search call is initiated. - The type of the refusal. Always `refusal`. + - `item_id: string` - - `"refusal"` + Unique ID for the output item associated with the web search call. - - `role: "assistant"` + - `output_index: number` - The role of the output message. Always `assistant`. + The index of the output item that the web search call is associated with. - - `"assistant"` + - `sequence_number: number` - - `status: "in_progress" or "completed" or "incomplete"` + The sequence number of the web search call being processed. - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. + - `type: "response.web_search_call.in_progress"` - - `"in_progress"` + The type of the event. Always `response.web_search_call.in_progress`. - - `"completed"` + - `"response.web_search_call.in_progress"` - - `"incomplete"` + - `ResponseWebSearchCallSearchingEvent object { item_id, output_index, sequence_number, type }` - - `type: "message"` + Emitted when a web search call is executing. - The type of the output message. Always `message`. + - `item_id: string` - - `"message"` + Unique ID for the output item associated with the web search call. - - `phase: optional "commentary" or "final_answer"` + - `output_index: number` - 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. + The index of the output item that the web search call is associated with. - - `"commentary"` + - `sequence_number: number` - - `"final_answer"` + The sequence number of the web search call being processed. - - `FileSearchCall = object { id, queries, status, 2 more }` + - `type: "response.web_search_call.searching"` - The results of a file search tool call. See the - [file search guide](/docs/guides/tools-file-search) for more information. + The type of the event. Always `response.web_search_call.searching`. - - `id: string` + - `"response.web_search_call.searching"` - The unique ID of the file search tool call. + - `ResponseImageGenCallCompletedEvent object { item_id, output_index, sequence_number, type }` - - `queries: array of string` + Emitted when an image generation tool call has completed and the final image is available. - The queries used to search for files. + - `item_id: string` - - `status: "in_progress" or "searching" or "completed" or 2 more` + The unique identifier of the image generation item being processed. - The status of the file search tool call. One of `in_progress`, - `searching`, `incomplete` or `failed`, + - `output_index: number` - - `"in_progress"` + The index of the output item in the response's output array. - - `"searching"` + - `sequence_number: number` - - `"completed"` + The sequence number of this event. - - `"incomplete"` + - `type: "response.image_generation_call.completed"` - - `"failed"` + The type of the event. Always 'response.image_generation_call.completed'. - - `type: "file_search_call"` + - `"response.image_generation_call.completed"` - The type of the file search tool call. Always `file_search_call`. + - `ResponseImageGenCallGeneratingEvent object { item_id, output_index, sequence_number, type }` - - `"file_search_call"` + Emitted when an image generation tool call is actively generating an image (intermediate state). - - `results: optional array of object { attributes, file_id, filename, 2 more }` + - `item_id: string` - The results of the file search tool call. + The unique identifier of the image generation item being processed. - - `attributes: optional map[string or number or boolean]` + - `output_index: number` - 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. + The index of the output item in the response's output array. - - `string` + - `sequence_number: number` - - `number` + The sequence number of the image generation item being processed. - - `boolean` + - `type: "response.image_generation_call.generating"` - - `file_id: optional string` + The type of the event. Always 'response.image_generation_call.generating'. - The unique ID of the file. + - `"response.image_generation_call.generating"` - - `filename: optional string` + - `ResponseImageGenCallInProgressEvent object { item_id, output_index, sequence_number, type }` - The name of the file. + Emitted when an image generation tool call is in progress. - - `score: optional number` + - `item_id: string` - The relevance score of the file - a value between 0 and 1. + The unique identifier of the image generation item being processed. - - `text: optional string` + - `output_index: number` - The text that was retrieved from the file. + The index of the output item in the response's output array. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `sequence_number: number` - A tool call to a computer use tool. See the - [computer use guide](/docs/guides/tools-computer-use) for more information. + The sequence number of the image generation item being processed. - - `id: string` + - `type: "response.image_generation_call.in_progress"` - The unique ID of the computer call. + The type of the event. Always 'response.image_generation_call.in_progress'. - - `call_id: string` + - `"response.image_generation_call.in_progress"` - An identifier used when responding to the tool call with output. + - `ResponseImageGenCallPartialImageEvent object { item_id, output_index, partial_image_b64, 3 more }` - - `pending_safety_checks: array of object { id, code, message }` + Emitted when a partial image is available during image generation streaming. - The pending safety checks for the computer call. + - `item_id: string` - - `id: string` + The unique identifier of the image generation item being processed. - The ID of the pending safety check. + - `output_index: number` - - `code: optional string` + The index of the output item in the response's output array. - The type of the pending safety check. + - `partial_image_b64: string` - - `message: optional string` + Base64-encoded partial image data, suitable for rendering as an image. - Details about the pending safety check. + - `partial_image_index: number` - - `status: "in_progress" or "completed" or "incomplete"` + 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + - `sequence_number: number` - - `"in_progress"` + The sequence number of the image generation item being processed. - - `"completed"` + - `type: "response.image_generation_call.partial_image"` - - `"incomplete"` + The type of the event. Always 'response.image_generation_call.partial_image'. - - `type: "computer_call"` + - `"response.image_generation_call.partial_image"` - The type of the computer call. Always `computer_call`. + - `ResponseMcpCallArgumentsDeltaEvent object { delta, item_id, output_index, 2 more }` - - `"computer_call"` + Emitted when there is a delta (partial update) to the arguments of an MCP tool call. - - `action: optional ComputerAction` + - `delta: string` - A click action. + A JSON string containing the partial update to the arguments for the MCP tool call. - - `Click = object { button, type, x, 2 more }` + - `item_id: string` - A click action. + The unique identifier of the MCP tool call item being processed. - - `button: "left" or "right" or "wheel" or 2 more` + - `output_index: number` - Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + The index of the output item in the response's output array. - - `"left"` + - `sequence_number: number` - - `"right"` + The sequence number of this event. - - `"wheel"` + - `type: "response.mcp_call_arguments.delta"` - - `"back"` + The type of the event. Always 'response.mcp_call_arguments.delta'. - - `"forward"` + - `"response.mcp_call_arguments.delta"` - - `type: "click"` + - `ResponseMcpCallArgumentsDoneEvent object { arguments, item_id, output_index, 2 more }` - Specifies the event type. For a click action, this property is always `click`. + Emitted when the arguments for an MCP tool call are finalized. - - `"click"` + - `arguments: string` - - `x: number` + A JSON string containing the finalized arguments for the MCP tool call. - The x-coordinate where the click occurred. + - `item_id: string` - - `y: number` + The unique identifier of the MCP tool call item being processed. - The y-coordinate where the click occurred. + - `output_index: number` - - `keys: optional array of string` + The index of the output item in the response's output array. - The keys being held while clicking. + - `sequence_number: number` - - `DoubleClick = object { keys, type, x, y }` + The sequence number of this event. - A double click action. + - `type: "response.mcp_call_arguments.done"` - - `keys: array of string` + The type of the event. Always 'response.mcp_call_arguments.done'. - The keys being held while double-clicking. + - `"response.mcp_call_arguments.done"` - - `type: "double_click"` + - `ResponseMcpCallCompletedEvent object { item_id, output_index, sequence_number, type }` - Specifies the event type. For a double click action, this property is always set to `double_click`. + Emitted when an MCP tool call has completed successfully. - - `"double_click"` + - `item_id: string` - - `x: number` + The ID of the MCP tool call item that completed. - The x-coordinate where the double click occurred. + - `output_index: number` - - `y: number` + The index of the output item that completed. - The y-coordinate where the double click occurred. + - `sequence_number: number` - - `Drag = object { path, type, keys }` + The sequence number of this event. - A drag action. + - `type: "response.mcp_call.completed"` - - `path: array of object { x, y }` + The type of the event. Always 'response.mcp_call.completed'. - An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + - `"response.mcp_call.completed"` - ``` - [ - { x: 100, y: 200 }, - { x: 200, y: 300 } - ] - ``` + - `ResponseMcpCallFailedEvent object { item_id, output_index, sequence_number, type }` - - `x: number` + Emitted when an MCP tool call has failed. - The x-coordinate. + - `item_id: string` - - `y: number` + The ID of the MCP tool call item that failed. - The y-coordinate. + - `output_index: number` - - `type: "drag"` + The index of the output item that failed. - Specifies the event type. For a drag action, this property is always set to `drag`. + - `sequence_number: number` - - `"drag"` + The sequence number of this event. - - `keys: optional array of string` + - `type: "response.mcp_call.failed"` - The keys being held while dragging the mouse. + The type of the event. Always 'response.mcp_call.failed'. - - `Keypress = object { keys, type }` + - `"response.mcp_call.failed"` - A collection of keypresses the model would like to perform. + - `ResponseMcpCallInProgressEvent object { item_id, output_index, sequence_number, type }` - - `keys: array of string` + Emitted when an MCP tool call is in progress. - The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + - `item_id: string` - - `type: "keypress"` + The unique identifier of the MCP tool call item being processed. - Specifies the event type. For a keypress action, this property is always set to `keypress`. + - `output_index: number` - - `"keypress"` + The index of the output item in the response's output array. - - `Move = object { type, x, y, keys }` + - `sequence_number: number` - A mouse move action. + The sequence number of this event. - - `type: "move"` + - `type: "response.mcp_call.in_progress"` - Specifies the event type. For a move action, this property is always set to `move`. + The type of the event. Always 'response.mcp_call.in_progress'. - - `"move"` + - `"response.mcp_call.in_progress"` - - `x: number` + - `ResponseMcpListToolsCompletedEvent object { item_id, output_index, sequence_number, type }` - The x-coordinate to move to. + Emitted when the list of available MCP tools has been successfully retrieved. - - `y: number` + - `item_id: string` - The y-coordinate to move to. + The ID of the MCP tool call item that produced this output. - - `keys: optional array of string` + - `output_index: number` - The keys being held while moving the mouse. + The index of the output item that was processed. - - `Screenshot = object { type }` + - `sequence_number: number` - A screenshot action. + The sequence number of this event. - - `type: "screenshot"` + - `type: "response.mcp_list_tools.completed"` - Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + The type of the event. Always 'response.mcp_list_tools.completed'. - - `"screenshot"` + - `"response.mcp_list_tools.completed"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `ResponseMcpListToolsFailedEvent object { item_id, output_index, sequence_number, type }` - A scroll action. + Emitted when the attempt to list available MCP tools has failed. - - `scroll_x: number` + - `item_id: string` - The horizontal scroll distance. + The ID of the MCP tool call item that failed. - - `scroll_y: number` + - `output_index: number` - The vertical scroll distance. + The index of the output item that failed. - - `type: "scroll"` + - `sequence_number: number` - Specifies the event type. For a scroll action, this property is always set to `scroll`. + The sequence number of this event. - - `"scroll"` + - `type: "response.mcp_list_tools.failed"` - - `x: number` + The type of the event. Always 'response.mcp_list_tools.failed'. - The x-coordinate where the scroll occurred. + - `"response.mcp_list_tools.failed"` - - `y: number` + - `ResponseMcpListToolsInProgressEvent object { item_id, output_index, sequence_number, type }` - The y-coordinate where the scroll occurred. + Emitted when the system is in the process of retrieving the list of available MCP tools. - - `keys: optional array of string` + - `item_id: string` - The keys being held while scrolling. + The ID of the MCP tool call item that is being processed. - - `Type = object { text, type }` + - `output_index: number` - An action to type in text. + The index of the output item that is being processed. - - `text: string` + - `sequence_number: number` - The text to type. + The sequence number of this event. - - `type: "type"` + - `type: "response.mcp_list_tools.in_progress"` - Specifies the event type. For a type action, this property is always set to `type`. + The type of the event. Always 'response.mcp_list_tools.in_progress'. - - `"type"` + - `"response.mcp_list_tools.in_progress"` - - `Wait = object { type }` + - `ResponseOutputTextAnnotationAddedEvent object { annotation, annotation_index, content_index, 4 more }` - A wait action. + Emitted when an annotation is added to output text content. - - `type: "wait"` + - `annotation: unknown` - Specifies the event type. For a wait action, this property is always set to `wait`. + The annotation object being added. (See annotation schema for details.) - - `"wait"` + - `annotation_index: number` - - `actions: optional ComputerActionList` + The index of the annotation within the content part. - Flattened batched actions for `computer_use`. Each action includes an - `type` discriminator and action-specific fields. + - `content_index: number` - - `Click = object { button, type, x, 2 more }` + The index of the content part within the output item. - A click action. + - `item_id: string` - - `button: "left" or "right" or "wheel" or 2 more` + The unique identifier of the item to which the annotation is being added. - Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + - `output_index: number` - - `"left"` + The index of the output item in the response's output array. - - `"right"` + - `sequence_number: number` - - `"wheel"` + The sequence number of this event. - - `"back"` + - `type: "response.output_text.annotation.added"` - - `"forward"` + The type of the event. Always 'response.output_text.annotation.added'. - - `type: "click"` + - `"response.output_text.annotation.added"` - Specifies the event type. For a click action, this property is always `click`. + - `ResponseQueuedEvent object { response, sequence_number, type }` - - `"click"` + Emitted when a response is queued and waiting to be processed. - - `x: number` + - `response: Response` - The x-coordinate where the click occurred. + The full response object that is queued. - - `y: number` + - `sequence_number: number` - The y-coordinate where the click occurred. + The sequence number for this event. - - `keys: optional array of string` + - `type: "response.queued"` - The keys being held while clicking. + The type of the event. Always 'response.queued'. - - `DoubleClick = object { keys, type, x, y }` + - `"response.queued"` - A double click action. + - `ResponseCustomToolCallInputDeltaEvent object { delta, item_id, output_index, 2 more }` - - `keys: array of string` + Event representing a delta (partial update) to the input of a custom tool call. - The keys being held while double-clicking. + - `delta: string` - - `type: "double_click"` + The incremental input data (delta) for the custom tool call. - Specifies the event type. For a double click action, this property is always set to `double_click`. + - `item_id: string` - - `"double_click"` + Unique identifier for the API item associated with this event. - - `x: number` + - `output_index: number` - The x-coordinate where the double click occurred. + The index of the output this delta applies to. - - `y: number` + - `sequence_number: number` - The y-coordinate where the double click occurred. + The sequence number of this event. - - `Drag = object { path, type, keys }` + - `type: "response.custom_tool_call_input.delta"` - A drag action. + The event type identifier. - - `path: array of object { x, y }` + - `"response.custom_tool_call_input.delta"` - An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + - `ResponseCustomToolCallInputDoneEvent object { input, item_id, output_index, 2 more }` - ``` - [ - { x: 100, y: 200 }, - { x: 200, y: 300 } - ] - ``` + Event indicating that input for a custom tool call is complete. - - `x: number` + - `input: string` - The x-coordinate. + The complete input data for the custom tool call. - - `y: number` + - `item_id: string` - The y-coordinate. + Unique identifier for the API item associated with this event. - - `type: "drag"` + - `output_index: number` - Specifies the event type. For a drag action, this property is always set to `drag`. + The index of the output this event applies to. - - `"drag"` + - `sequence_number: number` - - `keys: optional array of string` + The sequence number of this event. - The keys being held while dragging the mouse. + - `type: "response.custom_tool_call_input.done"` - - `Keypress = object { keys, type }` + The event type identifier. - A collection of keypresses the model would like to perform. + - `"response.custom_tool_call_input.done"` - - `keys: array of string` +### Response Text Config - The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. +- `ResponseTextConfig object { format, verbosity }` - - `type: "keypress"` + Configuration options for a text response from the model. Can be plain + text or structured JSON data. Learn more: - Specifies the event type. For a keypress action, this property is always set to `keypress`. + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - - `"keypress"` + - `format: optional ResponseFormatTextConfig` - - `Move = object { type, x, y, keys }` + An object specifying the format that the model must output. - A mouse move action. + 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). - - `type: "move"` + The default format is `{ "type": "text" }` with no additional options. - Specifies the event type. For a move action, this property is always set to `move`. + **Not recommended for gpt-4o and newer models:** - - `"move"` + 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. - - `x: number` + - `ResponseFormatText object { type }` - The x-coordinate to move to. + Default response format. Used to generate text responses. - - `y: number` + - `type: "text"` - The y-coordinate to move to. + The type of response format being defined. Always `text`. - - `keys: optional array of string` + - `"text"` - The keys being held while moving the mouse. + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` - - `Screenshot = object { type }` + JSON Schema response format. Used to generate structured JSON responses. + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - A screenshot action. + - `name: string` - - `type: "screenshot"` + 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. - Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + - `schema: map[unknown]` - - `"screenshot"` + The schema for the response format, described as a JSON Schema object. + Learn how to build JSON schemas [here](https://json-schema.org/). - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `type: "json_schema"` - A scroll action. + The type of response format being defined. Always `json_schema`. - - `scroll_x: number` + - `"json_schema"` - The horizontal scroll distance. + - `description: optional string` - - `scroll_y: number` + A description of what the response format is for, used by the model to + determine how to respond in the format. - The vertical scroll distance. + - `strict: optional boolean` - - `type: "scroll"` + 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). - Specifies the event type. For a scroll action, this property is always set to `scroll`. + - `ResponseFormatJSONObject object { type }` - - `"scroll"` + 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. - - `x: number` + - `type: "json_object"` - The x-coordinate where the scroll occurred. + The type of response format being defined. Always `json_object`. - - `y: number` + - `"json_object"` - The y-coordinate where the scroll occurred. + - `verbosity: optional "low" or "medium" or "high"` - - `keys: optional array of string` + 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 keys being held while scrolling. + - `"low"` - - `Type = object { text, type }` + - `"medium"` - An action to type in text. + - `"high"` - - `text: string` +### Response Text Delta Event - The text to type. +- `ResponseTextDeltaEvent object { content_index, delta, item_id, 4 more }` - - `type: "type"` + Emitted when there is an additional text delta. - Specifies the event type. For a type action, this property is always set to `type`. + - `content_index: number` - - `"type"` + The index of the content part that the text delta was added to. - - `Wait = object { type }` + - `delta: string` - A wait action. + The text delta that was added. - - `type: "wait"` + - `item_id: string` - Specifies the event type. For a wait action, this property is always set to `wait`. + The ID of the output item that the text delta was added to. - - `"wait"` + - `logprobs: array of object { token, logprob, top_logprobs }` - - `ComputerCallOutput = object { call_id, output, type, 3 more }` + The log probabilities of the tokens in the delta. - The output of a computer tool call. + - `token: string` - - `call_id: string` + A possible text token. - The ID of the computer tool call that produced the output. + - `logprob: number` - - `output: ResponseComputerToolCallOutputScreenshot` + The log probability of this token. - A computer screenshot image used with the computer use tool. + - `top_logprobs: optional array of object { token, logprob }` - - `type: "computer_screenshot"` + The log probability of the top 20 most likely tokens. - Specifies the event type. For a computer screenshot, this property is - always set to `computer_screenshot`. + - `token: optional string` - - `"computer_screenshot"` + A possible text token. - - `file_id: optional string` + - `logprob: optional number` - The identifier of an uploaded file that contains the screenshot. + The log probability of this token. - - `image_url: optional string` + - `output_index: number` - The URL of the screenshot image. + The index of the output item that the text delta was added to. - - `type: "computer_call_output"` + - `sequence_number: number` - The type of the computer tool call output. Always `computer_call_output`. + The sequence number for this event. - - `"computer_call_output"` + - `type: "response.output_text.delta"` - - `id: optional string` + The type of the event. Always `response.output_text.delta`. - The ID of the computer tool call output. + - `"response.output_text.delta"` - - `acknowledged_safety_checks: optional array of object { id, code, message }` +### Response Text Done Event - The safety checks reported by the API that have been acknowledged by the developer. +- `ResponseTextDoneEvent object { content_index, item_id, logprobs, 4 more }` - - `id: string` + Emitted when text content is finalized. - The ID of the pending safety check. + - `content_index: number` - - `code: optional string` + The index of the content part that the text content is finalized. - The type of the pending safety check. + - `item_id: string` - - `message: optional string` + The ID of the output item that the text content is finalized. - Details about the pending safety check. + - `logprobs: array of object { token, logprob, top_logprobs }` - - `status: optional "in_progress" or "completed" or "incomplete"` + The log probabilities of the tokens in the delta. - The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. + - `token: string` - - `"in_progress"` + A possible text token. - - `"completed"` + - `logprob: number` - - `"incomplete"` + The log probability of this token. - - `WebSearchCall = object { id, action, status, type }` + - `top_logprobs: optional array of object { token, logprob }` - The results of a web search tool call. See the - [web search guide](/docs/guides/tools-web-search) for more information. + The log probability of the top 20 most likely tokens. - - `id: string` + - `token: optional string` - The unique ID of the web search tool call. + A possible text token. - - `action: object { query, type, queries, sources } or object { type, url } or object { pattern, type, url }` + - `logprob: optional number` - 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). + The log probability of this token. - - `Search = object { query, type, queries, sources }` + - `output_index: number` - Action type "search" - Performs a web search query. + The index of the output item that the text content is finalized. - - `query: string` + - `sequence_number: number` - [DEPRECATED] The search query. + The sequence number for this event. - - `type: "search"` + - `text: string` - The action type. + The text content that is finalized. - - `"search"` + - `type: "response.output_text.done"` - - `queries: optional array of string` + The type of the event. Always `response.output_text.done`. - The search queries. + - `"response.output_text.done"` - - `sources: optional array of object { type, url }` +### Response Usage - The sources used in the search. +- `ResponseUsage object { input_tokens, input_tokens_details, output_tokens, 2 more }` - - `type: "url"` + Represents token usage details including input tokens, output tokens, + a breakdown of output tokens, and the total tokens used. - The type of source. Always `url`. + - `input_tokens: number` - - `"url"` + The number of input tokens. - - `url: string` + - `input_tokens_details: object { cached_tokens }` - The URL of the source. + A detailed breakdown of the input tokens. - - `OpenPage = object { type, url }` + - `cached_tokens: number` - Action type "open_page" - Opens a specific URL from search results. + The number of tokens that were retrieved from the cache. + [More on prompt caching](/docs/guides/prompt-caching). - - `type: "open_page"` + - `output_tokens: number` - The action type. + The number of output tokens. - - `"open_page"` + - `output_tokens_details: object { reasoning_tokens }` - - `url: optional string` + A detailed breakdown of the output tokens. - The URL opened by the model. + - `reasoning_tokens: number` - - `FindInPage = object { pattern, type, url }` + The number of reasoning tokens. - Action type "find_in_page": Searches for a pattern within a loaded page. + - `total_tokens: number` - - `pattern: string` + The total number of tokens used. - The pattern or text to search for within the page. +### Response Web Search Call Completed Event - - `type: "find_in_page"` +- `ResponseWebSearchCallCompletedEvent object { item_id, output_index, sequence_number, type }` - The action type. + Emitted when a web search call is completed. - - `"find_in_page"` + - `item_id: string` - - `url: string` + Unique ID for the output item associated with the web search call. - The URL of the page searched for the pattern. + - `output_index: number` - - `status: "in_progress" or "searching" or "completed" or "failed"` + The index of the output item that the web search call is associated with. - The status of the web search tool call. + - `sequence_number: number` - - `"in_progress"` + The sequence number of the web search call being processed. - - `"searching"` + - `type: "response.web_search_call.completed"` - - `"completed"` + The type of the event. Always `response.web_search_call.completed`. - - `"failed"` + - `"response.web_search_call.completed"` - - `type: "web_search_call"` +### Response Web Search Call In Progress Event - The type of the web search tool call. Always `web_search_call`. +- `ResponseWebSearchCallInProgressEvent object { item_id, output_index, sequence_number, type }` - - `"web_search_call"` + Emitted when a web search call is initiated. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `item_id: string` - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. + Unique ID for the output item associated with the web search call. - - `arguments: string` + - `output_index: number` - A JSON string of the arguments to pass to the function. + The index of the output item that the web search call is associated with. - - `call_id: string` + - `sequence_number: number` - The unique ID of the function tool call generated by the model. + The sequence number of the web search call being processed. - - `name: string` + - `type: "response.web_search_call.in_progress"` - The name of the function to run. + The type of the event. Always `response.web_search_call.in_progress`. - - `type: "function_call"` + - `"response.web_search_call.in_progress"` - The type of the function tool call. Always `function_call`. +### Response Web Search Call Searching Event - - `"function_call"` +- `ResponseWebSearchCallSearchingEvent object { item_id, output_index, sequence_number, type }` - - `id: optional string` + Emitted when a web search call is executing. - The unique ID of the function tool call. + - `item_id: string` - - `namespace: optional string` + Unique ID for the output item associated with the web search call. - The namespace of the function to run. + - `output_index: number` - - `status: optional "in_progress" or "completed" or "incomplete"` + The index of the output item that the web search call is associated with. - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + - `sequence_number: number` - - `"in_progress"` + The sequence number of the web search call being processed. - - `"completed"` + - `type: "response.web_search_call.searching"` - - `"incomplete"` + The type of the event. Always `response.web_search_call.searching`. - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `"response.web_search_call.searching"` - The output of a function tool call. +### Responses Client Event - - `call_id: string` +- `ResponsesClientEvent object { type, background, context_management, 27 more }` - The unique ID of the function tool call generated by the model. + - `type: "response.create"` - - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` + The type of the client event. Always `response.create`. - Text, image, or file output of the function tool call. + - `"response.create"` - - `string` + - `background: optional boolean` - A JSON string of the output of the function tool call. + Whether to run the model response in the background. + [Learn more](/docs/guides/background). - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` + - `context_management: optional array of object { type, compact_threshold }` - An array of content outputs (text, image, file) for the function tool call. + Context management configuration for this request. + + - `type: string` + + The context management entry type. Currently only 'compaction' is supported. + + - `compact_threshold: optional number` + + Token threshold at which compaction should be triggered for this entry. + + - `conversation: optional string or ResponseConversationParam` + + The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request. + Input items and output items from this response are automatically added to this conversation after this response completes. + + - `ConversationID = string` + + The unique ID of the conversation. + + - `ResponseConversationParam object { id }` + + The conversation that this response belongs to. + + - `id: string` + + The unique ID of the conversation. + + - `include: optional array of ResponseIncludable` + + Specify additional output data to include in the model response. Currently supported values are: + + - `web_search_call.action.sources`: Include the sources of the web search tool call. + - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items. + - `computer_call_output.output.image_url`: Include image urls from the computer call output. + - `file_search_call.results`: Include the search results of the file search tool call. + - `message.input_image.image_url`: Include image urls from the input message. + - `message.output_text.logprobs`: Include logprobs with assistant messages. + - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program). + + - `"file_search_call.results"` + + - `"web_search_call.results"` + + - `"web_search_call.action.sources"` + + - `"message.input_image.image_url"` + + - `"computer_call_output.output.image_url"` + + - `"code_interpreter_call.outputs"` + + - `"reasoning.encrypted_content"` + + - `"message.output_text.logprobs"` + + - `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - `ResponseInputTextContent = object { text, type }` + Text, image, or file inputs to the model, used to generate a response. + + Learn more: + + - [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. + + - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` A text input to the model. @@ -122288,17 +97806,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. + - `ResponseInputImage object { detail, type, file_id, image_url }` - - `"input_image"` + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: optional "low" or "high" or "auto" or "original"` + - `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`. @@ -122310,6 +97822,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"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. @@ -122318,7 +97836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -122338,7 +97856,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `file_data: optional string` - The base64-encoded data of the file to be sent to the model. + The content of the file to be sent to the model. - `file_id: optional string` @@ -122352,57 +97870,60 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the file to be sent to the model. - - `type: "function_call_output"` - - The type of the function tool call output. Always `function_call_output`. - - - `"function_call_output"` + - `role: "user" or "assistant" or "system" or "developer"` - - `id: optional string` + The role of the message input. One of `user`, `assistant`, `system`, or + `developer`. - The unique ID of the function tool call output. Populated when this item is returned via API. + - `"user"` - - `status: optional "in_progress" or "completed" or "incomplete"` + - `"assistant"` - The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. + - `"system"` - - `"in_progress"` + - `"developer"` - - `"completed"` + - `phase: optional "commentary" or "final_answer"` - - `"incomplete"` + 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. - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `"commentary"` - - `arguments: unknown` + - `"final_answer"` - The arguments supplied to the tool search call. + - `type: optional "message"` - - `type: "tool_search_call"` + The type of the message input. Always `message`. - The item type. Always `tool_search_call`. + - `"message"` - - `"tool_search_call"` + - `Message object { content, role, status, type }` - - `id: optional string` + 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. - The unique ID of this tool search call. + - `content: ResponseInputMessageContentList` - - `call_id: optional string` + A list of one or many input items to the model, containing different content + types. - The unique ID of the tool search call generated by the model. + - `role: "user" or "system" or "developer"` - - `execution: optional "server" or "client"` + The role of the message input. One of `user`, `system`, or `developer`. - Whether tool search was executed by the server or by the client. + - `"user"` - - `"server"` + - `"system"` - - `"client"` + - `"developer"` - `status: optional "in_progress" or "completed" or "incomplete"` - The status of the tool search call. + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. - `"in_progress"` @@ -122410,227 +97931,1080 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `type: optional "message"` - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` + The type of the message input. Always set to `message`. - The loaded tool definitions returned by the tool search output. + - `"message"` - - `Function = object { name, parameters, strict, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 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). + An output message from the model. - - `name: string` + - `id: string` - The name of the function to call. + The unique ID of the output message. - - `parameters: map[unknown]` + - `content: array of ResponseOutputText or ResponseOutputRefusal` - A JSON schema object describing the parameters of the function. + The content of the output message. - - `strict: boolean` + - `ResponseOutputText object { annotations, logprobs, text, type }` - Whether to enforce strict parameter validation. Default `true`. + A text output from the model. - - `type: "function"` + - `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 type of the function tool. Always `function`. + The annotations of the text output. - - `"function"` + - `FileCitation object { file_id, filename, index, type }` - - `defer_loading: optional boolean` + A citation to a file. - Whether this function is deferred and loaded via tool search. + - `file_id: string` - - `description: optional string` + The ID of the file. - A description of the function. Used by the model to determine whether or not to call the function. + - `filename: string` - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + The filename of the file cited. - 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). + - `index: number` - - `type: "file_search"` + The index of the file in the list of files. - The type of the file search tool. Always `file_search`. + - `type: "file_citation"` - - `"file_search"` + The type of the file citation. Always `file_citation`. - - `vector_store_ids: array of string` + - `"file_citation"` - The IDs of the vector stores to search. + - `URLCitation object { end_index, start_index, title, 2 more }` - - `filters: optional ComparisonFilter or CompoundFilter` + A citation for a web resource used to generate a model response. - A filter to apply. + - `end_index: number` - - `ComparisonFilter = object { key, type, value }` + The index of the last character of the URL citation in the message. - A filter used to compare a specified attribute key to a given value using a defined comparison operation. + - `start_index: number` - - `key: string` + The index of the first character of the URL citation in the message. - The key to compare against the value. + - `title: string` - - `type: "eq" or "ne" or "gt" or 5 more` + The title of the web resource. - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + - `type: "url_citation"` - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in + The type of the URL citation. Always `url_citation`. - - `"eq"` + - `"url_citation"` - - `"ne"` + - `url: string` - - `"gt"` + The URL of the web resource. - - `"gte"` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` - - `"lt"` + A citation for a container file used to generate a model response. - - `"lte"` + - `container_id: string` - - `"in"` + The ID of the container file. - - `"nin"` + - `end_index: number` - - `value: string or number or boolean or array of string or number` + The index of the last character of the container file citation in the message. - The value to compare against the attribute key; supports string, number, or boolean types. + - `file_id: string` - - `string` + The ID of the file. - - `number` + - `filename: string` - - `boolean` + The filename of the container file cited. - - `array of string or number` + - `start_index: number` - - `string` + The index of the first character of the container file citation in the message. - - `number` + - `type: "container_file_citation"` - - `CompoundFilter = object { filters, type }` + The type of the container file citation. Always `container_file_citation`. - Combine multiple filters using `and` or `or`. + - `"container_file_citation"` - - `filters: array of ComparisonFilter or unknown` + - `FilePath object { file_id, index, type }` - Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + A path to a file. - - `ComparisonFilter = object { key, type, value }` + - `file_id: string` - A filter used to compare a specified attribute key to a given value using a defined comparison operation. + The ID of the file. - - `key: string` + - `index: number` - The key to compare against the value. + The index of the file in the list of files. - - `type: "eq" or "ne" or "gt" or 5 more` + - `type: "file_path"` - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + The type of the file path. Always `file_path`. - - `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 + - `"file_path"` - - `"eq"` + - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - `"ne"` + - `token: string` - - `"gt"` + - `bytes: array of number` - - `"gte"` + - `logprob: number` - - `"lt"` + - `top_logprobs: array of object { token, bytes, logprob }` - - `"lte"` + - `token: string` - - `"in"` + - `bytes: array of number` - - `"nin"` + - `logprob: number` - - `value: string or number or boolean or array of string or number` + - `text: string` - The value to compare against the attribute key; supports string, number, or boolean types. + The text output from the model. - - `string` + - `type: "output_text"` - - `number` + The type of the output text. Always `output_text`. - - `boolean` + - `"output_text"` - - `array of string or number` + - `ResponseOutputRefusal object { refusal, type }` - - `string` + A refusal from the model. - - `number` + - `refusal: string` - - `unknown` + The refusal explanation from the model. - - `type: "and" or "or"` + - `type: "refusal"` - Type of operation: `and` or `or`. + The type of the refusal. Always `refusal`. - - `"and"` + - `"refusal"` - - `"or"` + - `role: "assistant"` - - `max_num_results: optional number` + The role of the output message. Always `assistant`. - The maximum number of results to return. This number should be between 1 and 50 inclusive. + - `"assistant"` - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` + - `status: "in_progress" or "completed" or "incomplete"` - Ranking options for search. + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. - - `hybrid_search: optional object { embedding_weight, text_weight }` + - `"in_progress"` - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + - `"completed"` - - `embedding_weight: number` + - `"incomplete"` - The weight of the embedding in the reciprocal ranking fusion. + - `type: "message"` - - `text_weight: number` + The type of the output message. Always `message`. - The weight of the text in the reciprocal ranking fusion. + - `"message"` - - `ranker: optional "auto" or "default-2024-11-15"` + - `phase: optional "commentary" or "final_answer"` - The ranker to use for the file search. + 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. - - `"auto"` + - `"commentary"` - - `"default-2024-11-15"` + - `"final_answer"` - - `score_threshold: optional number` + - `FileSearchCall object { id, queries, status, 2 more }` - 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. + The results of a file search tool call. See the + [file search guide](/docs/guides/tools-file-search) for more information. - - `Computer = object { type }` + - `id: string` - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + The unique ID of the file search tool call. - - `type: "computer"` + - `queries: array of string` - The type of the computer tool. Always `computer`. + 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](/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 { 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](/docs/guides/tools-web-search) for more information. + + - `id: string` + + The unique ID of the web search tool call. + + - `action: object { query, type, queries, 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 { query, type, queries, sources }` + + Action type "search" - Performs a web search query. + + - `query: string` + + [DEPRECATED] The search query. + + - `type: "search"` + + The action type. + + - `"search"` + + - `queries: optional array of string` + + The search queries. + + - `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, 4 more }` + + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. + + - `arguments: string` + + A JSON string of the arguments to pass to the function. + + - `call_id: string` + + The unique ID of the function tool call generated by the model. + + - `name: string` + + The name of the function to run. + + - `type: "function_call"` + + The type of the function tool call. Always `function_call`. + + - `"function_call"` + + - `id: optional string` + + The unique ID of the function tool call. + + - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` + + Text, image, or file output of the function tool call. + + - `string` + + A JSON string of the output of the function tool call. + + - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` + + An array of content outputs (text, image, file) for the function tool call. + + - `ResponseInputTextContent object { text, type }` + + 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"` + + - `ResponseInputImageContent object { type, detail, file_id, image_url }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision) + + - `type: "input_image"` + + The type of the input item. Always `input_image`. + + - `"input_image"` + + - `detail: optional "low" or "high" or "auto" or "original"` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `"low"` + + - `"high"` + + - `"auto"` + + - `"original"` + + - `file_id: optional string` + + The ID of the file to be sent to the model. + + - `image_url: optional string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` + + A file input to the model. + + - `type: "input_file"` + + The type of the input item. Always `input_file`. + + - `"input_file"` + + - `detail: optional "low" or "high"` + + The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + + - `"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. + + - `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. + + - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` + + The loaded tool definitions returned by the tool search output. + + - `Function object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. + + - `type: "function"` + + The type of the function tool. Always `function`. + + - `"function"` + + - `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. + + - `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 }` + - `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). @@ -122662,7 +99036,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -122722,7 +99096,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -122745,7 +99119,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -122811,7 +99185,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -122864,7 +99238,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -122878,7 +99252,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -122908,7 +99282,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -122916,7 +99290,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -122950,7 +99324,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -123071,7 +99445,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -123081,7 +99455,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -123093,7 +99467,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -123121,47 +99495,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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. + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -123177,7 +99519,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -123213,7 +99555,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -123237,7 +99579,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -123249,7 +99591,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -123275,7 +99617,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -123285,7 +99627,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -123307,7 +99649,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -123323,7 +99665,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -123341,7 +99683,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -123367,45 +99709,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -123431,7 +99741,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -123485,7 +99795,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -123527,7 +99837,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -123588,7 +99898,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -123606,7 +99916,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -123636,7 +99946,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -123657,7 +99967,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -123671,7 +99981,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -123705,7 +100015,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -123763,7 +100073,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -123791,7 +100101,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -123829,41 +100139,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `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 }` + - `LocalEnvironment object { type, skills }` - - `container_id: string` - - The ID of the referenced container. - - - `type: "container_reference"` - - References a container created with the /v1/containers endpoint - - - `"container_reference"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -123875,7 +100153,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -123891,7 +100169,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -123901,7 +100179,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -123947,7 +100225,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -123959,7 +100237,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -123977,7 +100255,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -123991,7 +100269,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -124027,7 +100305,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -124057,7 +100335,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -124099,7 +100377,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -124125,7 +100403,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -124151,7 +100429,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -124204,7 +100482,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -124225,84 +100503,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -124313,7 +100525,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -124343,7 +100555,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -124357,7 +100569,23 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"item_reference"` - - `metadata: Metadata` + - `instructions: optional string` + + A system (or developer) message inserted into the model's context. + + When using along with `previous_response_id`, the instructions from a previous + response will not be carried over to the next response. This makes it simple + to swap out system (or developer) messages in new responses. + + - `max_output_tokens: optional number` + + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). + + - `max_tool_calls: optional number` + + The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. + + - `metadata: optional Metadata` 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 @@ -124366,7 +100594,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - - `model: ResponsesModel` + - `model: optional ResponsesModel` Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance @@ -124563,97716 +100791,264 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"gpt-5.1-codex-max"` - - `object: "response"` + - `parallel_tool_calls: optional boolean` - The object type of this resource - always set to `response`. + Whether to allow the model to run tool calls in parallel. - - `"response"` + - `previous_response_id: optional string` - - `output: array of ResponseOutputItem` + 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`. - An array of content items generated by the model. + - `prompt: optional ResponsePrompt` - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number for this event. - - - `type: "response.created"` - - The type of the event. Always `response.created`. - - - `"response.created"` - - - `ResponseErrorEvent = object { code, message, param, 2 more }` - - Emitted when an error occurs. - - - `code: string` - - The error code. - - - `message: string` - - The error message. - - - `param: string` - - The error parameter. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "error"` - - The type of the event. Always `error`. - - - `"error"` - - - `ResponseFileSearchCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a file search call is completed (results found). - - - `item_id: string` - - The ID of the output item that the file search call is initiated. - - - `output_index: number` - - The index of the output item that the file search call is initiated. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.file_search_call.completed"` - - The type of the event. Always `response.file_search_call.completed`. - - - `"response.file_search_call.completed"` - - - `ResponseFileSearchCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a file search call is initiated. - - - `item_id: string` - - The ID of the output item that the file search call is initiated. - - - `output_index: number` - - The index of the output item that the file search call is initiated. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.file_search_call.in_progress"` - - The type of the event. Always `response.file_search_call.in_progress`. - - - `"response.file_search_call.in_progress"` - - - `ResponseFileSearchCallSearchingEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a file search is currently searching. - - - `item_id: string` - - The ID of the output item that the file search call is initiated. - - - `output_index: number` - - The index of the output item that the file search call is searching. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.file_search_call.searching"` - - The type of the event. Always `response.file_search_call.searching`. - - - `"response.file_search_call.searching"` - - - `ResponseFunctionCallArgumentsDeltaEvent = object { delta, item_id, output_index, 2 more }` - - Emitted when there is a partial function-call arguments delta. - - - `delta: string` - - The function-call arguments delta that is added. - - - `item_id: string` - - The ID of the output item that the function-call arguments delta is added to. - - - `output_index: number` - - The index of the output item that the function-call arguments delta is added to. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.function_call_arguments.delta"` - - The type of the event. Always `response.function_call_arguments.delta`. - - - `"response.function_call_arguments.delta"` - - - `ResponseFunctionCallArgumentsDoneEvent = object { arguments, item_id, name, 3 more }` - - Emitted when function-call arguments are finalized. - - - `arguments: string` - - The function-call arguments. - - - `item_id: string` - - The ID of the item. - - - `name: string` - - The name of the function that was called. - - - `output_index: number` - - The index of the output item. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.function_call_arguments.done"` - - - `"response.function_call_arguments.done"` - - - `ResponseInProgressEvent = object { response, sequence_number, type }` - - Emitted when the response is in progress. - - - `response: Response` - - The response that is in progress. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.in_progress"` - - The type of the event. Always `response.in_progress`. - - - `"response.in_progress"` - - - `ResponseFailedEvent = object { response, sequence_number, type }` - - An event that is emitted when a response fails. - - - `response: Response` - - The response that failed. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.failed"` - - The type of the event. Always `response.failed`. - - - `"response.failed"` - - - `ResponseIncompleteEvent = object { response, sequence_number, type }` - - An event that is emitted when a response finishes as incomplete. - - - `response: Response` - - The response that was incomplete. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.incomplete"` - - The type of the event. Always `response.incomplete`. - - - `"response.incomplete"` - - - `ResponseOutputItemAddedEvent = object { item, output_index, sequence_number, type }` - - Emitted when a new output item is added. - - - `item: ResponseOutputItem` - - The output item that was added. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `output_index: number` - - The index of the output item that was added. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.output_item.added"` - - The type of the event. Always `response.output_item.added`. - - - `"response.output_item.added"` - - - `ResponseOutputItemDoneEvent = object { item, output_index, sequence_number, type }` - - Emitted when an output item is marked done. - - - `item: ResponseOutputItem` - - The output item that was marked done. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `output_index: number` - - The index of the output item that was marked done. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.output_item.done"` - - The type of the event. Always `response.output_item.done`. - - - `"response.output_item.done"` - - - `ResponseReasoningSummaryPartAddedEvent = object { item_id, output_index, part, 3 more }` - - Emitted when a new reasoning summary part is added. - - - `item_id: string` - - The ID of the item this summary part is associated with. - - - `output_index: number` - - The index of the output item this summary part is associated with. - - - `part: object { text, type }` - - The summary part that was added. - - - `text: string` - - The text of the summary part. - - - `type: "summary_text"` - - The type of the summary part. Always `summary_text`. - - - `"summary_text"` - - - `sequence_number: number` - - The sequence number of this event. - - - `summary_index: number` - - The index of the summary part within the reasoning summary. - - - `type: "response.reasoning_summary_part.added"` - - The type of the event. Always `response.reasoning_summary_part.added`. - - - `"response.reasoning_summary_part.added"` - - - `ResponseReasoningSummaryPartDoneEvent = object { item_id, output_index, part, 3 more }` - - Emitted when a reasoning summary part is completed. - - - `item_id: string` - - The ID of the item this summary part is associated with. - - - `output_index: number` - - The index of the output item this summary part is associated with. - - - `part: object { text, type }` - - The completed summary part. - - - `text: string` - - The text of the summary part. - - - `type: "summary_text"` - - The type of the summary part. Always `summary_text`. - - - `"summary_text"` - - - `sequence_number: number` - - The sequence number of this event. - - - `summary_index: number` - - The index of the summary part within the reasoning summary. - - - `type: "response.reasoning_summary_part.done"` - - The type of the event. Always `response.reasoning_summary_part.done`. - - - `"response.reasoning_summary_part.done"` - - - `ResponseReasoningSummaryTextDeltaEvent = object { delta, item_id, output_index, 3 more }` - - Emitted when a delta is added to a reasoning summary text. - - - `delta: string` - - The text delta that was added to the summary. - - - `item_id: string` - - The ID of the item this summary text delta is associated with. - - - `output_index: number` - - The index of the output item this summary text delta is associated with. - - - `sequence_number: number` - - The sequence number of this event. - - - `summary_index: number` - - The index of the summary part within the reasoning summary. - - - `type: "response.reasoning_summary_text.delta"` - - The type of the event. Always `response.reasoning_summary_text.delta`. - - - `"response.reasoning_summary_text.delta"` - - - `ResponseReasoningSummaryTextDoneEvent = object { item_id, output_index, sequence_number, 3 more }` - - Emitted when a reasoning summary text is completed. - - - `item_id: string` - - The ID of the item this summary text is associated with. - - - `output_index: number` - - The index of the output item this summary text is associated with. - - - `sequence_number: number` - - The sequence number of this event. - - - `summary_index: number` - - The index of the summary part within the reasoning summary. - - - `text: string` - - The full text of the completed reasoning summary. - - - `type: "response.reasoning_summary_text.done"` - - The type of the event. Always `response.reasoning_summary_text.done`. - - - `"response.reasoning_summary_text.done"` - - - `ResponseReasoningTextDeltaEvent = object { content_index, delta, item_id, 3 more }` - - Emitted when a delta is added to a reasoning text. - - - `content_index: number` - - The index of the reasoning content part this delta is associated with. - - - `delta: string` - - The text delta that was added to the reasoning content. - - - `item_id: string` - - The ID of the item this reasoning text delta is associated with. - - - `output_index: number` - - The index of the output item this reasoning text delta is associated with. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.reasoning_text.delta"` - - The type of the event. Always `response.reasoning_text.delta`. - - - `"response.reasoning_text.delta"` - - - `ResponseReasoningTextDoneEvent = object { content_index, item_id, output_index, 3 more }` - - Emitted when a reasoning text is completed. - - - `content_index: number` - - The index of the reasoning content part. - - - `item_id: string` - - The ID of the item this reasoning text is associated with. - - - `output_index: number` - - The index of the output item this reasoning text is associated with. - - - `sequence_number: number` - - The sequence number of this event. - - - `text: string` - - The full text of the completed reasoning content. - - - `type: "response.reasoning_text.done"` - - The type of the event. Always `response.reasoning_text.done`. - - - `"response.reasoning_text.done"` - - - `ResponseRefusalDeltaEvent = object { content_index, delta, item_id, 3 more }` - - Emitted when there is a partial refusal text. - - - `content_index: number` - - The index of the content part that the refusal text is added to. - - - `delta: string` - - The refusal text that is added. - - - `item_id: string` - - The ID of the output item that the refusal text is added to. - - - `output_index: number` - - The index of the output item that the refusal text is added to. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.refusal.delta"` - - The type of the event. Always `response.refusal.delta`. - - - `"response.refusal.delta"` - - - `ResponseRefusalDoneEvent = object { content_index, item_id, output_index, 3 more }` - - Emitted when refusal text is finalized. - - - `content_index: number` - - The index of the content part that the refusal text is finalized. - - - `item_id: string` - - The ID of the output item that the refusal text is finalized. - - - `output_index: number` - - The index of the output item that the refusal text is finalized. - - - `refusal: string` - - The refusal text that is finalized. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.refusal.done"` - - The type of the event. Always `response.refusal.done`. - - - `"response.refusal.done"` - - - `ResponseTextDeltaEvent = object { content_index, delta, item_id, 4 more }` - - Emitted when there is an additional text delta. - - - `content_index: number` - - The index of the content part that the text delta was added to. - - - `delta: string` - - The text delta that was added. - - - `item_id: string` - - The ID of the output item that the text delta was added to. - - - `logprobs: array of object { token, logprob, top_logprobs }` - - The log probabilities of the tokens in the delta. - - - `token: string` - - A possible text token. - - - `logprob: number` - - The log probability of this token. - - - `top_logprobs: optional array of object { token, logprob }` - - The log probability of the top 20 most likely tokens. - - - `token: optional string` - - A possible text token. - - - `logprob: optional number` - - The log probability of this token. - - - `output_index: number` - - The index of the output item that the text delta was added to. - - - `sequence_number: number` - - The sequence number for this event. - - - `type: "response.output_text.delta"` - - The type of the event. Always `response.output_text.delta`. - - - `"response.output_text.delta"` - - - `ResponseTextDoneEvent = object { content_index, item_id, logprobs, 4 more }` - - Emitted when text content is finalized. - - - `content_index: number` - - The index of the content part that the text content is finalized. - - - `item_id: string` - - The ID of the output item that the text content is finalized. - - - `logprobs: array of object { token, logprob, top_logprobs }` - - The log probabilities of the tokens in the delta. - - - `token: string` - - A possible text token. - - - `logprob: number` - - The log probability of this token. - - - `top_logprobs: optional array of object { token, logprob }` - - The log probability of the top 20 most likely tokens. - - - `token: optional string` - - A possible text token. - - - `logprob: optional number` - - The log probability of this token. - - - `output_index: number` - - The index of the output item that the text content is finalized. - - - `sequence_number: number` - - The sequence number for this event. - - - `text: string` - - The text content that is finalized. - - - `type: "response.output_text.done"` - - The type of the event. Always `response.output_text.done`. - - - `"response.output_text.done"` - - - `ResponseWebSearchCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a web search call is completed. - - - `item_id: string` - - Unique ID for the output item associated with the web search call. - - - `output_index: number` - - The index of the output item that the web search call is associated with. - - - `sequence_number: number` - - The sequence number of the web search call being processed. - - - `type: "response.web_search_call.completed"` - - The type of the event. Always `response.web_search_call.completed`. - - - `"response.web_search_call.completed"` - - - `ResponseWebSearchCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a web search call is initiated. - - - `item_id: string` - - Unique ID for the output item associated with the web search call. - - - `output_index: number` - - The index of the output item that the web search call is associated with. - - - `sequence_number: number` - - The sequence number of the web search call being processed. - - - `type: "response.web_search_call.in_progress"` - - The type of the event. Always `response.web_search_call.in_progress`. - - - `"response.web_search_call.in_progress"` - - - `ResponseWebSearchCallSearchingEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a web search call is executing. - - - `item_id: string` - - Unique ID for the output item associated with the web search call. - - - `output_index: number` - - The index of the output item that the web search call is associated with. - - - `sequence_number: number` - - The sequence number of the web search call being processed. - - - `type: "response.web_search_call.searching"` - - The type of the event. Always `response.web_search_call.searching`. - - - `"response.web_search_call.searching"` - - - `ResponseImageGenCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an image generation tool call has completed and the final image is available. - - - `item_id: string` - - The unique identifier of the image generation item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.image_generation_call.completed"` - - The type of the event. Always 'response.image_generation_call.completed'. - - - `"response.image_generation_call.completed"` - - - `ResponseImageGenCallGeneratingEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an image generation tool call is actively generating an image (intermediate state). - - - `item_id: string` - - The unique identifier of the image generation item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of the image generation item being processed. - - - `type: "response.image_generation_call.generating"` - - The type of the event. Always 'response.image_generation_call.generating'. - - - `"response.image_generation_call.generating"` - - - `ResponseImageGenCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an image generation tool call is in progress. - - - `item_id: string` - - The unique identifier of the image generation item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of the image generation item being processed. - - - `type: "response.image_generation_call.in_progress"` - - The type of the event. Always 'response.image_generation_call.in_progress'. - - - `"response.image_generation_call.in_progress"` - - - `ResponseImageGenCallPartialImageEvent = object { item_id, output_index, partial_image_b64, 3 more }` - - Emitted when a partial image is available during image generation streaming. - - - `item_id: string` - - The unique identifier of the image generation item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `partial_image_b64: string` - - Base64-encoded partial image data, suitable for rendering as an image. - - - `partial_image_index: number` - - 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). - - - `sequence_number: number` - - The sequence number of the image generation item being processed. - - - `type: "response.image_generation_call.partial_image"` - - The type of the event. Always 'response.image_generation_call.partial_image'. - - - `"response.image_generation_call.partial_image"` - - - `ResponseMcpCallArgumentsDeltaEvent = object { delta, item_id, output_index, 2 more }` - - Emitted when there is a delta (partial update) to the arguments of an MCP tool call. - - - `delta: string` - - A JSON string containing the partial update to the arguments for the MCP tool call. - - - `item_id: string` - - The unique identifier of the MCP tool call item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_call_arguments.delta"` - - The type of the event. Always 'response.mcp_call_arguments.delta'. - - - `"response.mcp_call_arguments.delta"` - - - `ResponseMcpCallArgumentsDoneEvent = object { arguments, item_id, output_index, 2 more }` - - Emitted when the arguments for an MCP tool call are finalized. - - - `arguments: string` - - A JSON string containing the finalized arguments for the MCP tool call. - - - `item_id: string` - - The unique identifier of the MCP tool call item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_call_arguments.done"` - - The type of the event. Always 'response.mcp_call_arguments.done'. - - - `"response.mcp_call_arguments.done"` - - - `ResponseMcpCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an MCP tool call has completed successfully. - - - `item_id: string` - - The ID of the MCP tool call item that completed. - - - `output_index: number` - - The index of the output item that completed. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_call.completed"` - - The type of the event. Always 'response.mcp_call.completed'. - - - `"response.mcp_call.completed"` - - - `ResponseMcpCallFailedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an MCP tool call has failed. - - - `item_id: string` - - The ID of the MCP tool call item that failed. - - - `output_index: number` - - The index of the output item that failed. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_call.failed"` - - The type of the event. Always 'response.mcp_call.failed'. - - - `"response.mcp_call.failed"` - - - `ResponseMcpCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an MCP tool call is in progress. - - - `item_id: string` - - The unique identifier of the MCP tool call item being processed. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_call.in_progress"` - - The type of the event. Always 'response.mcp_call.in_progress'. - - - `"response.mcp_call.in_progress"` - - - `ResponseMcpListToolsCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when the list of available MCP tools has been successfully retrieved. - - - `item_id: string` - - The ID of the MCP tool call item that produced this output. - - - `output_index: number` - - The index of the output item that was processed. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_list_tools.completed"` - - The type of the event. Always 'response.mcp_list_tools.completed'. - - - `"response.mcp_list_tools.completed"` - - - `ResponseMcpListToolsFailedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when the attempt to list available MCP tools has failed. - - - `item_id: string` - - The ID of the MCP tool call item that failed. - - - `output_index: number` - - The index of the output item that failed. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_list_tools.failed"` - - The type of the event. Always 'response.mcp_list_tools.failed'. - - - `"response.mcp_list_tools.failed"` - - - `ResponseMcpListToolsInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when the system is in the process of retrieving the list of available MCP tools. - - - `item_id: string` - - The ID of the MCP tool call item that is being processed. - - - `output_index: number` - - The index of the output item that is being processed. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.mcp_list_tools.in_progress"` - - The type of the event. Always 'response.mcp_list_tools.in_progress'. - - - `"response.mcp_list_tools.in_progress"` - - - `ResponseOutputTextAnnotationAddedEvent = object { annotation, annotation_index, content_index, 4 more }` - - Emitted when an annotation is added to output text content. - - - `annotation: unknown` - - The annotation object being added. (See annotation schema for details.) - - - `annotation_index: number` - - The index of the annotation within the content part. - - - `content_index: number` - - The index of the content part within the output item. - - - `item_id: string` - - The unique identifier of the item to which the annotation is being added. - - - `output_index: number` - - The index of the output item in the response's output array. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.output_text.annotation.added"` - - The type of the event. Always 'response.output_text.annotation.added'. - - - `"response.output_text.annotation.added"` - - - `ResponseQueuedEvent = object { response, sequence_number, type }` - - Emitted when a response is queued and waiting to be processed. - - - `response: Response` - - The full response object that is queued. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number for this event. - - - `type: "response.queued"` - - The type of the event. Always 'response.queued'. - - - `"response.queued"` - - - `ResponseCustomToolCallInputDeltaEvent = object { delta, item_id, output_index, 2 more }` - - Event representing a delta (partial update) to the input of a custom tool call. - - - `delta: string` - - The incremental input data (delta) for the custom tool call. - - - `item_id: string` - - Unique identifier for the API item associated with this event. - - - `output_index: number` - - The index of the output this delta applies to. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.custom_tool_call_input.delta"` - - The event type identifier. - - - `"response.custom_tool_call_input.delta"` - - - `ResponseCustomToolCallInputDoneEvent = object { input, item_id, output_index, 2 more }` - - Event indicating that input for a custom tool call is complete. - - - `input: string` - - The complete input data for the custom tool call. - - - `item_id: string` - - Unique identifier for the API item associated with this event. - - - `output_index: number` - - The index of the output this event applies to. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.custom_tool_call_input.done"` - - The event type identifier. - - - `"response.custom_tool_call_input.done"` - -### Response Text Config - -- `ResponseTextConfig = object { format, verbosity }` - - Configuration options for a text response from the model. Can be plain - text or structured JSON data. Learn more: - - - [Text inputs and outputs](/docs/guides/text) - - [Structured Outputs](/docs/guides/structured-outputs) - - - `format: optional 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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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"` - -### Response Text Delta Event - -- `ResponseTextDeltaEvent = object { content_index, delta, item_id, 4 more }` - - Emitted when there is an additional text delta. - - - `content_index: number` - - The index of the content part that the text delta was added to. - - - `delta: string` - - The text delta that was added. - - - `item_id: string` - - The ID of the output item that the text delta was added to. - - - `logprobs: array of object { token, logprob, top_logprobs }` - - The log probabilities of the tokens in the delta. - - - `token: string` - - A possible text token. - - - `logprob: number` - - The log probability of this token. - - - `top_logprobs: optional array of object { token, logprob }` - - The log probability of the top 20 most likely tokens. - - - `token: optional string` - - A possible text token. - - - `logprob: optional number` - - The log probability of this token. - - - `output_index: number` - - The index of the output item that the text delta was added to. - - - `sequence_number: number` - - The sequence number for this event. - - - `type: "response.output_text.delta"` - - The type of the event. Always `response.output_text.delta`. - - - `"response.output_text.delta"` - -### Response Text Done Event - -- `ResponseTextDoneEvent = object { content_index, item_id, logprobs, 4 more }` - - Emitted when text content is finalized. - - - `content_index: number` - - The index of the content part that the text content is finalized. - - - `item_id: string` - - The ID of the output item that the text content is finalized. - - - `logprobs: array of object { token, logprob, top_logprobs }` - - The log probabilities of the tokens in the delta. - - - `token: string` - - A possible text token. - - - `logprob: number` - - The log probability of this token. - - - `top_logprobs: optional array of object { token, logprob }` - - The log probability of the top 20 most likely tokens. - - - `token: optional string` - - A possible text token. - - - `logprob: optional number` - - The log probability of this token. - - - `output_index: number` - - The index of the output item that the text content is finalized. - - - `sequence_number: number` - - The sequence number for this event. - - - `text: string` - - The text content that is finalized. - - - `type: "response.output_text.done"` - - The type of the event. Always `response.output_text.done`. - - - `"response.output_text.done"` - -### Response Usage - -- `ResponseUsage = object { input_tokens, input_tokens_details, output_tokens, 2 more }` - - 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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - -### Response Web Search Call Completed Event - -- `ResponseWebSearchCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a web search call is completed. - - - `item_id: string` - - Unique ID for the output item associated with the web search call. - - - `output_index: number` - - The index of the output item that the web search call is associated with. - - - `sequence_number: number` - - The sequence number of the web search call being processed. - - - `type: "response.web_search_call.completed"` - - The type of the event. Always `response.web_search_call.completed`. - - - `"response.web_search_call.completed"` - -### Response Web Search Call In Progress Event - -- `ResponseWebSearchCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a web search call is initiated. - - - `item_id: string` - - Unique ID for the output item associated with the web search call. - - - `output_index: number` - - The index of the output item that the web search call is associated with. - - - `sequence_number: number` - - The sequence number of the web search call being processed. - - - `type: "response.web_search_call.in_progress"` - - The type of the event. Always `response.web_search_call.in_progress`. - - - `"response.web_search_call.in_progress"` - -### Response Web Search Call Searching Event - -- `ResponseWebSearchCallSearchingEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a web search call is executing. - - - `item_id: string` - - Unique ID for the output item associated with the web search call. - - - `output_index: number` - - The index of the output item that the web search call is associated with. - - - `sequence_number: number` - - The sequence number of the web search call being processed. - - - `type: "response.web_search_call.searching"` - - The type of the event. Always `response.web_search_call.searching`. - - - `"response.web_search_call.searching"` - -### Responses Client Event - -- `ResponsesClientEvent = object { type, background, context_management, 27 more }` - - - `type: "response.create"` - - The type of the client event. Always `response.create`. - - - `"response.create"` - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `context_management: optional array of object { type, compact_threshold }` - - Context management configuration for this request. - - - `type: string` - - The context management entry type. Currently only 'compaction' is supported. - - - `compact_threshold: optional number` - - Token threshold at which compaction should be triggered for this entry. - - - `conversation: optional string or ResponseConversationParam` - - The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request. - Input items and output items from this response are automatically added to this conversation after this response completes. - - - `ConversationID = string` - - The unique ID of the conversation. - - - `ResponseConversationParam = object { id }` - - The conversation that this response belongs to. - - - `id: string` - - The unique ID of the conversation. - - - `include: optional array of ResponseIncludable` - - Specify additional output data to include in the model response. Currently supported values are: - - - `web_search_call.action.sources`: Include the sources of the web search tool call. - - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items. - - `computer_call_output.output.image_url`: Include image urls from the computer call output. - - `file_search_call.results`: Include the search results of the file search tool call. - - `message.input_image.image_url`: Include image urls from the input message. - - `message.output_text.logprobs`: Include logprobs with assistant messages. - - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program). - - - `"file_search_call.results"` - - - `"web_search_call.results"` - - - `"web_search_call.action.sources"` - - - `"message.input_image.image_url"` - - - `"computer_call_output.output.image_url"` - - - `"code_interpreter_call.outputs"` - - - `"reasoning.encrypted_content"` - - - `"message.output_text.logprobs"` - - - `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - Text, image, or file inputs to the model, used to generate a response. - - Learn more: - - - [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. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `instructions: optional string` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `metadata: optional Metadata` - - 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. - - - `model: optional ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `parallel_tool_calls: optional boolean` - - Whether to allow the model to run tool calls in parallel. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `store: optional boolean` - - Whether to store the generated model response for later retrieval via - API. - - - `stream: optional boolean` - - 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](/docs/api-reference/responses-streaming) - for more information. - - - `stream_options: optional object { include_obfuscation }` - - Options for streaming responses. Only set this when you set `stream: true`. - - - `include_obfuscation: optional boolean` - - When true, stream obfuscation will be enabled. Stream obfuscation adds - random characters to an `obfuscation` field on streaming delta events to - normalize payload sizes as a mitigation to certain side-channel attacks. - These obfuscation fields are included by default, but add a small amount - of overhead to the data stream. You can set `include_obfuscation` to - false to optimize for bandwidth if you trust the network links between - your application and the OpenAI API. - - - `temperature: optional number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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"` - - - `tool_choice: optional ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: optional array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_logprobs: optional number` - - An integer between 0 and 20 specifying the number of most likely tokens to - return at each token position, each with an associated log probability. - - - `top_p: optional 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. - - - `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"` - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - -### Responses Server Event - -- `ResponsesServerEvent = ResponseAudioDeltaEvent or ResponseAudioDoneEvent or ResponseAudioTranscriptDeltaEvent or 50 more` - - Server events emitted by the Responses WebSocket server. - - - `ResponseAudioDeltaEvent = object { delta, sequence_number, type }` - - Emitted when there is a partial audio response. - - - `delta: string` - - A chunk of Base64 encoded response audio bytes. - - - `sequence_number: number` - - A sequence number for this chunk of the stream response. - - - `type: "response.audio.delta"` - - The type of the event. Always `response.audio.delta`. - - - `"response.audio.delta"` - - - `ResponseAudioDoneEvent = object { sequence_number, type }` - - Emitted when the audio response is complete. - - - `sequence_number: number` - - The sequence number of the delta. - - - `type: "response.audio.done"` - - The type of the event. Always `response.audio.done`. - - - `"response.audio.done"` - - - `ResponseAudioTranscriptDeltaEvent = object { delta, sequence_number, type }` - - Emitted when there is a partial transcript of audio. - - - `delta: string` - - The partial transcript of the audio response. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.audio.transcript.delta"` - - The type of the event. Always `response.audio.transcript.delta`. - - - `"response.audio.transcript.delta"` - - - `ResponseAudioTranscriptDoneEvent = object { sequence_number, type }` - - Emitted when the full audio transcript is completed. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.audio.transcript.done"` - - The type of the event. Always `response.audio.transcript.done`. - - - `"response.audio.transcript.done"` - - - `ResponseCodeInterpreterCallCodeDeltaEvent = object { delta, item_id, output_index, 2 more }` - - Emitted when a partial code snippet is streamed by the code interpreter. - - - `delta: string` - - The partial code snippet being streamed by the code interpreter. - - - `item_id: string` - - The unique identifier of the code interpreter tool call item. - - - `output_index: number` - - The index of the output item in the response for which the code is being streamed. - - - `sequence_number: number` - - The sequence number of this event, used to order streaming events. - - - `type: "response.code_interpreter_call_code.delta"` - - The type of the event. Always `response.code_interpreter_call_code.delta`. - - - `"response.code_interpreter_call_code.delta"` - - - `ResponseCodeInterpreterCallCodeDoneEvent = object { code, item_id, output_index, 2 more }` - - Emitted when the code snippet is finalized by the code interpreter. - - - `code: string` - - The final code snippet output by the code interpreter. - - - `item_id: string` - - The unique identifier of the code interpreter tool call item. - - - `output_index: number` - - The index of the output item in the response for which the code is finalized. - - - `sequence_number: number` - - The sequence number of this event, used to order streaming events. - - - `type: "response.code_interpreter_call_code.done"` - - The type of the event. Always `response.code_interpreter_call_code.done`. - - - `"response.code_interpreter_call_code.done"` - - - `ResponseCodeInterpreterCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when the code interpreter call is completed. - - - `item_id: string` - - The unique identifier of the code interpreter tool call item. - - - `output_index: number` - - The index of the output item in the response for which the code interpreter call is completed. - - - `sequence_number: number` - - The sequence number of this event, used to order streaming events. - - - `type: "response.code_interpreter_call.completed"` - - The type of the event. Always `response.code_interpreter_call.completed`. - - - `"response.code_interpreter_call.completed"` - - - `ResponseCodeInterpreterCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a code interpreter call is in progress. - - - `item_id: string` - - The unique identifier of the code interpreter tool call item. - - - `output_index: number` - - The index of the output item in the response for which the code interpreter call is in progress. - - - `sequence_number: number` - - The sequence number of this event, used to order streaming events. - - - `type: "response.code_interpreter_call.in_progress"` - - The type of the event. Always `response.code_interpreter_call.in_progress`. - - - `"response.code_interpreter_call.in_progress"` - - - `ResponseCodeInterpreterCallInterpretingEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when the code interpreter is actively interpreting the code snippet. - - - `item_id: string` - - The unique identifier of the code interpreter tool call item. - - - `output_index: number` - - The index of the output item in the response for which the code interpreter is interpreting code. - - - `sequence_number: number` - - The sequence number of this event, used to order streaming events. - - - `type: "response.code_interpreter_call.interpreting"` - - The type of the event. Always `response.code_interpreter_call.interpreting`. - - - `"response.code_interpreter_call.interpreting"` - - - `ResponseCompletedEvent = object { response, sequence_number, type }` - - Emitted when the model response is complete. - - - `response: Response` - - Properties of the completed response. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number for this event. - - - `type: "response.completed"` - - The type of the event. Always `response.completed`. - - - `"response.completed"` - - - `ResponseContentPartAddedEvent = object { content_index, item_id, output_index, 3 more }` - - Emitted when a new content part is added. - - - `content_index: number` - - The index of the content part that was added. - - - `item_id: string` - - The ID of the output item that the content part was added to. - - - `output_index: number` - - The index of the output item that the content part was added to. - - - `part: ResponseOutputText or ResponseOutputRefusal or object { text, type }` - - The content part that was added. - - - `ResponseOutputText = object { annotations, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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"` - - - `ReasoningText = object { text, type }` - - Reasoning text from the model. - - - `text: string` - - The reasoning text from the model. - - - `type: "reasoning_text"` - - The type of the reasoning text. Always `reasoning_text`. - - - `"reasoning_text"` - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.content_part.added"` - - The type of the event. Always `response.content_part.added`. - - - `"response.content_part.added"` - - - `ResponseContentPartDoneEvent = object { content_index, item_id, output_index, 3 more }` - - Emitted when a content part is done. - - - `content_index: number` - - The index of the content part that is done. - - - `item_id: string` - - The ID of the output item that the content part was added to. - - - `output_index: number` - - The index of the output item that the content part was added to. - - - `part: ResponseOutputText or ResponseOutputRefusal or object { text, type }` - - The content part that is done. - - - `ResponseOutputText = object { annotations, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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"` - - - `ReasoningText = object { text, type }` - - Reasoning text from the model. - - - `text: string` - - The reasoning text from the model. - - - `type: "reasoning_text"` - - The type of the reasoning text. Always `reasoning_text`. - - - `"reasoning_text"` - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.content_part.done"` - - The type of the event. Always `response.content_part.done`. - - - `"response.content_part.done"` - - - `ResponseCreatedEvent = object { response, sequence_number, type }` - - An event that is emitted when a response is created. - - - `response: Response` - - The response that was created. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number for this event. - - - `type: "response.created"` - - The type of the event. Always `response.created`. - - - `"response.created"` - - - `ResponseErrorEvent = object { code, message, param, 2 more }` - - Emitted when an error occurs. - - - `code: string` - - The error code. - - - `message: string` - - The error message. - - - `param: string` - - The error parameter. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "error"` - - The type of the event. Always `error`. - - - `"error"` - - - `ResponseFileSearchCallCompletedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a file search call is completed (results found). - - - `item_id: string` - - The ID of the output item that the file search call is initiated. - - - `output_index: number` - - The index of the output item that the file search call is initiated. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.file_search_call.completed"` - - The type of the event. Always `response.file_search_call.completed`. - - - `"response.file_search_call.completed"` - - - `ResponseFileSearchCallInProgressEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a file search call is initiated. - - - `item_id: string` - - The ID of the output item that the file search call is initiated. - - - `output_index: number` - - The index of the output item that the file search call is initiated. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.file_search_call.in_progress"` - - The type of the event. Always `response.file_search_call.in_progress`. - - - `"response.file_search_call.in_progress"` - - - `ResponseFileSearchCallSearchingEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when a file search is currently searching. - - - `item_id: string` - - The ID of the output item that the file search call is initiated. - - - `output_index: number` - - The index of the output item that the file search call is searching. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.file_search_call.searching"` - - The type of the event. Always `response.file_search_call.searching`. - - - `"response.file_search_call.searching"` - - - `ResponseFunctionCallArgumentsDeltaEvent = object { delta, item_id, output_index, 2 more }` - - Emitted when there is a partial function-call arguments delta. - - - `delta: string` - - The function-call arguments delta that is added. - - - `item_id: string` - - The ID of the output item that the function-call arguments delta is added to. - - - `output_index: number` - - The index of the output item that the function-call arguments delta is added to. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.function_call_arguments.delta"` - - The type of the event. Always `response.function_call_arguments.delta`. - - - `"response.function_call_arguments.delta"` - - - `ResponseFunctionCallArgumentsDoneEvent = object { arguments, item_id, name, 3 more }` - - Emitted when function-call arguments are finalized. - - - `arguments: string` - - The function-call arguments. - - - `item_id: string` - - The ID of the item. - - - `name: string` - - The name of the function that was called. - - - `output_index: number` - - The index of the output item. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.function_call_arguments.done"` - - - `"response.function_call_arguments.done"` - - - `ResponseInProgressEvent = object { response, sequence_number, type }` - - Emitted when the response is in progress. - - - `response: Response` - - The response that is in progress. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.in_progress"` - - The type of the event. Always `response.in_progress`. - - - `"response.in_progress"` - - - `ResponseFailedEvent = object { response, sequence_number, type }` - - An event that is emitted when a response fails. - - - `response: Response` - - The response that failed. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.failed"` - - The type of the event. Always `response.failed`. - - - `"response.failed"` - - - `ResponseIncompleteEvent = object { response, sequence_number, type }` - - An event that is emitted when a response finishes as incomplete. - - - `response: Response` - - The response that was incomplete. - - - `id: string` - - Unique identifier for this Response. - - - `created_at: number` - - Unix timestamp (in seconds) of when this Response was created. - - - `error: ResponseError` - - An error object returned when the model fails to generate a Response. - - - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 15 more` - - The error code for the response. - - - `"server_error"` - - - `"rate_limit_exceeded"` - - - `"invalid_prompt"` - - - `"vector_store_timeout"` - - - `"invalid_image"` - - - `"invalid_image_format"` - - - `"invalid_base64_image"` - - - `"invalid_image_url"` - - - `"image_too_large"` - - - `"image_too_small"` - - - `"image_parse_error"` - - - `"image_content_policy_violation"` - - - `"invalid_image_mode"` - - - `"image_file_too_large"` - - - `"unsupported_image_media_type"` - - - `"empty_image_file"` - - - `"failed_to_download_image"` - - - `"image_file_not_found"` - - - `message: string` - - A human-readable description of the error. - - - `incomplete_details: object { reason }` - - Details about why the response is incomplete. - - - `reason: optional "max_output_tokens" or "content_filter"` - - The reason why the response is incomplete. - - - `"max_output_tokens"` - - - `"content_filter"` - - - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 more` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - A text input to the model, equivalent to a text input with the - `developer` role. - - - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 25 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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](/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. - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `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, 2 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 ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - Text, image, or file output of the function tool call. - - - `string` - - A JSON string of the output of the function tool call. - - - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent` - - An array of content outputs (text, image, file) for the function tool call. - - - `ResponseInputTextContent = object { text, type }` - - 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"` - - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision) - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `detail: optional "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `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, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by the tool search output. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `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"` - - - `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`. - - - `"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](/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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { action, call_id, type, 3 more }` - - A tool representing a request to execute one or more shell commands. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - Ordered shell commands for the execution environment to run. - - - `max_output_length: optional number` - - Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - - - `timeout_ms: optional number` - - Maximum wall-clock time in milliseconds to allow the shell commands to run. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `id: optional string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `environment: optional LocalEnvironment or ContainerReference` - - The environment to execute the shell commands in. - - - `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"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCallOutput = object { call_id, output, type, 3 more }` - - The streamed output items emitted by a shell tool call. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `output: array of ResponseFunctionShellCallOutputContent` - - Captured chunks of stdout and stderr output, along with their associated outcomes. - - - `outcome: object { type } or object { exit_code, type }` - - The exit or timeout outcome associated with this shell call. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - The exit code returned by the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - Captured stderr output for the shell call. - - - `stdout: string` - - Captured stdout output for the shell call. - - - `type: "shell_call_output"` - - The type of the item. Always `shell_call_output`. - - - `"shell_call_output"` - - - `id: optional string` - - The unique ID of the shell tool call output. Populated when this item is returned via API. - - - `max_output_length: optional number` - - The maximum number of UTF-8 characters captured for this shell call's combined output. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` - - A tool call representing a request to create, delete, or update files using diff patches. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - The specific create, delete, or update instruction for the apply_patch tool call. - - - `CreateFile = object { diff, path, type }` - - Instruction for creating a new file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply when creating the file. - - - `path: string` - - Path of the file to create relative to the workspace root. - - - `type: "create_file"` - - The operation type. Always `create_file`. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction for deleting an existing file via the apply_patch tool. - - - `path: string` - - Path of the file to delete relative to the workspace root. - - - `type: "delete_file"` - - The operation type. Always `delete_file`. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction for updating an existing file via the apply_patch tool. - - - `diff: string` - - Unified diff content to apply to the existing file. - - - `path: string` - - Path of the file to update relative to the workspace root. - - - `type: "update_file"` - - The operation type. Always `update_file`. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `id: optional string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` - - The streamed output emitted by an apply patch tool call. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `id: optional string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `output: optional string` - - Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - - `McpListTools = object { id, server_label, tools, 2 more }` - - A list of tools available on an MCP server. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` - - A response to an MCP approval request. - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `id: optional string` - - The unique ID of the approval response - - - `reason: optional string` - - 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"` - - - `CustomToolCallOutput = object { call_id, output, type, id }` - - The output of a custom tool call from your code, being sent back to the model. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `ItemReference = object { id, type }` - - An internal identifier for an item to reference. - - - `id: string` - - The ID of the item to reference. - - - `type: optional "item_reference"` - - The type of item to reference. Always `item_reference`. - - - `"item_reference"` - - - `metadata: Metadata` - - 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. - - - `model: ResponsesModel` - - 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. - - - `string` - - - `"gpt-5.4" or "gpt-5.4-mini" or "gpt-5.4-nano" or 75 more` - - - `"gpt-5.4"` - - - `"gpt-5.4-mini"` - - - `"gpt-5.4-nano"` - - - `"gpt-5.4-mini-2026-03-17"` - - - `"gpt-5.4-nano-2026-03-17"` - - - `"gpt-5.3-chat-latest"` - - - `"gpt-5.2"` - - - `"gpt-5.2-2025-12-11"` - - - `"gpt-5.2-chat-latest"` - - - `"gpt-5.2-pro"` - - - `"gpt-5.2-pro-2025-12-11"` - - - `"gpt-5.1"` - - - `"gpt-5.1-2025-11-13"` - - - `"gpt-5.1-codex"` - - - `"gpt-5.1-mini"` - - - `"gpt-5.1-chat-latest"` - - - `"gpt-5"` - - - `"gpt-5-mini"` - - - `"gpt-5-nano"` - - - `"gpt-5-2025-08-07"` - - - `"gpt-5-mini-2025-08-07"` - - - `"gpt-5-nano-2025-08-07"` - - - `"gpt-5-chat-latest"` - - - `"gpt-4.1"` - - - `"gpt-4.1-mini"` - - - `"gpt-4.1-nano"` - - - `"gpt-4.1-2025-04-14"` - - - `"gpt-4.1-mini-2025-04-14"` - - - `"gpt-4.1-nano-2025-04-14"` - - - `"o4-mini"` - - - `"o4-mini-2025-04-16"` - - - `"o3"` - - - `"o3-2025-04-16"` - - - `"o3-mini"` - - - `"o3-mini-2025-01-31"` - - - `"o1"` - - - `"o1-2024-12-17"` - - - `"o1-preview"` - - - `"o1-preview-2024-09-12"` - - - `"o1-mini"` - - - `"o1-mini-2024-09-12"` - - - `"gpt-4o"` - - - `"gpt-4o-2024-11-20"` - - - `"gpt-4o-2024-08-06"` - - - `"gpt-4o-2024-05-13"` - - - `"gpt-4o-audio-preview"` - - - `"gpt-4o-audio-preview-2024-10-01"` - - - `"gpt-4o-audio-preview-2024-12-17"` - - - `"gpt-4o-audio-preview-2025-06-03"` - - - `"gpt-4o-mini-audio-preview"` - - - `"gpt-4o-mini-audio-preview-2024-12-17"` - - - `"gpt-4o-search-preview"` - - - `"gpt-4o-mini-search-preview"` - - - `"gpt-4o-search-preview-2025-03-11"` - - - `"gpt-4o-mini-search-preview-2025-03-11"` - - - `"chatgpt-4o-latest"` - - - `"codex-mini-latest"` - - - `"gpt-4o-mini"` - - - `"gpt-4o-mini-2024-07-18"` - - - `"gpt-4-turbo"` - - - `"gpt-4-turbo-2024-04-09"` - - - `"gpt-4-0125-preview"` - - - `"gpt-4-turbo-preview"` - - - `"gpt-4-1106-preview"` - - - `"gpt-4-vision-preview"` - - - `"gpt-4"` - - - `"gpt-4-0314"` - - - `"gpt-4-0613"` - - - `"gpt-4-32k"` - - - `"gpt-4-32k-0314"` - - - `"gpt-4-32k-0613"` - - - `"gpt-3.5-turbo"` - - - `"gpt-3.5-turbo-16k"` - - - `"gpt-3.5-turbo-0301"` - - - `"gpt-3.5-turbo-0613"` - - - `"gpt-3.5-turbo-1106"` - - - `"gpt-3.5-turbo-0125"` - - - `"gpt-3.5-turbo-16k-0613"` - - - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 11 more` - - - `"o1-pro"` - - - `"o1-pro-2025-03-19"` - - - `"o3-pro"` - - - `"o3-pro-2025-06-10"` - - - `"o3-deep-research"` - - - `"o3-deep-research-2025-06-26"` - - - `"o4-mini-deep-research"` - - - `"o4-mini-deep-research-2025-06-26"` - - - `"computer-use-preview"` - - - `"computer-use-preview-2025-03-11"` - - - `"gpt-5-codex"` - - - `"gpt-5-pro"` - - - `"gpt-5-pro-2025-10-06"` - - - `"gpt-5.1-codex-max"` - - - `object: "response"` - - The object type of this resource - always set to `response`. - - - `"response"` - - - `output: array of ResponseOutputItem` - - An array of content items generated by the model. - - - The length and order of items in the `output` array is dependent - on the model's response. - - Rather than accessing the first item in the `output` array and - assuming it's an `assistant` message with the content generated by - the model, you might consider using the `output_text` property where - supported in SDKs. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `parallel_tool_calls: boolean` - - Whether to allow the model to run tool calls in parallel. - - - `temperature: number` - - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. - - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. - - - `ToolChoiceOptions = "none" or "auto" or "required"` - - Controls which (if any) tool is called by the model. - - `none` means the model will not call any tool and instead generates a message. - - `auto` means the model can pick between generating a message or calling one or - more tools. - - `required` means the model must call one or more tools. - - - `"none"` - - - `"auto"` - - - `"required"` - - - `ToolChoiceAllowed = object { mode, tools, type }` - - Constrains the tools available to the model to a pre-defined set. - - - `mode: "auto" or "required"` - - Constrains the tools available to the model to a pre-defined set. - - `auto` allows the model to pick from among the allowed tools and generate a - message. - - `required` requires the model to call one or more of the allowed tools. - - - `"auto"` - - - `"required"` - - - `tools: array of map[unknown]` - - A list of tool definitions that the model should be allowed to call. - - For the Responses API, the list of tool definitions might look like: - - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` - - - `type: "allowed_tools"` - - Allowed tool configuration type. Always `allowed_tools`. - - - `"allowed_tools"` - - - `ToolChoiceTypes = object { type }` - - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). - - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). - - Allowed values are: - - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` - - - `"file_search"` - - - `"web_search_preview"` - - - `"computer"` - - - `"computer_use_preview"` - - - `"computer_use"` - - - `"web_search_preview_2025_03_11"` - - - `"image_generation"` - - - `"code_interpreter"` - - - `ToolChoiceFunction = object { name, type }` - - Use this option to force the model to call a specific function. - - - `name: string` - - The name of the function to call. - - - `type: "function"` - - For function calling, the type is always `function`. - - - `"function"` - - - `ToolChoiceMcp = object { server_label, type, name }` - - Use this option to force the model to call a specific tool on a remote MCP server. - - - `server_label: string` - - The label of the MCP server to use. - - - `type: "mcp"` - - For MCP tools, the type is always `mcp`. - - - `"mcp"` - - - `name: optional string` - - The name of the tool to call on the server. - - - `ToolChoiceCustom = object { name, type }` - - Use this option to force the model to call a specific custom tool. - - - `name: string` - - The name of the custom tool to call. - - - `type: "custom"` - - For custom tool calling, the type is always `custom`. - - - `"custom"` - - - `ToolChoiceApplyPatch = object { type }` - - Forces the model to call the apply_patch tool when executing a tool call. - - - `type: "apply_patch"` - - The tool to call. Always `apply_patch`. - - - `"apply_patch"` - - - `ToolChoiceShell = object { type }` - - Forces the model to call the shell tool when a tool call is required. - - - `type: "shell"` - - The tool to call. Always `shell`. - - - `"shell"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. - - We support the following categories of tools: - - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `top_p: number` - - An alternative to sampling with temperature, called nucleus sampling, - where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. - - - `background: optional boolean` - - Whether to run the model response in the background. - [Learn more](/docs/guides/background). - - - `completed_at: optional number` - - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. - - - `conversation: optional object { id }` - - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - - `id: string` - - The unique ID of the conversation that this response was associated with. - - - `max_output_tokens: optional number` - - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). - - - `max_tool_calls: optional number` - - The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - - - `output_text: optional string` - - SDK-only convenience property that contains the aggregated text output - from all `output_text` items in the `output` array, if any are present. - Supported in the Python and JavaScript SDKs. - - - `previous_response_id: optional string` - - The unique ID of the previous response to the model. Use this to - create multi-turn conversations. Learn more about - [conversation state](/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - - `prompt: optional ResponsePrompt` - - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - - `id: string` - - The unique identifier of the prompt template to use. - - - `variables: optional map[string or 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `version: optional string` - - Optional version of the prompt template. - - - `prompt_cache_key: optional string` - - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). - - - `prompt_cache_retention: optional "in-memory" or "24h"` - - 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). - - - `"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). - - - `effort: optional ReasoningEffort` - - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - - `"none"` - - - `"minimal"` - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"xhigh"` - - - `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"` - - - `summary: optional "auto" or "concise" or "detailed"` - - A summary of the reasoning performed by the model. This can be - useful for debugging and understanding the model's reasoning process. - One of `auto`, `concise`, or `detailed`. - - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - - `"auto"` - - - `"concise"` - - - `"detailed"` - - - `safety_identifier: optional string` - - A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - Specifies the processing type used for serving the request. - - - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - - When not set, the default behavior is 'auto'. - - When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - - - `"auto"` - - - `"default"` - - - `"flex"` - - - `"scale"` - - - `"priority"` - - - `status: optional 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](/docs/guides/text) - - [Structured Outputs](/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](/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](/docs/guides/structured-outputs). - - - `name: string` - - The name of the response format. Must be a-z, A-Z, 0-9, or contain - underscores and dashes, with a maximum length of 64. - - - `schema: map[unknown]` - - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). - - - `type: "json_schema"` - - The type of response format being defined. Always `json_schema`. - - - `"json_schema"` - - - `description: optional string` - - A description of what the response format is for, used by the model to - determine how to respond in the format. - - - `strict: optional boolean` - - Whether to enable strict schema adherence when generating the output. - If set to true, the model will always follow the exact schema defined - in the `schema` field. Only a subset of JSON Schema is supported when - `strict` is `true`. To learn more, read the [Structured Outputs - guide](/docs/guides/structured-outputs). - - - `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 number of most likely tokens to - return at each token position, each with an associated log probability. - - - `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 { cached_tokens }` - - A detailed breakdown of the input tokens. - - - `cached_tokens: number` - - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). - - - `output_tokens: number` - - The number of output tokens. - - - `output_tokens_details: object { reasoning_tokens }` - - A detailed breakdown of the output tokens. - - - `reasoning_tokens: number` - - The number of reasoning tokens. - - - `total_tokens: number` - - The total number of tokens used. - - - `user: optional string` - - This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. - A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers). - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.incomplete"` - - The type of the event. Always `response.incomplete`. - - - `"response.incomplete"` - - - `ResponseOutputItemAddedEvent = object { item, output_index, sequence_number, type }` - - Emitted when a new output item is added. - - - `item: ResponseOutputItem` - - The output item that was added. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `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. - - - `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, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` - - Instruction describing how to update a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to update. - - - `type: "update_file"` - - Update an existing file with the provided diff. - - - `"update_file"` - - - `status: "in_progress" or "completed"` - - The status of the apply patch tool call. One of `in_progress` or `completed`. - - - `"in_progress"` - - - `"completed"` - - - `type: "apply_patch_call"` - - The type of the item. Always `apply_patch_call`. - - - `"apply_patch_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` - - The output emitted by an apply patch tool call. - - - `id: string` - - The unique ID of the apply patch tool call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `status: "completed" or "failed"` - - The status of the apply patch tool call output. One of `completed` or `failed`. - - - `"completed"` - - - `"failed"` - - - `type: "apply_patch_call_output"` - - The type of the item. Always `apply_patch_call_output`. - - - `"apply_patch_call_output"` - - - `created_by: optional string` - - The ID of the entity that created this tool call output. - - - `output: optional string` - - 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. - - - `id: string` - - The unique ID of the list. - - - `server_label: string` - - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` - - Error message if the server could not list tools. - - - `McpApprovalRequest = object { id, arguments, name, 2 more }` - - A request for human approval of a tool invocation. - - - `id: string` - - The unique ID of the approval request. - - - `arguments: string` - - A JSON string of arguments for the tool. - - - `name: string` - - The name of the tool to run. - - - `server_label: string` - - The label of the MCP server making the request. - - - `type: "mcp_approval_request"` - - The type of the item. Always `mcp_approval_request`. - - - `"mcp_approval_request"` - - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` - - A response to an MCP approval request. - - - `id: string` - - The unique ID of the approval response - - - `approval_request_id: string` - - The ID of the approval request being answered. - - - `approve: boolean` - - Whether the request was approved. - - - `type: "mcp_approval_response"` - - The type of the item. Always `mcp_approval_response`. - - - `"mcp_approval_response"` - - - `reason: optional string` - - Optional reason for the decision. - - - `CustomToolCall = object { call_id, input, name, 3 more }` - - A call to a custom tool created by the model. - - - `call_id: string` - - An identifier used to map this custom tool call to a tool call output. - - - `input: string` - - The input for the custom tool call generated by the model. - - - `name: string` - - The name of the custom tool being called. - - - `type: "custom_tool_call"` - - The type of the custom tool call. Always `custom_tool_call`. - - - `"custom_tool_call"` - - - `id: optional string` - - The unique ID of the custom tool call in the OpenAI platform. - - - `namespace: optional string` - - The namespace of the custom tool being called. - - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` - - - `id: string` - - The unique ID of the custom tool call output item. - - - `call_id: string` - - The call ID, used to map this custom tool call output to a custom tool call. - - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - The output from the custom tool call generated by your code. - Can be a string or an list of output content. - - - `StringOutput = string` - - A string of the output of the custom tool call. - - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` - - Text, image, or file output of the custom tool call. - - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `output_index: number` - - The index of the output item that was added. - - - `sequence_number: number` - - The sequence number of this event. - - - `type: "response.output_item.added"` - - The type of the event. Always `response.output_item.added`. - - - `"response.output_item.added"` - - - `ResponseOutputItemDoneEvent = object { item, output_index, sequence_number, type }` - - Emitted when an output item is marked done. - - - `item: ResponseOutputItem` - - The output item that was marked done. - - - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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](/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, 4 more }` - - A tool call to run a function. See the - [function calling guide](/docs/guides/function-calling) for more information. - - - `arguments: string` - - A JSON string of the arguments to pass to the function. - - - `call_id: string` - - The unique ID of the function tool call generated by the model. - - - `name: string` - - The name of the function to run. - - - `type: "function_call"` - - The type of the function tool call. Always `function_call`. - - - `"function_call"` - - - `id: optional string` - - The unique ID of the function tool call. - - - `namespace: optional string` - - The namespace of the function to run. - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `FunctionCallOutput = object { id, call_id, output, 3 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 }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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"` - - - `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](/docs/guides/tools-web-search) for more information. - - - `id: string` - - The unique ID of the web search tool call. - - - `action: object { query, type, queries, 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 { query, type, queries, sources }` - - Action type "search" - Performs a web search query. - - - `query: string` - - [DEPRECATED] The search query. - - - `type: "search"` - - The action type. - - - `"search"` - - - `queries: optional array of string` - - The search queries. - - - `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](/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. - - - `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` - - 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`. - - - `"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"` - - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` - - - `id: string` - - The unique ID of the tool search call item. - - - `arguments: unknown` - - Arguments used for the tool search call. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search call item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "tool_search_call"` - - The type of the item. Always `tool_search_call`. - - - `"tool_search_call"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` - - - `id: string` - - The unique ID of the tool search output item. - - - `call_id: string` - - The unique ID of the tool search call generated by the model. - - - `execution: "server" or "client"` - - Whether tool search was executed by the server or by the client. - - - `"server"` - - - `"client"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the tool search output item that was recorded. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - - The loaded tool definitions returned by tool search. - - - `Function = object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. - - - `type: "function"` - - The type of the function tool. Always `function`. - - - `"function"` - - - `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. - - - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - - `max_num_results: optional number` - - The maximum number of results to return. This number should be between 1 and 50 inclusive. - - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - Ranking options for search. - - - `hybrid_search: optional object { embedding_weight, text_weight }` - - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - - `embedding_weight: number` - - The weight of the embedding in the reciprocal ranking fusion. - - - `text_weight: number` - - The weight of the text in the reciprocal ranking fusion. - - - `ranker: optional "auto" or "default-2024-11-15"` - - The ranker to use for the file search. - - - `"auto"` - - - `"default-2024-11-15"` - - - `score_threshold: optional number` - - The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. - - - `Computer = object { type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `type: "computer"` - - The type of the computer tool. Always `computer`. - - - `"computer"` - - - `ComputerUsePreview = object { display_height, display_width, environment, type }` - - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - - `display_height: number` - - The height of the computer display. - - - `display_width: number` - - The width of the computer display. - - - `environment: "windows" or "mac" or "linux" or 2 more` - - The type of computer environment to control. - - - `"windows"` - - - `"mac"` - - - `"linux"` - - - `"ubuntu"` - - - `"browser"` - - - `type: "computer_use_preview"` - - The type of the computer use tool. Always `computer_use_preview`. - - - `"computer_use_preview"` - - - `WebSearch = object { type, filters, search_context_size, user_location }` - - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). - - - `type: "web_search" or "web_search_2025_08_26"` - - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - - `"web_search"` - - - `"web_search_2025_08_26"` - - - `filters: optional object { allowed_domains }` - - Filters for the search. - - - `allowed_domains: optional array of string` - - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. - - Example: `["pubmed.ncbi.nlm.nih.gov"]` - - - `search_context_size: optional "low" or "medium" or "high"` - - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `user_location: optional object { city, country, region, 2 more }` - - The approximate location of the user. - - - `city: optional string` - - Free text input for the city of the user, e.g. `San Francisco`. - - - `country: optional string` - - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - - `region: optional string` - - Free text input for the region of the user, e.g. `California`. - - - `timezone: optional string` - - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - - `type: optional "approximate"` - - The type of location approximation. Always `approximate`. - - - `"approximate"` - - - `Mcp = object { server_label, type, allowed_tools, 7 more }` - - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - - - `server_label: string` - - A label for this MCP server, used to identify it in tool calls. - - - `type: "mcp"` - - The type of the MCP tool. Always `mcp`. - - - `"mcp"` - - - `allowed_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` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). - - Currently supported `connector_id` values are: - - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` - - - `"connector_dropbox"` - - - `"connector_gmail"` - - - `"connector_googlecalendar"` - - - `"connector_googledrive"` - - - `"connector_microsoftteams"` - - - `"connector_outlookcalendar"` - - - `"connector_outlookemail"` - - - `"connector_sharepoint"` - - - `defer_loading: optional boolean` - - Whether this MCP tool is deferred and discovered via tool search. - - - `headers: optional map[string]` - - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. - - - `require_approval: optional object { always, never } or "always" or "never"` - - Specify which of the MCP server's tools require approval. - - - `McpToolApprovalFilter = object { always, never }` - - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. - - - `always: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `never: optional object { read_only, tool_names }` - - A filter object to specify which tools are allowed. - - - `read_only: optional boolean` - - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. - - - `tool_names: optional array of string` - - List of allowed tool names. - - - `McpToolApprovalSetting = "always" or "never"` - - Specify a single approval policy for all tools. One of `always` or - `never`. When set to `always`, all tools will require approval. When - set to `never`, all tools will not require approval. - - - `"always"` - - - `"never"` - - - `server_description: optional string` - - Optional description of the MCP server, used to provide more context. - - - `server_url: optional string` - - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. - - - `CodeInterpreter = object { container, type }` - - 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` - - - `type: "disabled"` - - Disable outbound network access. Always `disabled`. - - - `"disabled"` + Reference to a prompt template and its variables. + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `id: string` - - `allowed_domains: array of string` + The unique identifier of the prompt template to use. - A list of allowed domains when type is `allowlist`. + - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile]` - - `type: "allowlist"` + 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. - Allow outbound network access only to specified domains. Always `allowlist`. + - `string` - - `"allowlist"` + - `ResponseInputText object { text, type }` - - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret` + A text input to the model. - Optional domain-scoped secrets for allowlisted domains. + - `ResponseInputImage object { detail, type, file_id, image_url }` - - `domain: string` + An image input to the model. Learn about [image inputs](/docs/guides/vision). - The domain associated with the secret. + - `ResponseInputFile object { type, detail, file_data, 3 more }` - - `name: string` + A file input to the model. - The name of the secret to inject for the domain. + - `version: optional string` - - `value: string` + Optional version of the prompt template. - The secret value to inject for the domain. + - `prompt_cache_key: optional string` - - `skills: optional array of SkillReference or InlineSkill` + 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). - An optional list of skills referenced by id or inline data. + - `prompt_cache_retention: optional "in-memory" or "24h"` - - `SkillReference = object { skill_id, type, version }` + 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). - - `skill_id: string` + - `"in-memory"` - The ID of the referenced skill. + - `"24h"` - - `type: "skill_reference"` + - `reasoning: optional Reasoning` - References a skill created with the /v1/skills endpoint. + **gpt-5 and o-series models only** - - `"skill_reference"` + Configuration options for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). - - `version: optional string` + - `effort: optional ReasoningEffort` - Optional skill version. Use a positive integer or 'latest'. Omit for default. + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). + Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing + reasoning effort can result in faster responses and fewer tokens used + on reasoning in a response. - - `InlineSkill = object { description, name, source, type }` + - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. + - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. + - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. + - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - `description: string` + - `"none"` - The description of the skill. + - `"minimal"` - - `name: string` + - `"low"` - The name of the skill. + - `"medium"` - - `source: InlineSkillSource` + - `"high"` - Inline skill payload + - `"xhigh"` - - `data: string` + - `generate_summary: optional "auto" or "concise" or "detailed"` - Base64-encoded skill zip bundle. + **Deprecated:** use `summary` instead. - - `media_type: "application/zip"` + 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 media type of the inline skill payload. Must be `application/zip`. + - `"auto"` - - `"application/zip"` + - `"concise"` - - `type: "base64"` + - `"detailed"` - The type of the inline skill source. Must be `base64`. + - `summary: optional "auto" or "concise" or "detailed"` - - `"base64"` + 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`. - - `type: "inline"` + `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - Defines an inline skill for this request. + - `"auto"` - - `"inline"` + - `"concise"` - - `LocalEnvironment = object { type, skills }` + - `"detailed"` - - `type: "local"` + - `safety_identifier: optional string` - Use a local computer environment. + 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). - - `"local"` + - `service_tier: optional "auto" or "default" or "flex" or 2 more` - - `skills: optional array of LocalSkill` + Specifies the processing type used for serving the request. - An optional list of skills. + - 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'. - - `description: string` + When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - The description of the skill. + - `"auto"` - - `name: string` + - `"default"` - The name of the skill. + - `"flex"` - - `path: string` + - `"scale"` - The path to the directory containing the skill. + - `"priority"` - - `ContainerReference = object { container_id, type }` + - `store: optional boolean` - - `container_id: string` + Whether to store the generated model response for later retrieval via + API. - The ID of the referenced container. + - `stream: optional boolean` - - `type: "container_reference"` + 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](/docs/api-reference/responses-streaming) + for more information. - References a container created with the /v1/containers endpoint + - `stream_options: optional object { include_obfuscation }` - - `"container_reference"` + Options for streaming responses. Only set this when you set `stream: true`. - - `Custom = object { name, type, defer_loading, 2 more }` + - `include_obfuscation: optional boolean` - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + When true, stream obfuscation will be enabled. Stream obfuscation adds + random characters to an `obfuscation` field on streaming delta events to + normalize payload sizes as a mitigation to certain side-channel attacks. + These obfuscation fields are included by default, but add a small amount + of overhead to the data stream. You can set `include_obfuscation` to + false to optimize for bandwidth if you trust the network links between + your application and the OpenAI API. - - `name: string` + - `temperature: optional number` - The name of the custom tool, used to identify it in tool calls. + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + We generally recommend altering this or `top_p` but not both. - - `type: "custom"` + - `text: optional ResponseTextConfig` - The type of the custom tool. Always `custom`. + Configuration options for a text response from the model. Can be plain + text or structured JSON data. Learn more: - - `"custom"` + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - - `defer_loading: optional boolean` + - `format: optional ResponseFormatTextConfig` - Whether this tool should be deferred and discovered via tool search. + An object specifying the format that the model must output. - - `description: optional string` + Configuring `{ "type": "json_schema" }` enables Structured Outputs, + which ensures the model will match your supplied JSON schema. Learn more in the + [Structured Outputs guide](/docs/guides/structured-outputs). - Optional description of the custom tool, used to provide more context. + The default format is `{ "type": "text" }` with no additional options. - - `format: optional CustomToolInputFormat` + **Not recommended for gpt-4o and newer models:** - The input format for the custom tool. Default is unconstrained text. + Setting to `{ "type": "json_object" }` enables the older JSON mode, which + ensures the message the model generates is valid JSON. Using `json_schema` + is preferred for models that support it. - - `Text = object { type }` + - `ResponseFormatText object { type }` - Unconstrained free-form text. + Default response format. Used to generate text responses. - `type: "text"` - Unconstrained text format. Always `text`. + The type of response format being defined. 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. + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` - - `description: string` - - A description of the namespace shown to the model. + JSON Schema response format. Used to generate structured JSON responses. + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - `name: string` - The namespace name used in tool calls (for example, `crm`). - - - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` + 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. - - `name: string` + - `schema: map[unknown]` - - `type: "function"` + The schema for the response format, described as a JSON Schema object. + Learn how to build JSON schemas [here](https://json-schema.org/). - - `"function"` + - `type: "json_schema"` - - `defer_loading: optional boolean` + The type of response format being defined. Always `json_schema`. - Whether this function should be deferred and discovered via tool search. + - `"json_schema"` - `description: optional string` - - `parameters: optional unknown` + A description of what the response format is for, used by the model to + determine how to respond in the format. - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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"` - - - `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`. + 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). - - `"web_search_preview"` + - `ResponseFormatJSONObject object { type }` - - `"web_search_preview_2025_03_11"` + 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. - - `search_content_types: optional array of "text" or "image"` + - `type: "json_object"` - - `"text"` + The type of response format being defined. Always `json_object`. - - `"image"` + - `"json_object"` - - `search_context_size: optional "low" or "medium" or "high"` + - `verbosity: 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. + 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"` @@ -222280,1597 +101056,1134 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"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 }` - - 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"` - - - `type: "tool_search_output"` - - The type of the item. Always `tool_search_output`. - - - `"tool_search_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `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. - - - `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"` - - - `"failed"` - - - `type: "code_interpreter_call"` - - The type of the code interpreter tool call. Always `code_interpreter_call`. - - - `"code_interpreter_call"` - - - `LocalShellCall = object { id, action, call_id, 2 more }` - - A tool call to run a command on the local shell. - - - `id: string` - - The unique ID of the local shell call. - - - `action: object { command, env, type, 3 more }` - - Execute a shell command on the server. - - - `command: array of string` - - The command to run. - - - `env: map[string]` - - Environment variables to set for the command. - - - `type: "exec"` - - The type of the local shell action. Always `exec`. - - - `"exec"` - - - `timeout_ms: optional number` - - Optional timeout in milliseconds for the command. - - - `user: optional string` - - Optional user to run the command as. - - - `working_directory: optional string` - - Optional working directory to run the command in. - - - `call_id: string` - - The unique ID of the local shell tool call generated by the model. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the local shell call. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "local_shell_call"` - - The type of the local shell call. Always `local_shell_call`. - - - `"local_shell_call"` - - - `LocalShellCallOutput = object { id, output, type, status }` - - The output of a local shell tool call. - - - `id: string` - - The unique ID of the local shell tool call generated by the model. - - - `output: string` - - A JSON string of the output of the local shell tool call. - - - `type: "local_shell_call_output"` - - The type of the local shell tool call output. Always `local_shell_call_output`. - - - `"local_shell_call_output"` - - - `status: optional "in_progress" or "completed" or "incomplete"` - - The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `ShellCall = object { id, action, call_id, 4 more }` - - A tool call that executes one or more shell commands in a managed environment. - - - `id: string` - - The unique ID of the shell tool call. Populated when this item is returned via API. - - - `action: object { commands, max_output_length, timeout_ms }` - - The shell commands and limits that describe how to run the tool call. - - - `commands: array of string` - - - `max_output_length: number` - - Optional maximum number of characters to return from each command. - - - `timeout_ms: number` - - Optional timeout in milliseconds for the commands. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `environment: ResponseLocalEnvironment or ResponseContainerReference` - - Represents the use of a local environment to perform shell actions. - - - `ResponseLocalEnvironment = object { type }` - - Represents the use of a local environment to perform shell actions. - - - `type: "local"` - - The environment type. Always `local`. - - - `"local"` - - - `ResponseContainerReference = object { container_id, type }` - - Represents a container created with /v1/containers. - - - `container_id: string` - - - `type: "container_reference"` - - The environment type. Always `container_reference`. - - - `"container_reference"` - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call"` - - The type of the item. Always `shell_call`. - - - `"shell_call"` - - - `created_by: optional string` - - The ID of the entity that created this tool call. - - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` - - The output of a shell tool call that was emitted. - - - `id: string` - - The unique ID of the shell call output. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the shell tool call generated by the model. - - - `max_output_length: number` - - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - - - `output: array of object { outcome, stderr, stdout, created_by }` - - An array of shell call output contents - - - `outcome: object { type } or object { exit_code, type }` - - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - - `Timeout = object { type }` - - Indicates that the shell call exceeded its configured time limit. - - - `type: "timeout"` - - The outcome type. Always `timeout`. - - - `"timeout"` - - - `Exit = object { exit_code, type }` - - Indicates that the shell commands finished and returned an exit code. - - - `exit_code: number` - - Exit code from the shell process. - - - `type: "exit"` - - The outcome type. Always `exit`. - - - `"exit"` - - - `stderr: string` - - The standard error output that was captured. - - - `stdout: string` - - The standard output that was captured. - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `status: "in_progress" or "completed" or "incomplete"` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `"in_progress"` - - - `"completed"` - - - `"incomplete"` - - - `type: "shell_call_output"` - - The type of the shell call output. Always `shell_call_output`. - - - `"shell_call_output"` - - - `created_by: optional string` - - The identifier of the actor that created the item. - - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` - - A tool call that applies file diffs by creating, deleting, or updating files. - - - `id: string` - - The unique ID of the apply patch tool call. Populated when this item is returned via API. - - - `call_id: string` - - The unique ID of the apply patch tool call generated by the model. - - - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }` - - One of the create_file, delete_file, or update_file operations applied via apply_patch. - - - `CreateFile = object { diff, path, type }` - - Instruction describing how to create a file via the apply_patch tool. - - - `diff: string` - - Diff to apply. - - - `path: string` - - Path of the file to create. - - - `type: "create_file"` - - Create a new file with the provided diff. - - - `"create_file"` - - - `DeleteFile = object { path, type }` - - Instruction describing how to delete a file via the apply_patch tool. - - - `path: string` - - Path of the file to delete. - - - `type: "delete_file"` - - Delete the specified file. - - - `"delete_file"` - - - `UpdateFile = object { diff, path, type }` + - `tool_choice: optional ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` - Instruction describing how to update a file via the apply_patch tool. + How the model should select which tool (or tools) to use when generating + a response. See the `tools` parameter to see how to specify which tools + the model can call. - - `diff: string` + - `ToolChoiceOptions = "none" or "auto" or "required"` - Diff to apply. + Controls which (if any) tool is called by the model. - - `path: string` + `none` means the model will not call any tool and instead generates a message. - Path of the file to update. + `auto` means the model can pick between generating a message or calling one or + more tools. - - `type: "update_file"` + `required` means the model must call one or more tools. - Update an existing file with the provided diff. + - `"none"` - - `"update_file"` + - `"auto"` - - `status: "in_progress" or "completed"` + - `"required"` - The status of the apply patch tool call. One of `in_progress` or `completed`. + - `ToolChoiceAllowed object { mode, tools, type }` - - `"in_progress"` + Constrains the tools available to the model to a pre-defined set. - - `"completed"` + - `mode: "auto" or "required"` - - `type: "apply_patch_call"` + Constrains the tools available to the model to a pre-defined set. - The type of the item. Always `apply_patch_call`. + `auto` allows the model to pick from among the allowed tools and generate a + message. - - `"apply_patch_call"` + `required` requires the model to call one or more of the allowed tools. - - `created_by: optional string` + - `"auto"` - The ID of the entity that created this tool call. + - `"required"` - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `tools: array of map[unknown]` - The output emitted by an apply patch tool call. + A list of tool definitions that the model should be allowed to call. - - `id: string` + For the Responses API, the list of tool definitions might look like: - The unique ID of the apply patch tool call output. Populated when this item is returned via API. + ```json + [ + { "type": "function", "name": "get_weather" }, + { "type": "mcp", "server_label": "deepwiki" }, + { "type": "image_generation" } + ] + ``` - - `call_id: string` + - `type: "allowed_tools"` - The unique ID of the apply patch tool call generated by the model. + Allowed tool configuration type. Always `allowed_tools`. - - `status: "completed" or "failed"` + - `"allowed_tools"` - The status of the apply patch tool call output. One of `completed` or `failed`. + - `ToolChoiceTypes object { type }` - - `"completed"` + Indicates that the model should use a built-in tool to generate a response. + [Learn more about built-in tools](/docs/guides/tools). - - `"failed"` + - `type: "file_search" or "web_search_preview" or "computer" or 5 more` - - `type: "apply_patch_call_output"` + The type of hosted tool the model should to use. Learn more about + [built-in tools](/docs/guides/tools). - The type of the item. Always `apply_patch_call_output`. + Allowed values are: - - `"apply_patch_call_output"` + - `file_search` + - `web_search_preview` + - `computer` + - `computer_use_preview` + - `computer_use` + - `code_interpreter` + - `image_generation` - - `created_by: optional string` + - `"file_search"` - The ID of the entity that created this tool call output. + - `"web_search_preview"` - - `output: optional string` + - `"computer"` - Optional textual output returned by the apply patch tool. + - `"computer_use_preview"` - - `McpCall = object { id, arguments, name, 6 more }` + - `"computer_use"` - An invocation of a tool on an MCP server. + - `"web_search_preview_2025_03_11"` - - `id: string` + - `"image_generation"` - The unique ID of the tool call. + - `"code_interpreter"` - - `arguments: string` + - `ToolChoiceFunction object { name, type }` - A JSON string of the arguments passed to the tool. + Use this option to force the model to call a specific function. - `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"` + The name of the function to call. - - `"failed"` + - `type: "function"` - - `McpListTools = object { id, server_label, tools, 2 more }` + For function calling, the type is always `function`. - A list of tools available on an MCP server. + - `"function"` - - `id: string` + - `ToolChoiceMcp object { server_label, type, name }` - The unique ID of the list. + Use this option to force the model to call a specific tool on a remote MCP server. - `server_label: string` - The label of the MCP server. - - - `tools: array of object { input_schema, name, annotations, description }` - - The tools available on the server. - - - `input_schema: unknown` - - The JSON schema describing the tool's input. - - - `name: string` - - The name of the tool. - - - `annotations: optional unknown` - - Additional annotations about the tool. - - - `description: optional string` - - The description of the tool. - - - `type: "mcp_list_tools"` - - The type of the item. Always `mcp_list_tools`. - - - `"mcp_list_tools"` - - - `error: optional string` + The label of the MCP server to use. - Error message if the server could not list tools. + - `type: "mcp"` - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + For MCP tools, the type is always `mcp`. - A request for human approval of a tool invocation. + - `"mcp"` - - `id: string` + - `name: optional string` - The unique ID of the approval request. + The name of the tool to call on the server. - - `arguments: string` + - `ToolChoiceCustom object { name, type }` - A JSON string of arguments for the tool. + Use this option to force the model to call a specific custom tool. - `name: string` - The name of the tool to run. + The name of the custom tool to call. - - `server_label: string` + - `type: "custom"` - The label of the MCP server making the request. + For custom tool calling, the type is always `custom`. - - `type: "mcp_approval_request"` + - `"custom"` - The type of the item. Always `mcp_approval_request`. + - `ToolChoiceApplyPatch object { type }` - - `"mcp_approval_request"` + Forces the model to call the apply_patch tool when executing a tool call. - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `type: "apply_patch"` - A response to an MCP approval request. + The tool to call. Always `apply_patch`. - - `id: string` + - `"apply_patch"` - The unique ID of the approval response + - `ToolChoiceShell object { type }` - - `approval_request_id: string` + Forces the model to call the shell tool when a tool call is required. - The ID of the approval request being answered. + - `type: "shell"` - - `approve: boolean` + The tool to call. Always `shell`. - Whether the request was approved. + - `"shell"` - - `type: "mcp_approval_response"` + - `tools: optional array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` - The type of the item. Always `mcp_approval_response`. + An array of tools the model may call while generating a response. You + can specify which tool to use by setting the `tool_choice` parameter. - - `"mcp_approval_response"` + We support the following categories of tools: - - `reason: optional string` + - **Built-in tools**: Tools that are provided by OpenAI that extend the + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). + - **MCP Tools**: Integrations with third-party systems via custom MCP servers + or predefined connectors such as Google Drive and SharePoint. Learn more about + [MCP Tools](/docs/guides/tools-connectors-mcp). + - **Function calls (custom tools)**: Functions that are defined by you, + enabling the model to call your own code with strongly typed arguments + and outputs. Learn more about + [function calling](/docs/guides/function-calling). You can also use + custom tools to call your own code. - Optional reason for the decision. + - `Function object { name, parameters, strict, 3 more }` - - `CustomToolCall = object { call_id, input, name, 3 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). - A call to a custom tool created by the model. + - `name: string` - - `call_id: string` + The name of the function to call. - An identifier used to map this custom tool call to a tool call output. + - `parameters: map[unknown]` - - `input: string` + A JSON schema object describing the parameters of the function. - The input for the custom tool call generated by the model. + - `strict: boolean` - - `name: string` + Whether to enforce strict parameter validation. Default `true`. - The name of the custom tool being called. + - `type: "function"` - - `type: "custom_tool_call"` + The type of the function tool. Always `function`. - The type of the custom tool call. Always `custom_tool_call`. + - `"function"` - - `"custom_tool_call"` + - `defer_loading: optional boolean` - - `id: optional string` + Whether this function is deferred and loaded via tool search. - The unique ID of the custom tool call in the OpenAI platform. + - `description: optional string` - - `namespace: optional string` + A description of the function. Used by the model to determine whether or not to call the function. - The namespace of the custom tool being called. + - `FileSearch object { type, vector_store_ids, filters, 2 more }` - - `CustomToolCallOutput = object { id, call_id, output, 3 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). - - `id: string` + - `type: "file_search"` - The unique ID of the custom tool call output item. + The type of the file search tool. Always `file_search`. - - `call_id: string` + - `"file_search"` - The call ID, used to map this custom tool call output to a custom tool call. + - `vector_store_ids: array of string` - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` + The IDs of the vector stores to search. - The output from the custom tool call generated by your code. - Can be a string or an list of output content. + - `filters: optional ComparisonFilter or CompoundFilter` - - `StringOutput = string` + A filter to apply. - A string of the output of the custom tool call. + - `ComparisonFilter object { key, type, value }` - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` + A filter used to compare a specified attribute key to a given value using a defined comparison operation. - Text, image, or file output of the custom tool call. + - `CompoundFilter object { filters, type }` - - `ResponseInputText = object { text, type }` + Combine multiple filters using `and` or `or`. - A text input to the model. + - `max_num_results: optional number` - - `text: string` + The maximum number of results to return. This number should be between 1 and 50 inclusive. - The text input to the model. + - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` - - `type: "input_text"` + Ranking options for search. - The type of the input item. Always `input_text`. + - `hybrid_search: optional object { embedding_weight, text_weight }` - - `"input_text"` + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `embedding_weight: number` - An image input to the model. Learn about [image inputs](/docs/guides/vision). + The weight of the embedding in the reciprocal ranking fusion. - - `detail: "low" or "high" or "auto" or "original"` + - `text_weight: number` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + The weight of the text in the reciprocal ranking fusion. - - `"low"` + - `ranker: optional "auto" or "default-2024-11-15"` - - `"high"` + The ranker to use for the file search. - `"auto"` - - `"original"` - - - `type: "input_image"` + - `"default-2024-11-15"` - The type of the input item. Always `input_image`. + - `score_threshold: optional number` - - `"input_image"` + 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. - - `file_id: optional string` + - `Computer object { type }` - The ID of the file to be sent to the model. + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - - `image_url: optional string` + - `type: "computer"` - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + The type of the computer tool. Always `computer`. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `"computer"` - A file input to the model. + - `ComputerUsePreview object { display_height, display_width, environment, type }` - - `type: "input_file"` + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). - The type of the input item. Always `input_file`. + - `display_height: number` - - `"input_file"` + The height of the computer display. - - `detail: optional "low" or "high"` + - `display_width: number` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The width of the computer display. - - `"low"` + - `environment: "windows" or "mac" or "linux" or 2 more` - - `"high"` + The type of computer environment to control. - - `file_data: optional string` + - `"windows"` - The content of the file to be sent to the model. + - `"mac"` - - `file_id: optional string` + - `"linux"` - The ID of the file to be sent to the model. + - `"ubuntu"` - - `file_url: optional string` + - `"browser"` - The URL of the file to be sent to the model. + - `type: "computer_use_preview"` - - `filename: optional string` + The type of the computer use tool. Always `computer_use_preview`. - The name of the file to be sent to the model. + - `"computer_use_preview"` - - `status: "in_progress" or "completed" or "incomplete"` + - `WebSearch object { type, filters, search_context_size, user_location }` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](/docs/guides/tools-web-search). - - `"in_progress"` + - `type: "web_search" or "web_search_2025_08_26"` - - `"completed"` + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. - - `"incomplete"` + - `"web_search"` - - `type: "custom_tool_call_output"` + - `"web_search_2025_08_26"` - The type of the custom tool call output. Always `custom_tool_call_output`. + - `filters: optional object { allowed_domains }` - - `"custom_tool_call_output"` + Filters for the search. - - `created_by: optional string` + - `allowed_domains: optional array of string` - The identifier of the actor that created the item. + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. - - `output_index: number` + Example: `["pubmed.ncbi.nlm.nih.gov"]` - The index of the output item that was marked done. + - `search_context_size: optional "low" or "medium" or "high"` - - `sequence_number: number` + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - The sequence number of this event. + - `"low"` - - `type: "response.output_item.done"` + - `"medium"` - The type of the event. Always `response.output_item.done`. + - `"high"` - - `"response.output_item.done"` + - `user_location: optional object { city, country, region, 2 more }` - - `ResponseReasoningSummaryPartAddedEvent = object { item_id, output_index, part, 3 more }` + The approximate location of the user. - Emitted when a new reasoning summary part is added. + - `city: optional string` - - `item_id: string` + Free text input for the city of the user, e.g. `San Francisco`. - The ID of the item this summary part is associated with. + - `country: optional string` - - `output_index: number` + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - The index of the output item this summary part is associated with. + - `region: optional string` - - `part: object { text, type }` + Free text input for the region of the user, e.g. `California`. - The summary part that was added. + - `timezone: optional string` - - `text: string` + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - The text of the summary part. + - `type: optional "approximate"` - - `type: "summary_text"` + The type of location approximation. Always `approximate`. - The type of the summary part. Always `summary_text`. + - `"approximate"` - - `"summary_text"` + - `Mcp object { server_label, type, allowed_tools, 7 more }` - - `sequence_number: number` + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). - The sequence number of this event. + - `server_label: string` - - `summary_index: number` + A label for this MCP server, used to identify it in tool calls. - The index of the summary part within the reasoning summary. + - `type: "mcp"` - - `type: "response.reasoning_summary_part.added"` + The type of the MCP tool. Always `mcp`. - The type of the event. Always `response.reasoning_summary_part.added`. + - `"mcp"` - - `"response.reasoning_summary_part.added"` + - `allowed_tools: optional array of string or object { read_only, tool_names }` - - `ResponseReasoningSummaryPartDoneEvent = object { item_id, output_index, part, 3 more }` + List of allowed tool names or a filter object. - Emitted when a reasoning summary part is completed. + - `McpAllowedTools = array of string` - - `item_id: string` + A string array of allowed tool names - The ID of the item this summary part is associated with. + - `McpToolFilter object { read_only, tool_names }` - - `output_index: number` + A filter object to specify which tools are allowed. - The index of the output item this summary part is associated with. + - `read_only: optional boolean` - - `part: object { text, type }` + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. - The completed summary part. + - `tool_names: optional array of string` - - `text: string` + List of allowed tool names. - The text of the summary part. + - `authorization: optional string` - - `type: "summary_text"` + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. - The type of the summary part. Always `summary_text`. + - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` - - `"summary_text"` + Identifier for service connectors, like those available in ChatGPT. One of + `server_url` or `connector_id` must be provided. Learn more about service + connectors [here](/docs/guides/tools-remote-mcp#connectors). - - `sequence_number: number` + Currently supported `connector_id` values are: - The sequence number of this event. + - 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` - - `summary_index: number` + - `"connector_dropbox"` - The index of the summary part within the reasoning summary. + - `"connector_gmail"` - - `type: "response.reasoning_summary_part.done"` + - `"connector_googlecalendar"` - The type of the event. Always `response.reasoning_summary_part.done`. + - `"connector_googledrive"` - - `"response.reasoning_summary_part.done"` + - `"connector_microsoftteams"` - - `ResponseReasoningSummaryTextDeltaEvent = object { delta, item_id, output_index, 3 more }` + - `"connector_outlookcalendar"` - Emitted when a delta is added to a reasoning summary text. + - `"connector_outlookemail"` - - `delta: string` + - `"connector_sharepoint"` - The text delta that was added to the summary. + - `defer_loading: optional boolean` - - `item_id: string` + Whether this MCP tool is deferred and discovered via tool search. - The ID of the item this summary text delta is associated with. + - `headers: optional map[string]` - - `output_index: number` + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. - The index of the output item this summary text delta is associated with. + - `require_approval: optional object { always, never } or "always" or "never"` - - `sequence_number: number` + Specify which of the MCP server's tools require approval. - The sequence number of this event. + - `McpToolApprovalFilter object { always, never }` - - `summary_index: number` + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. - The index of the summary part within the reasoning summary. + - `always: optional object { read_only, tool_names }` - - `type: "response.reasoning_summary_text.delta"` + A filter object to specify which tools are allowed. - The type of the event. Always `response.reasoning_summary_text.delta`. + - `read_only: optional boolean` - - `"response.reasoning_summary_text.delta"` + 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. - - `ResponseReasoningSummaryTextDoneEvent = object { item_id, output_index, sequence_number, 3 more }` + - `tool_names: optional array of string` - Emitted when a reasoning summary text is completed. + List of allowed tool names. - - `item_id: string` + - `never: optional object { read_only, tool_names }` - The ID of the item this summary text is associated with. + A filter object to specify which tools are allowed. - - `output_index: number` + - `read_only: optional boolean` - The index of the output item this summary text is associated with. + 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. - - `sequence_number: number` + - `tool_names: optional array of string` - The sequence number of this event. + List of allowed tool names. - - `summary_index: number` + - `McpToolApprovalSetting = "always" or "never"` - The index of the summary part within the reasoning summary. + 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. - - `text: string` + - `"always"` - The full text of the completed reasoning summary. + - `"never"` - - `type: "response.reasoning_summary_text.done"` + - `server_description: optional string` - The type of the event. Always `response.reasoning_summary_text.done`. + Optional description of the MCP server, used to provide more context. - - `"response.reasoning_summary_text.done"` + - `server_url: optional string` - - `ResponseReasoningTextDeltaEvent = object { content_index, delta, item_id, 3 more }` + The URL for the MCP server. One of `server_url` or `connector_id` must be + provided. - Emitted when a delta is added to a reasoning text. + - `CodeInterpreter object { container, type }` - - `content_index: number` + A tool that runs Python code to help generate a response to a prompt. - The index of the reasoning content part this delta is associated with. + - `container: string or object { type, file_ids, memory_limit, network_policy }` - - `delta: string` + 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. - The text delta that was added to the reasoning content. + - `string` - - `item_id: string` + The container ID. - The ID of the item this reasoning text delta is associated with. + - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }` - - `output_index: number` + Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. - The index of the output item this reasoning text delta is associated with. + - `type: "auto"` - - `sequence_number: number` + Always `auto`. - The sequence number of this event. + - `"auto"` - - `type: "response.reasoning_text.delta"` + - `file_ids: optional array of string` - The type of the event. Always `response.reasoning_text.delta`. + An optional list of uploaded files to make available to your code. - - `"response.reasoning_text.delta"` + - `memory_limit: optional "1g" or "4g" or "16g" or "64g"` - - `ResponseReasoningTextDoneEvent = object { content_index, item_id, output_index, 3 more }` + The memory limit for the code interpreter container. - Emitted when a reasoning text is completed. + - `"1g"` - - `content_index: number` + - `"4g"` - The index of the reasoning content part. + - `"16g"` - - `item_id: string` + - `"64g"` - The ID of the item this reasoning text is associated with. + - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` - - `output_index: number` + Network access policy for the container. - The index of the output item this reasoning text is associated with. + - `ContainerNetworkPolicyDisabled object { type }` - - `sequence_number: number` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - The sequence number of this event. + - `type: "code_interpreter"` - - `text: string` + The type of the code interpreter tool. Always `code_interpreter`. - The full text of the completed reasoning content. + - `"code_interpreter"` - - `type: "response.reasoning_text.done"` + - `ImageGeneration object { type, action, background, 9 more }` - The type of the event. Always `response.reasoning_text.done`. + A tool that generates images using the GPT image models. - - `"response.reasoning_text.done"` + - `type: "image_generation"` - - `ResponseRefusalDeltaEvent = object { content_index, delta, item_id, 3 more }` + The type of the image generation tool. Always `image_generation`. - Emitted when there is a partial refusal text. + - `"image_generation"` - - `content_index: number` + - `action: optional "generate" or "edit" or "auto"` - The index of the content part that the refusal text is added to. + Whether to generate a new image or edit an existing image. Default: `auto`. - - `delta: string` + - `"generate"` - The refusal text that is added. + - `"edit"` - - `item_id: string` + - `"auto"` - The ID of the output item that the refusal text is added to. + - `background: optional "transparent" or "opaque" or "auto"` - - `output_index: number` + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. - The index of the output item that the refusal text is added to. + - `"transparent"` - - `sequence_number: number` + - `"opaque"` - The sequence number of this event. + - `"auto"` - - `type: "response.refusal.delta"` + - `input_fidelity: optional "high" or "low"` - The type of the event. Always `response.refusal.delta`. + 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`. - - `"response.refusal.delta"` + - `"high"` - - `ResponseRefusalDoneEvent = object { content_index, item_id, output_index, 3 more }` + - `"low"` - Emitted when refusal text is finalized. + - `input_image_mask: optional object { file_id, image_url }` - - `content_index: number` + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). - The index of the content part that the refusal text is finalized. + - `file_id: optional string` - - `item_id: string` + File ID for the mask image. - The ID of the output item that the refusal text is finalized. + - `image_url: optional string` - - `output_index: number` + Base64-encoded mask image. - The index of the output item that the refusal text is finalized. + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - `refusal: string` + The image generation model to use. Default: `gpt-image-1`. - The refusal text that is finalized. + - `string` - - `sequence_number: number` + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - The sequence number of this event. + The image generation model to use. Default: `gpt-image-1`. - - `type: "response.refusal.done"` + - `"gpt-image-1"` - The type of the event. Always `response.refusal.done`. + - `"gpt-image-1-mini"` - - `"response.refusal.done"` + - `"gpt-image-1.5"` - - `ResponseTextDeltaEvent = object { content_index, delta, item_id, 4 more }` + - `moderation: optional "auto" or "low"` - Emitted when there is an additional text delta. + Moderation level for the generated image. Default: `auto`. - - `content_index: number` + - `"auto"` - The index of the content part that the text delta was added to. + - `"low"` - - `delta: string` + - `output_compression: optional number` - The text delta that was added. + Compression level for the output image. Default: 100. - - `item_id: string` + - `output_format: optional "png" or "webp" or "jpeg"` - The ID of the output item that the text delta was added to. + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. - - `logprobs: array of object { token, logprob, top_logprobs }` + - `"png"` - The log probabilities of the tokens in the delta. + - `"webp"` - - `token: string` + - `"jpeg"` - A possible text token. + - `partial_images: optional number` - - `logprob: number` + Number of partial images to generate in streaming mode, from 0 (default value) to 3. - The log probability of this token. + - `quality: optional "low" or "medium" or "high" or "auto"` - - `top_logprobs: optional array of object { token, logprob }` + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. - The log probability of the top 20 most likely tokens. + - `"low"` - - `token: optional string` + - `"medium"` - A possible text token. + - `"high"` - - `logprob: optional number` + - `"auto"` - The log probability of this token. + - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - `output_index: number` + The size of the generated image. One of `1024x1024`, `1024x1536`, + `1536x1024`, or `auto`. Default: `auto`. - The index of the output item that the text delta was added to. + - `"1024x1024"` - - `sequence_number: number` + - `"1024x1536"` - The sequence number for this event. + - `"1536x1024"` - - `type: "response.output_text.delta"` + - `"auto"` - The type of the event. Always `response.output_text.delta`. + - `LocalShell object { type }` - - `"response.output_text.delta"` + A tool that allows the model to execute shell commands in a local environment. - - `ResponseTextDoneEvent = object { content_index, item_id, logprobs, 4 more }` + - `type: "local_shell"` - Emitted when text content is finalized. + The type of the local shell tool. Always `local_shell`. - - `content_index: number` + - `"local_shell"` - The index of the content part that the text content is finalized. + - `Shell object { type, environment }` - - `item_id: string` + A tool that allows the model to execute shell commands. - The ID of the output item that the text content is finalized. + - `type: "shell"` - - `logprobs: array of object { token, logprob, top_logprobs }` + The type of the shell tool. Always `shell`. - The log probabilities of the tokens in the delta. + - `"shell"` - - `token: string` + - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - A possible text token. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `logprob: number` + - `LocalEnvironment object { type, skills }` - The log probability of this token. + - `ContainerReference object { container_id, type }` - - `top_logprobs: optional array of object { token, logprob }` + - `Custom object { name, type, defer_loading, 2 more }` - The log probability of the top 20 most likely tokens. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - `token: optional string` + - `name: string` - A possible text token. + The name of the custom tool, used to identify it in tool calls. - - `logprob: optional number` + - `type: "custom"` - The log probability of this token. + The type of the custom tool. Always `custom`. - - `output_index: number` + - `"custom"` - The index of the output item that the text content is finalized. + - `defer_loading: optional boolean` - - `sequence_number: number` + Whether this tool should be deferred and discovered via tool search. - The sequence number for this event. + - `description: optional string` - - `text: string` + Optional description of the custom tool, used to provide more context. - The text content that is finalized. + - `format: optional CustomToolInputFormat` - - `type: "response.output_text.done"` + The input format for the custom tool. Default is unconstrained text. - The type of the event. Always `response.output_text.done`. + - `Namespace object { description, name, tools, type }` - - `"response.output_text.done"` + Groups function/custom tools under a shared namespace. - - `ResponseWebSearchCallCompletedEvent = object { item_id, output_index, sequence_number, type }` + - `description: string` - Emitted when a web search call is completed. + A description of the namespace shown to the model. - - `item_id: string` + - `name: string` - Unique ID for the output item associated with the web search call. + The namespace name used in tool calls (for example, `crm`). - - `output_index: number` + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - The index of the output item that the web search call is associated with. + The function/custom tools available inside this namespace. - - `sequence_number: number` + - `Function object { name, type, defer_loading, 3 more }` - The sequence number of the web search call being processed. + - `name: string` - - `type: "response.web_search_call.completed"` + - `type: "function"` - The type of the event. Always `response.web_search_call.completed`. + - `"function"` - - `"response.web_search_call.completed"` + - `defer_loading: optional boolean` - - `ResponseWebSearchCallInProgressEvent = object { item_id, output_index, sequence_number, type }` + Whether this function should be deferred and discovered via tool search. - Emitted when a web search call is initiated. + - `description: optional string` - - `item_id: string` + - `parameters: optional unknown` - Unique ID for the output item associated with the web search call. + - `strict: optional boolean` - - `output_index: number` + - `Custom object { name, type, defer_loading, 2 more }` - The index of the output item that the web search call is associated with. + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - `sequence_number: number` + - `name: string` - The sequence number of the web search call being processed. + The name of the custom tool, used to identify it in tool calls. - - `type: "response.web_search_call.in_progress"` + - `type: "custom"` - The type of the event. Always `response.web_search_call.in_progress`. + The type of the custom tool. Always `custom`. - - `"response.web_search_call.in_progress"` + - `"custom"` - - `ResponseWebSearchCallSearchingEvent = object { item_id, output_index, sequence_number, type }` + - `defer_loading: optional boolean` - Emitted when a web search call is executing. + Whether this tool should be deferred and discovered via tool search. - - `item_id: string` + - `description: optional string` - Unique ID for the output item associated with the web search call. + Optional description of the custom tool, used to provide more context. - - `output_index: number` + - `format: optional CustomToolInputFormat` - The index of the output item that the web search call is associated with. + The input format for the custom tool. Default is unconstrained text. - - `sequence_number: number` + - `type: "namespace"` - The sequence number of the web search call being processed. + The type of the tool. Always `namespace`. - - `type: "response.web_search_call.searching"` + - `"namespace"` - The type of the event. Always `response.web_search_call.searching`. + - `ToolSearch object { type, description, execution, parameters }` - - `"response.web_search_call.searching"` + Hosted or BYOT tool search configuration for deferred tools. - - `ResponseImageGenCallCompletedEvent = object { item_id, output_index, sequence_number, type }` + - `type: "tool_search"` - Emitted when an image generation tool call has completed and the final image is available. + The type of the tool. Always `tool_search`. - - `item_id: string` + - `"tool_search"` - The unique identifier of the image generation item being processed. + - `description: optional string` - - `output_index: number` + Description shown to the model for a client-executed tool search tool. - The index of the output item in the response's output array. + - `execution: optional "server" or "client"` - - `sequence_number: number` + Whether tool search is executed by the server or by the client. - The sequence number of this event. + - `"server"` - - `type: "response.image_generation_call.completed"` + - `"client"` - The type of the event. Always 'response.image_generation_call.completed'. + - `parameters: optional unknown` - - `"response.image_generation_call.completed"` + Parameter schema for a client-executed tool search tool. - - `ResponseImageGenCallGeneratingEvent = object { item_id, output_index, sequence_number, type }` + - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }` - Emitted when an image generation tool call is actively generating an image (intermediate state). + 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). - - `item_id: string` + - `type: "web_search_preview" or "web_search_preview_2025_03_11"` - The unique identifier of the image generation item being processed. + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. - - `output_index: number` + - `"web_search_preview"` - The index of the output item in the response's output array. + - `"web_search_preview_2025_03_11"` - - `sequence_number: number` + - `search_content_types: optional array of "text" or "image"` - The sequence number of the image generation item being processed. + - `"text"` - - `type: "response.image_generation_call.generating"` + - `"image"` - The type of the event. Always 'response.image_generation_call.generating'. + - `search_context_size: optional "low" or "medium" or "high"` - - `"response.image_generation_call.generating"` + 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. - - `ResponseImageGenCallInProgressEvent = object { item_id, output_index, sequence_number, type }` + - `"low"` - Emitted when an image generation tool call is in progress. + - `"medium"` - - `item_id: string` + - `"high"` - The unique identifier of the image generation item being processed. + - `user_location: optional object { type, city, country, 2 more }` - - `output_index: number` + The user's location. - The index of the output item in the response's output array. + - `type: "approximate"` - - `sequence_number: number` + The type of location approximation. Always `approximate`. - The sequence number of the image generation item being processed. + - `"approximate"` - - `type: "response.image_generation_call.in_progress"` + - `city: optional string` - The type of the event. Always 'response.image_generation_call.in_progress'. + Free text input for the city of the user, e.g. `San Francisco`. - - `"response.image_generation_call.in_progress"` + - `country: optional string` - - `ResponseImageGenCallPartialImageEvent = object { item_id, output_index, partial_image_b64, 3 more }` + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - Emitted when a partial image is available during image generation streaming. + - `region: optional string` - - `item_id: string` + Free text input for the region of the user, e.g. `California`. - The unique identifier of the image generation item being processed. + - `timezone: optional string` - - `output_index: number` + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - The index of the output item in the response's output array. + - `ApplyPatch object { type }` - - `partial_image_b64: string` + Allows the assistant to create, delete, or update files using unified diffs. - Base64-encoded partial image data, suitable for rendering as an image. + - `type: "apply_patch"` - - `partial_image_index: number` + The type of the tool. Always `apply_patch`. - 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). + - `"apply_patch"` - - `sequence_number: number` + - `top_logprobs: optional number` - The sequence number of the image generation item being processed. + An integer between 0 and 20 specifying the number of most likely tokens to + return at each token position, each with an associated log probability. - - `type: "response.image_generation_call.partial_image"` + - `top_p: optional number` - The type of the event. Always 'response.image_generation_call.partial_image'. + 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. - - `"response.image_generation_call.partial_image"` + We generally recommend altering this or `temperature` but not both. - - `ResponseMcpCallArgumentsDeltaEvent = object { delta, item_id, output_index, 2 more }` + - `truncation: optional "auto" or "disabled"` - Emitted when there is a delta (partial update) to the arguments of an MCP tool call. + The truncation strategy to use for the model response. - - `delta: string` + - `auto`: If the input to this Response exceeds + the model's context window size, the model will truncate the + response to fit the context window by dropping items from the beginning of the conversation. + - `disabled` (default): If the input size will exceed the context window + size for a model, the request will fail with a 400 error. - A JSON string containing the partial update to the arguments for the MCP tool call. + - `"auto"` - - `item_id: string` + - `"disabled"` - The unique identifier of the MCP tool call item being processed. + - `user: optional string` - - `output_index: number` + 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). - The index of the output item in the response's output array. +### Responses Server Event - - `sequence_number: number` +- `ResponsesServerEvent = ResponseAudioDeltaEvent or ResponseAudioDoneEvent or ResponseAudioTranscriptDeltaEvent or 50 more` - The sequence number of this event. + Server events emitted by the Responses WebSocket server. - - `type: "response.mcp_call_arguments.delta"` + - `ResponseAudioDeltaEvent object { delta, sequence_number, type }` - The type of the event. Always 'response.mcp_call_arguments.delta'. + Emitted when there is a partial audio response. - - `"response.mcp_call_arguments.delta"` + - `delta: string` - - `ResponseMcpCallArgumentsDoneEvent = object { arguments, item_id, output_index, 2 more }` + A chunk of Base64 encoded response audio bytes. - Emitted when the arguments for an MCP tool call are finalized. + - `sequence_number: number` - - `arguments: string` + A sequence number for this chunk of the stream response. - A JSON string containing the finalized arguments for the MCP tool call. + - `type: "response.audio.delta"` - - `item_id: string` + The type of the event. Always `response.audio.delta`. - The unique identifier of the MCP tool call item being processed. + - `"response.audio.delta"` - - `output_index: number` + - `ResponseAudioDoneEvent object { sequence_number, type }` - The index of the output item in the response's output array. + Emitted when the audio response is complete. - `sequence_number: number` - The sequence number of this event. - - - `type: "response.mcp_call_arguments.done"` - - The type of the event. Always 'response.mcp_call_arguments.done'. + The sequence number of the delta. - - `"response.mcp_call_arguments.done"` + - `type: "response.audio.done"` - - `ResponseMcpCallCompletedEvent = object { item_id, output_index, sequence_number, type }` + The type of the event. Always `response.audio.done`. - Emitted when an MCP tool call has completed successfully. + - `"response.audio.done"` - - `item_id: string` + - `ResponseAudioTranscriptDeltaEvent object { delta, sequence_number, type }` - The ID of the MCP tool call item that completed. + Emitted when there is a partial transcript of audio. - - `output_index: number` + - `delta: string` - The index of the output item that completed. + The partial transcript of the audio response. - `sequence_number: number` The sequence number of this event. - - `type: "response.mcp_call.completed"` - - The type of the event. Always 'response.mcp_call.completed'. - - - `"response.mcp_call.completed"` - - - `ResponseMcpCallFailedEvent = object { item_id, output_index, sequence_number, type }` - - Emitted when an MCP tool call has failed. + - `type: "response.audio.transcript.delta"` - - `item_id: string` + The type of the event. Always `response.audio.transcript.delta`. - The ID of the MCP tool call item that failed. + - `"response.audio.transcript.delta"` - - `output_index: number` + - `ResponseAudioTranscriptDoneEvent object { sequence_number, type }` - The index of the output item that failed. + Emitted when the full audio transcript is completed. - `sequence_number: number` The sequence number of this event. - - `type: "response.mcp_call.failed"` + - `type: "response.audio.transcript.done"` - The type of the event. Always 'response.mcp_call.failed'. + The type of the event. Always `response.audio.transcript.done`. - - `"response.mcp_call.failed"` + - `"response.audio.transcript.done"` - - `ResponseMcpCallInProgressEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallCodeDeltaEvent object { delta, item_id, output_index, 2 more }` - Emitted when an MCP tool call is in progress. + Emitted when a partial code snippet is streamed by the code interpreter. + + - `delta: string` + + The partial code snippet being streamed by the code interpreter. - `item_id: string` - The unique identifier of the MCP tool call item being processed. + The unique identifier of the code interpreter tool call item. - `output_index: number` - The index of the output item in the response's output array. + The index of the output item in the response for which the code is being streamed. - `sequence_number: number` - The sequence number of this event. + The sequence number of this event, used to order streaming events. - - `type: "response.mcp_call.in_progress"` + - `type: "response.code_interpreter_call_code.delta"` - The type of the event. Always 'response.mcp_call.in_progress'. + The type of the event. Always `response.code_interpreter_call_code.delta`. - - `"response.mcp_call.in_progress"` + - `"response.code_interpreter_call_code.delta"` - - `ResponseMcpListToolsCompletedEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallCodeDoneEvent object { code, item_id, output_index, 2 more }` - Emitted when the list of available MCP tools has been successfully retrieved. + Emitted when the code snippet is finalized by the code interpreter. + + - `code: string` + + The final code snippet output by the code interpreter. - `item_id: string` - The ID of the MCP tool call item that produced this output. + The unique identifier of the code interpreter tool call item. - `output_index: number` - The index of the output item that was processed. + The index of the output item in the response for which the code is finalized. - `sequence_number: number` - The sequence number of this event. + The sequence number of this event, used to order streaming events. - - `type: "response.mcp_list_tools.completed"` + - `type: "response.code_interpreter_call_code.done"` - The type of the event. Always 'response.mcp_list_tools.completed'. + The type of the event. Always `response.code_interpreter_call_code.done`. - - `"response.mcp_list_tools.completed"` + - `"response.code_interpreter_call_code.done"` - - `ResponseMcpListToolsFailedEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallCompletedEvent object { item_id, output_index, sequence_number, type }` - Emitted when the attempt to list available MCP tools has failed. + Emitted when the code interpreter call is completed. - `item_id: string` - The ID of the MCP tool call item that failed. + The unique identifier of the code interpreter tool call item. - `output_index: number` - The index of the output item that failed. + The index of the output item in the response for which the code interpreter call is completed. - `sequence_number: number` - The sequence number of this event. + The sequence number of this event, used to order streaming events. - - `type: "response.mcp_list_tools.failed"` + - `type: "response.code_interpreter_call.completed"` - The type of the event. Always 'response.mcp_list_tools.failed'. + The type of the event. Always `response.code_interpreter_call.completed`. - - `"response.mcp_list_tools.failed"` + - `"response.code_interpreter_call.completed"` - - `ResponseMcpListToolsInProgressEvent = object { item_id, output_index, sequence_number, type }` + - `ResponseCodeInterpreterCallInProgressEvent object { item_id, output_index, sequence_number, type }` - Emitted when the system is in the process of retrieving the list of available MCP tools. + Emitted when a code interpreter call is in progress. - `item_id: string` - The ID of the MCP tool call item that is being processed. + The unique identifier of the code interpreter tool call item. - `output_index: number` - The index of the output item that is being processed. + The index of the output item in the response for which the code interpreter call is in progress. - `sequence_number: number` - The sequence number of this event. - - - `type: "response.mcp_list_tools.in_progress"` - - The type of the event. Always 'response.mcp_list_tools.in_progress'. - - - `"response.mcp_list_tools.in_progress"` - - - `ResponseOutputTextAnnotationAddedEvent = object { annotation, annotation_index, content_index, 4 more }` - - Emitted when an annotation is added to output text content. - - - `annotation: unknown` + The sequence number of this event, used to order streaming events. - The annotation object being added. (See annotation schema for details.) + - `type: "response.code_interpreter_call.in_progress"` - - `annotation_index: number` + The type of the event. Always `response.code_interpreter_call.in_progress`. - The index of the annotation within the content part. + - `"response.code_interpreter_call.in_progress"` - - `content_index: number` + - `ResponseCodeInterpreterCallInterpretingEvent object { item_id, output_index, sequence_number, type }` - The index of the content part within the output item. + Emitted when the code interpreter is actively interpreting the code snippet. - `item_id: string` - The unique identifier of the item to which the annotation is being added. + The unique identifier of the code interpreter tool call item. - `output_index: number` - The index of the output item in the response's output array. + The index of the output item in the response for which the code interpreter is interpreting code. - `sequence_number: number` - The sequence number of this event. + The sequence number of this event, used to order streaming events. - - `type: "response.output_text.annotation.added"` + - `type: "response.code_interpreter_call.interpreting"` - The type of the event. Always 'response.output_text.annotation.added'. + The type of the event. Always `response.code_interpreter_call.interpreting`. - - `"response.output_text.annotation.added"` + - `"response.code_interpreter_call.interpreting"` - - `ResponseQueuedEvent = object { response, sequence_number, type }` + - `ResponseCompletedEvent object { response, sequence_number, type }` - Emitted when a response is queued and waiting to be processed. + Emitted when the model response is complete. - `response: Response` - The full response object that is queued. + Properties of the completed response. - `id: string` @@ -223958,7 +102271,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -223980,125 +102293,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - - `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. - - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -224112,7 +102307,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -224142,7 +102337,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -224176,6 +102371,46 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The name of the file to be sent to the model. + - `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`. @@ -224203,7 +102438,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -224215,7 +102450,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -224223,7 +102458,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -224245,7 +102480,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -224271,7 +102506,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -224301,7 +102536,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -224345,7 +102580,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -224392,7 +102627,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -224460,7 +102695,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -224510,7 +102745,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -224546,7 +102781,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -224568,7 +102803,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -224601,7 +102836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -224615,7 +102850,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -224637,7 +102872,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -224647,7 +102882,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -224677,7 +102912,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -224691,7 +102926,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -224706,198 +102941,43 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { call_id, output, type, 3 more }` The output of a computer tool call. @@ -224960,7 +103040,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -224974,7 +103054,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -225006,7 +103086,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -225020,7 +103100,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -225056,7 +103136,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -225098,7 +103178,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -225118,7 +103198,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -225132,7 +103212,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -225162,7 +103242,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -225216,7 +103296,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -225254,13 +103334,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -225290,7 +103370,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -225308,7 +103388,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -225361,7 +103441,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -225369,59 +103449,10 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -225464,7 +103495,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -225474,7 +103505,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -225506,7 +103537,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -225566,7 +103597,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -225589,7 +103620,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -225655,7 +103686,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -225708,7 +103739,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -225722,7 +103753,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -225752,7 +103783,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -225760,7 +103791,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -225794,7 +103825,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -225915,7 +103946,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -225925,7 +103956,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -225937,7 +103968,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -225965,47 +103996,15 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -226021,7 +104020,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -226057,7 +104056,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -226081,7 +104080,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -226093,7 +104092,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -226119,7 +104118,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -226129,7 +104128,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -226151,7 +104150,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -226167,7 +104166,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -226185,7 +104184,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -226211,45 +104210,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -226275,7 +104242,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -226329,7 +104296,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -226371,7 +104338,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -226432,7 +104399,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -226450,7 +104417,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -226480,7 +104447,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -226501,7 +104468,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -226515,7 +104482,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -226549,7 +104516,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -226607,7 +104574,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -226635,7 +104602,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -226673,41 +104640,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` - - - `type: "local"` - - Use a local computer environment. - - - `"local"` - - - `skills: optional array of LocalSkill` + - `LocalEnvironment object { type, skills }` - 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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -226719,7 +104654,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -226735,7 +104670,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -226745,7 +104680,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -226791,7 +104726,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -226803,7 +104738,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -226821,7 +104756,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -226835,7 +104770,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -226871,7 +104806,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -226901,7 +104836,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -226943,7 +104878,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -226969,7 +104904,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -226995,7 +104930,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -227048,7 +104983,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -227069,84 +105004,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -227157,7 +105026,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -227187,7 +105056,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -227424,196 +105293,11 @@ curl -X POST https://api.openai.com/v1/responses/compact \ the model, you might consider using the `output_text` property where supported in SDKs. - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `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, logprobs, text, type }` - - A text output from the model. - - - `annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }` - - The annotations of the text output. - - - `FileCitation = object { file_id, filename, index, type }` - - A citation to a file. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the file cited. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_citation"` - - The type of the file citation. Always `file_citation`. - - - `"file_citation"` - - - `URLCitation = object { end_index, start_index, title, 2 more }` - - A citation for a web resource used to generate a model response. - - - `end_index: number` - - The index of the last character of the URL citation in the message. - - - `start_index: number` - - The index of the first character of the URL citation in the message. - - - `title: string` - - The title of the web resource. - - - `type: "url_citation"` - - The type of the URL citation. Always `url_citation`. - - - `"url_citation"` - - - `url: string` - - The URL of the web resource. - - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` - - A citation for a container file used to generate a model response. - - - `container_id: string` - - The ID of the container file. - - - `end_index: number` - - The index of the last character of the container file citation in the message. - - - `file_id: string` - - The ID of the file. - - - `filename: string` - - The filename of the container file cited. - - - `start_index: number` - - The index of the first character of the container file citation in the message. - - - `type: "container_file_citation"` - - The type of the container file citation. Always `container_file_citation`. - - - `"container_file_citation"` - - - `FilePath = object { file_id, index, type }` - - A path to a file. - - - `file_id: string` - - The ID of the file. - - - `index: number` - - The index of the file in the list of files. - - - `type: "file_path"` - - The type of the file path. Always `file_path`. - - - `"file_path"` - - - `logprobs: array of object { token, bytes, logprob, top_logprobs }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `top_logprobs: array of object { token, bytes, logprob }` - - - `token: string` - - - `bytes: array of number` - - - `logprob: number` - - - `text: string` - - The text output from the model. - - - `type: "output_text"` - - The type of the output text. Always `output_text`. - - - `"output_text"` - - - `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 }` + - `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. @@ -227681,7 +105365,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The text that was retrieved from the file. - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -227723,7 +105407,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -227746,84 +105430,18 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -227845,7 +105463,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -227859,7 +105477,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -227891,7 +105509,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -227905,7 +105523,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -227941,7 +105559,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"web_search_call"` - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -227991,394 +105609,12 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 { id, call_id, output, 4 more }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -228392,21 +105628,6 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 @@ -228447,7 +105668,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -228470,8 +105691,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`. @@ -228508,7 +105727,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -228550,7 +105769,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -228582,7 +105801,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -228612,147 +105831,31 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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. - - - `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` + The type of the file search tool. Always `file_search`. - - `boolean` + - `"file_search"` - - `array of string or number` + - `vector_store_ids: array of string` - - `string` + The IDs of the vector stores to search. - - `number` + - `filters: optional ComparisonFilter or CompoundFilter` - - `unknown` + A filter to apply. - - `type: "and" or "or"` + - `ComparisonFilter object { key, type, value }` - Type of operation: `and` or `or`. + A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `"and"` + - `CompoundFilter object { filters, type }` - - `"or"` + Combine multiple filters using `and` or `or`. - `max_num_results: optional number` @@ -228786,7 +105889,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `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). @@ -228796,7 +105899,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -228828,7 +105931,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -228888,7 +105991,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -228911,7 +106014,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -228977,7 +106080,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -229030,7 +106133,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -229044,7 +106147,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -229074,41 +106177,9 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -229116,7 +106187,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -229237,7 +106308,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -229247,7 +106318,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -229259,163 +106330,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `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 }` - - - `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. - - - `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"` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - References a container created with the /v1/containers endpoint + - `LocalEnvironment object { type, skills }` - - `"container_reference"` + - `ContainerReference object { container_id, type }` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -229441,39 +106362,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -229489,7 +106378,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -229507,7 +106396,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -229533,45 +106422,13 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -229597,7 +106454,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -229651,7 +106508,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -229671,7 +106528,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -229693,7 +106550,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -229723,7 +106580,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -229744,7 +106601,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -229758,7 +106615,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -229792,7 +106649,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -229850,7 +106707,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -229878,7 +106735,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -229908,7 +106765,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -229918,7 +106775,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -229950,7 +106807,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -229974,7 +106831,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -229984,7 +106841,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -230030,7 +106887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -230046,7 +106903,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -230064,7 +106921,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -230078,7 +106935,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -230114,7 +106971,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -230148,7 +107005,7 @@ 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 }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -230193,1942 +107050,2677 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"in_progress"` - - `"completed"` + - `"completed"` + + - `"incomplete"` + + - `"calling"` + + - `"failed"` + + - `McpListTools object { id, server_label, tools, 2 more }` + + A list of tools available on an MCP server. + + - `id: string` + + The unique ID of the list. + + - `server_label: string` + + The label of the MCP server. + + - `tools: array of object { input_schema, name, annotations, description }` + + The tools available on the server. + + - `input_schema: unknown` + + The JSON schema describing the tool's input. + + - `name: string` + + The name of the tool. + + - `annotations: optional unknown` + + Additional annotations about the tool. + + - `description: optional string` + + The description of the tool. + + - `type: "mcp_list_tools"` + + The type of the item. Always `mcp_list_tools`. + + - `"mcp_list_tools"` + + - `error: optional string` + + Error message if the server could not list tools. + + - `McpApprovalRequest object { id, arguments, name, 2 more }` + + A request for human approval of a tool invocation. + + - `id: string` + + The unique ID of the approval request. + + - `arguments: string` + + A JSON string of arguments for the tool. + + - `name: string` + + The name of the tool to run. + + - `server_label: string` + + The label of the MCP server making the request. + + - `type: "mcp_approval_request"` + + The type of the item. Always `mcp_approval_request`. + + - `"mcp_approval_request"` + + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` + + A response to an MCP approval request. + + - `id: string` + + The unique ID of the approval response + + - `approval_request_id: string` + + The ID of the approval request being answered. + + - `approve: boolean` + + Whether the request was approved. + + - `type: "mcp_approval_response"` + + The type of the item. Always `mcp_approval_response`. + + - `"mcp_approval_response"` + + - `reason: optional string` + + Optional reason for the decision. + + - `CustomToolCall object { call_id, input, name, 3 more }` + + A call to a custom tool created by the model. + + - `call_id: string` + + An identifier used to map this custom tool call to a tool call output. + + - `input: string` + + The input for the custom tool call generated by the model. + + - `name: string` + + The name of the custom tool being called. + + - `type: "custom_tool_call"` + + The type of the custom tool call. Always `custom_tool_call`. + + - `"custom_tool_call"` + + - `id: optional string` + + The unique ID of the custom tool call in the OpenAI platform. + + - `namespace: optional string` + + The namespace of the custom tool being called. + + - `CustomToolCallOutput object { id, call_id, output, 3 more }` + + - `id: string` + + The unique ID of the custom tool call output item. + + - `call_id: string` + + The call ID, used to map this custom tool call output to a custom tool call. + + - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` + + The output from the custom tool call generated by your code. + Can be a string or an list of output content. + + - `StringOutput = string` + + A string of the output of the custom tool call. + + - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` + + Text, image, or file output of the custom tool call. + + - `ResponseInputText object { text, type }` + + A text input to the model. + + - `ResponseInputImage object { detail, type, file_id, image_url }` + + An image input to the model. Learn about [image inputs](/docs/guides/vision). + + - `ResponseInputFile object { type, detail, file_data, 3 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"` + + - `created_by: optional string` + + The identifier of the actor that created the item. + + - `parallel_tool_calls: boolean` + + Whether to allow the model to run tool calls in parallel. + + - `temperature: number` + + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + We generally recommend altering this or `top_p` but not both. + + - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` + + How the model should select which tool (or tools) to use when generating + a response. See the `tools` parameter to see how to specify which tools + the model can call. + + - `ToolChoiceOptions = "none" or "auto" or "required"` + + Controls which (if any) tool is called by the model. + + `none` means the model will not call any tool and instead generates a message. + + `auto` means the model can pick between generating a message or calling one or + more tools. + + `required` means the model must call one or more tools. + + - `"none"` + + - `"auto"` + + - `"required"` + + - `ToolChoiceAllowed object { mode, tools, type }` + + Constrains the tools available to the model to a pre-defined set. + + - `mode: "auto" or "required"` + + Constrains the tools available to the model to a pre-defined set. + + `auto` allows the model to pick from among the allowed tools and generate a + message. + + `required` requires the model to call one or more of the allowed tools. + + - `"auto"` + + - `"required"` + + - `tools: array of map[unknown]` + + A list of tool definitions that the model should be allowed to call. + + For the Responses API, the list of tool definitions might look like: + + ```json + [ + { "type": "function", "name": "get_weather" }, + { "type": "mcp", "server_label": "deepwiki" }, + { "type": "image_generation" } + ] + ``` + + - `type: "allowed_tools"` + + Allowed tool configuration type. Always `allowed_tools`. + + - `"allowed_tools"` + + - `ToolChoiceTypes object { type }` + + Indicates that the model should use a built-in tool to generate a response. + [Learn more about built-in tools](/docs/guides/tools). + + - `type: "file_search" or "web_search_preview" or "computer" or 5 more` + + The type of hosted tool the model should to use. Learn more about + [built-in tools](/docs/guides/tools). + + Allowed values are: + + - `file_search` + - `web_search_preview` + - `computer` + - `computer_use_preview` + - `computer_use` + - `code_interpreter` + - `image_generation` + + - `"file_search"` + + - `"web_search_preview"` + + - `"computer"` + + - `"computer_use_preview"` + + - `"computer_use"` + + - `"web_search_preview_2025_03_11"` + + - `"image_generation"` + + - `"code_interpreter"` + + - `ToolChoiceFunction object { name, type }` + + Use this option to force the model to call a specific function. + + - `name: string` + + The name of the function to call. + + - `type: "function"` + + For function calling, the type is always `function`. + + - `"function"` + + - `ToolChoiceMcp object { server_label, type, name }` + + Use this option to force the model to call a specific tool on a remote MCP server. + + - `server_label: string` + + The label of the MCP server to use. + + - `type: "mcp"` + + For MCP tools, the type is always `mcp`. + + - `"mcp"` + + - `name: optional string` + + The name of the tool to call on the server. + + - `ToolChoiceCustom object { name, type }` + + Use this option to force the model to call a specific custom tool. + + - `name: string` + + The name of the custom tool to call. + + - `type: "custom"` + + For custom tool calling, the type is always `custom`. + + - `"custom"` + + - `ToolChoiceApplyPatch object { type }` + + Forces the model to call the apply_patch tool when executing a tool call. + + - `type: "apply_patch"` + + The tool to call. Always `apply_patch`. + + - `"apply_patch"` + + - `ToolChoiceShell object { type }` + + Forces the model to call the shell tool when a tool call is required. + + - `type: "shell"` + + The tool to call. Always `shell`. + + - `"shell"` + + - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` + + An array of tools the model may call while generating a response. You + can specify which tool to use by setting the `tool_choice` parameter. + + We support the following categories of tools: + + - **Built-in tools**: Tools that are provided by OpenAI that extend the + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). + - **MCP Tools**: Integrations with third-party systems via custom MCP servers + or predefined connectors such as Google Drive and SharePoint. Learn more about + [MCP Tools](/docs/guides/tools-connectors-mcp). + - **Function calls (custom tools)**: Functions that are defined by you, + enabling the model to call your own code with strongly typed arguments + and outputs. Learn more about + [function calling](/docs/guides/function-calling). You can also use + custom tools to call your own code. + + - `Function object { name, parameters, strict, 3 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 to enforce strict parameter validation. Default `true`. + + - `type: "function"` + + The type of the function tool. Always `function`. + + - `"function"` + + - `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. + + - `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](/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_tools, 7 more }` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). + + - `server_label: string` + + A label for this MCP server, used to identify it in tool calls. + + - `type: "mcp"` + + The type of the MCP tool. Always `mcp`. + + - `"mcp"` + + - `allowed_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` or `connector_id` must be provided. Learn more about service + connectors [here](/docs/guides/tools-remote-mcp#connectors). + + Currently supported `connector_id` values are: + + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` + + - `"connector_dropbox"` + + - `"connector_gmail"` + + - `"connector_googlecalendar"` + + - `"connector_googledrive"` + + - `"connector_microsoftteams"` + + - `"connector_outlookcalendar"` + + - `"connector_outlookemail"` + + - `"connector_sharepoint"` + + - `defer_loading: optional boolean` + + Whether this MCP tool is deferred and discovered via tool search. + + - `headers: optional map[string]` + + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. + + - `require_approval: optional object { always, never } or "always" or "never"` + + Specify which of the MCP server's tools require approval. + + - `McpToolApprovalFilter object { always, never }` + + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. + + - `always: optional object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `never: optional object { read_only, tool_names }` + + A filter object to specify which tools are allowed. + + - `read_only: optional boolean` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `tool_names: optional array of string` + + List of allowed tool names. + + - `McpToolApprovalSetting = "always" or "never"` + + Specify a single approval policy for all tools. One of `always` or + `never`. When set to `always`, all tools will require approval. When + set to `never`, all tools will not require approval. + + - `"always"` + + - `"never"` + + - `server_description: optional string` + + Optional description of the MCP server, used to provide more context. + + - `server_url: optional string` + + The URL for the MCP server. One of `server_url` or `connector_id` must be + provided. + + - `CodeInterpreter object { container, type }` + + 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"` + + - `ImageGeneration object { type, action, background, 9 more }` + + A tool that generates images using the GPT image models. + + - `type: "image_generation"` + + The type of the image generation tool. Always `image_generation`. + + - `"image_generation"` + + - `action: optional "generate" or "edit" or "auto"` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `"generate"` + + - `"edit"` + + - `"auto"` + + - `background: optional "transparent" or "opaque" or "auto"` + + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. + + - `"transparent"` + + - `"opaque"` + + - `"auto"` + + - `input_fidelity: optional "high" or "low"` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `"high"` - - `"incomplete"` + - `"low"` - - `"calling"` + - `input_image_mask: optional object { file_id, image_url }` - - `"failed"` + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `file_id: optional string` - A list of tools available on an MCP server. + File ID for the mask image. - - `id: string` + - `image_url: optional string` - The unique ID of the list. + Base64-encoded mask image. - - `server_label: string` + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - The label of the MCP server. + The image generation model to use. Default: `gpt-image-1`. - - `tools: array of object { input_schema, name, annotations, description }` + - `string` - The tools available on the server. + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - `input_schema: unknown` + The image generation model to use. Default: `gpt-image-1`. - The JSON schema describing the tool's input. + - `"gpt-image-1"` - - `name: string` + - `"gpt-image-1-mini"` - The name of the tool. + - `"gpt-image-1.5"` - - `annotations: optional unknown` + - `moderation: optional "auto" or "low"` - Additional annotations about the tool. + Moderation level for the generated image. Default: `auto`. - - `description: optional string` + - `"auto"` - The description of the tool. + - `"low"` - - `type: "mcp_list_tools"` + - `output_compression: optional number` - The type of the item. Always `mcp_list_tools`. + Compression level for the output image. Default: 100. - - `"mcp_list_tools"` + - `output_format: optional "png" or "webp" or "jpeg"` - - `error: optional string` + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. - Error message if the server could not list tools. + - `"png"` - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `"webp"` - A request for human approval of a tool invocation. + - `"jpeg"` - - `id: string` + - `partial_images: optional number` - The unique ID of the approval request. + Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - `arguments: string` + - `quality: optional "low" or "medium" or "high" or "auto"` - A JSON string of arguments for the tool. + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. - - `name: string` + - `"low"` - The name of the tool to run. + - `"medium"` - - `server_label: string` + - `"high"` - The label of the MCP server making the request. + - `"auto"` - - `type: "mcp_approval_request"` + - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - The type of the item. Always `mcp_approval_request`. + The size of the generated image. One of `1024x1024`, `1024x1536`, + `1536x1024`, or `auto`. Default: `auto`. - - `"mcp_approval_request"` + - `"1024x1024"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `"1024x1536"` - A response to an MCP approval request. + - `"1536x1024"` - - `id: string` + - `"auto"` - The unique ID of the approval response + - `LocalShell object { type }` - - `approval_request_id: string` + A tool that allows the model to execute shell commands in a local environment. - The ID of the approval request being answered. + - `type: "local_shell"` - - `approve: boolean` + The type of the local shell tool. Always `local_shell`. - Whether the request was approved. + - `"local_shell"` - - `type: "mcp_approval_response"` + - `Shell object { type, environment }` - The type of the item. Always `mcp_approval_response`. + A tool that allows the model to execute shell commands. - - `"mcp_approval_response"` + - `type: "shell"` - - `reason: optional string` + The type of the shell tool. Always `shell`. - Optional reason for the decision. + - `"shell"` - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - A call to a custom tool created by the model. + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `call_id: string` + - `LocalEnvironment object { type, skills }` - An identifier used to map this custom tool call to a tool call output. + - `ContainerReference object { container_id, type }` - - `input: string` + - `Custom object { name, type, defer_loading, 2 more }` - The input for the custom 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) - `name: string` - The name of the custom tool being called. + The name of the custom tool, used to identify it in tool calls. - - `type: "custom_tool_call"` + - `type: "custom"` - The type of the custom tool call. Always `custom_tool_call`. + The type of the custom tool. Always `custom`. - - `"custom_tool_call"` + - `"custom"` - - `id: optional string` + - `defer_loading: optional boolean` - The unique ID of the custom tool call in the OpenAI platform. + Whether this tool should be deferred and discovered via tool search. - - `namespace: optional string` + - `description: optional string` - The namespace of the custom tool being called. + Optional description of the custom tool, used to provide more context. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `format: optional CustomToolInputFormat` - - `id: string` + The input format for the custom tool. Default is unconstrained text. - The unique ID of the custom tool call output item. + - `Namespace object { description, name, tools, type }` - - `call_id: string` + Groups function/custom tools under a shared namespace. - The call ID, used to map this custom tool call output to a custom tool call. + - `description: string` - - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile` + A description of the namespace shown to the model. - The output from the custom tool call generated by your code. - Can be a string or an list of output content. + - `name: string` - - `StringOutput = string` + The namespace name used in tool calls (for example, `crm`). - A string of the output of the custom tool call. + - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile` + The function/custom tools available inside this namespace. - Text, image, or file output of the custom tool call. + - `Function object { name, type, defer_loading, 3 more }` - - `ResponseInputText = object { text, type }` + - `name: string` - A text input to the model. + - `type: "function"` - - `text: string` + - `"function"` - The text input to the model. + - `defer_loading: optional boolean` - - `type: "input_text"` + Whether this function should be deferred and discovered via tool search. - The type of the input item. Always `input_text`. + - `description: optional string` - - `"input_text"` + - `parameters: optional unknown` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `strict: optional boolean` - An image input to the model. Learn about [image inputs](/docs/guides/vision). + - `Custom object { name, type, defer_loading, 2 more }` - - `detail: "low" or "high" or "auto" or "original"` + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + - `name: string` - - `"low"` + The name of the custom tool, used to identify it in tool calls. - - `"high"` + - `type: "custom"` - - `"auto"` + The type of the custom tool. Always `custom`. - - `"original"` + - `"custom"` - - `type: "input_image"` + - `defer_loading: optional boolean` - The type of the input item. Always `input_image`. + Whether this tool should be deferred and discovered via tool search. - - `"input_image"` + - `description: optional string` - - `file_id: optional string` + Optional description of the custom tool, used to provide more context. - The ID of the file to be sent to the model. + - `format: optional CustomToolInputFormat` - - `image_url: optional string` + The input format for the custom tool. Default is unconstrained text. - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `type: "namespace"` - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + The type of the tool. Always `namespace`. - A file input to the model. + - `"namespace"` - - `type: "input_file"` + - `ToolSearch object { type, description, execution, parameters }` - The type of the input item. Always `input_file`. + Hosted or BYOT tool search configuration for deferred tools. - - `"input_file"` + - `type: "tool_search"` - - `detail: optional "low" or "high"` + The type of the tool. Always `tool_search`. - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + - `"tool_search"` - - `"low"` + - `description: optional string` - - `"high"` + Description shown to the model for a client-executed tool search tool. - - `file_data: optional string` + - `execution: optional "server" or "client"` - The content of the file to be sent to the model. + Whether tool search is executed by the server or by the client. - - `file_id: optional string` + - `"server"` - The ID of the file to be sent to the model. + - `"client"` - - `file_url: optional string` + - `parameters: optional unknown` - The URL of the file to be sent to the model. + Parameter schema for a client-executed tool search tool. - - `filename: optional string` + - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }` - The name of the file to be sent to the model. + 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). - - `status: "in_progress" or "completed" or "incomplete"` + - `type: "web_search_preview" or "web_search_preview_2025_03_11"` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. - - `"in_progress"` + - `"web_search_preview"` - - `"completed"` + - `"web_search_preview_2025_03_11"` - - `"incomplete"` + - `search_content_types: optional array of "text" or "image"` - - `type: "custom_tool_call_output"` + - `"text"` - The type of the custom tool call output. Always `custom_tool_call_output`. + - `"image"` - - `"custom_tool_call_output"` + - `search_context_size: optional "low" or "medium" or "high"` - - `created_by: optional string` + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. - The identifier of the actor that created the item. + - `"low"` - - `parallel_tool_calls: boolean` + - `"medium"` - Whether to allow the model to run tool calls in parallel. + - `"high"` - - `temperature: number` + - `user_location: optional object { type, city, country, 2 more }` - What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. + The user's location. - - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 5 more` + - `type: "approximate"` - How the model should select which tool (or tools) to use when generating - a response. See the `tools` parameter to see how to specify which tools - the model can call. + The type of location approximation. Always `approximate`. - - `ToolChoiceOptions = "none" or "auto" or "required"` + - `"approximate"` - Controls which (if any) tool is called by the model. + - `city: optional string` - `none` means the model will not call any tool and instead generates a message. + Free text input for the city of the user, e.g. `San Francisco`. - `auto` means the model can pick between generating a message or calling one or - more tools. + - `country: optional string` - `required` means the model must call one or more tools. + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - - `"none"` + - `region: optional string` - - `"auto"` + Free text input for the region of the user, e.g. `California`. - - `"required"` + - `timezone: optional string` - - `ToolChoiceAllowed = object { mode, tools, type }` + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - Constrains the tools available to the model to a pre-defined set. + - `ApplyPatch object { type }` - - `mode: "auto" or "required"` + Allows the assistant to create, delete, or update files using unified diffs. - Constrains the tools available to the model to a pre-defined set. + - `type: "apply_patch"` - `auto` allows the model to pick from among the allowed tools and generate a - message. + The type of the tool. Always `apply_patch`. - `required` requires the model to call one or more of the allowed tools. + - `"apply_patch"` - - `"auto"` + - `top_p: number` - - `"required"` + 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. - - `tools: array of map[unknown]` + We generally recommend altering this or `temperature` but not both. - A list of tool definitions that the model should be allowed to call. + - `background: optional boolean` - For the Responses API, the list of tool definitions might look like: + Whether to run the model response in the background. + [Learn more](/docs/guides/background). - ```json - [ - { "type": "function", "name": "get_weather" }, - { "type": "mcp", "server_label": "deepwiki" }, - { "type": "image_generation" } - ] - ``` + - `completed_at: optional number` - - `type: "allowed_tools"` + Unix timestamp (in seconds) of when this Response was completed. + Only present when the status is `completed`. - Allowed tool configuration type. Always `allowed_tools`. + - `conversation: optional object { id }` - - `"allowed_tools"` + The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. - - `ToolChoiceTypes = object { type }` + - `id: string` - Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](/docs/guides/tools). + The unique ID of the conversation that this response was associated with. - - `type: "file_search" or "web_search_preview" or "computer" or 5 more` + - `max_output_tokens: optional number` - The type of hosted tool the model should to use. Learn more about - [built-in tools](/docs/guides/tools). + 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). - Allowed values are: + - `max_tool_calls: optional number` - - `file_search` - - `web_search_preview` - - `computer` - - `computer_use_preview` - - `computer_use` - - `code_interpreter` - - `image_generation` + 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. - - `"file_search"` + - `output_text: optional string` - - `"web_search_preview"` + 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. - - `"computer"` + - `previous_response_id: optional string` - - `"computer_use_preview"` + 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`. - - `"computer_use"` + - `prompt: optional ResponsePrompt` - - `"web_search_preview_2025_03_11"` + Reference to a prompt template and its variables. + [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). - - `"image_generation"` + - `id: string` - - `"code_interpreter"` + The unique identifier of the prompt template to use. - - `ToolChoiceFunction = object { name, type }` + - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile]` - Use this option to force the model to call a specific function. + 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. - - `name: string` + - `string` - The name of the function to call. + - `ResponseInputText object { text, type }` - - `type: "function"` + A text input to the model. - For function calling, the type is always `function`. + - `ResponseInputImage object { detail, type, file_id, image_url }` - - `"function"` + An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `ToolChoiceMcp = object { server_label, type, name }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` - Use this option to force the model to call a specific tool on a remote MCP server. + A file input to the model. - - `server_label: string` + - `version: optional string` - The label of the MCP server to use. + Optional version of the prompt template. - - `type: "mcp"` + - `prompt_cache_key: optional string` - For MCP tools, the type is always `mcp`. + 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). - - `"mcp"` + - `prompt_cache_retention: optional "in-memory" or "24h"` - - `name: optional string` + 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). - The name of the tool to call on the server. + - `"in-memory"` - - `ToolChoiceCustom = object { name, type }` + - `"24h"` - Use this option to force the model to call a specific custom tool. + - `reasoning: optional Reasoning` - - `name: string` + **gpt-5 and o-series models only** - The name of the custom tool to call. + Configuration options for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). - - `type: "custom"` + - `effort: optional ReasoningEffort` - For custom tool calling, the type is always `custom`. + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). + Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing + reasoning effort can result in faster responses and fewer tokens used + on reasoning in a response. - - `"custom"` + - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. + - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. + - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. + - `xhigh` is supported for all models after `gpt-5.1-codex-max`. - - `ToolChoiceApplyPatch = object { type }` + - `"none"` - Forces the model to call the apply_patch tool when executing a tool call. + - `"minimal"` - - `type: "apply_patch"` + - `"low"` - The tool to call. Always `apply_patch`. + - `"medium"` - - `"apply_patch"` + - `"high"` - - `ToolChoiceShell = object { type }` + - `"xhigh"` - Forces the model to call the shell tool when a tool call is required. + - `generate_summary: optional "auto" or "concise" or "detailed"` - - `type: "shell"` + **Deprecated:** use `summary` instead. - The tool to call. Always `shell`. + 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`. - - `"shell"` + - `"auto"` - - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` + - `"concise"` - An array of tools the model may call while generating a response. You - can specify which tool to use by setting the `tool_choice` parameter. + - `"detailed"` - We support the following categories of tools: + - `summary: optional "auto" or "concise" or "detailed"` - - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](/docs/guides/tools-web-search) - or [file search](/docs/guides/tools-file-search). Learn more about - [built-in tools](/docs/guides/tools). - - **MCP Tools**: Integrations with third-party systems via custom MCP servers - or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](/docs/guides/tools-connectors-mcp). - - **Function calls (custom tools)**: Functions that are defined by you, - enabling the model to call your own code with strongly typed arguments - and outputs. Learn more about - [function calling](/docs/guides/function-calling). You can also use - custom tools to call your own code. + 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`. - - `Function = object { name, parameters, strict, 3 more }` + `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - 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). + - `"auto"` - - `name: string` + - `"concise"` - The name of the function to call. + - `"detailed"` - - `parameters: map[unknown]` + - `safety_identifier: optional string` - A JSON schema object describing the parameters of the function. + 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). - - `strict: boolean` + - `service_tier: optional "auto" or "default" or "flex" or 2 more` - Whether to enforce strict parameter validation. Default `true`. + Specifies the processing type used for serving the request. - - `type: "function"` + - 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'. - The type of the function tool. Always `function`. + 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. - - `"function"` + - `"auto"` - - `defer_loading: optional boolean` + - `"default"` - Whether this function is deferred and loaded via tool search. + - `"flex"` - - `description: optional string` + - `"scale"` - A description of the function. Used by the model to determine whether or not to call the function. + - `"priority"` - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `status: optional ResponseStatus` - 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). + The status of the response generation. One of `completed`, `failed`, + `in_progress`, `cancelled`, `queued`, or `incomplete`. - - `type: "file_search"` + - `"completed"` - The type of the file search tool. Always `file_search`. + - `"failed"` - - `"file_search"` + - `"in_progress"` - - `vector_store_ids: array of string` + - `"cancelled"` - The IDs of the vector stores to search. + - `"queued"` - - `filters: optional ComparisonFilter or CompoundFilter` + - `"incomplete"` - A filter to apply. + - `text: optional ResponseTextConfig` - - `ComparisonFilter = object { key, type, value }` + Configuration options for a text response from the model. Can be plain + text or structured JSON data. Learn more: - A filter used to compare a specified attribute key to a given value using a defined comparison operation. + - [Text inputs and outputs](/docs/guides/text) + - [Structured Outputs](/docs/guides/structured-outputs) - - `key: string` + - `format: optional ResponseFormatTextConfig` - The key to compare against the value. + An object specifying the format that the model must output. - - `type: "eq" or "ne" or "gt" or 5 more` + 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). - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + The default format is `{ "type": "text" }` with no additional options. - - `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 + **Not recommended for gpt-4o and newer models:** - - `"eq"` + 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. - - `"ne"` + - `ResponseFormatText object { type }` - - `"gt"` + Default response format. Used to generate text responses. - - `"gte"` + - `type: "text"` - - `"lt"` + The type of response format being defined. Always `text`. - - `"lte"` + - `"text"` - - `"in"` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` - - `"nin"` + JSON Schema response format. Used to generate structured JSON responses. + Learn more about [Structured Outputs](/docs/guides/structured-outputs). - - `value: string or number or boolean or array of string or number` + - `name: string` - The value to compare against the attribute key; supports string, number, or boolean types. + 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. - - `string` + - `schema: map[unknown]` - - `number` + The schema for the response format, described as a JSON Schema object. + Learn how to build JSON schemas [here](https://json-schema.org/). - - `boolean` + - `type: "json_schema"` - - `array of string or number` + The type of response format being defined. Always `json_schema`. - - `string` + - `"json_schema"` - - `number` + - `description: optional string` - - `CompoundFilter = object { filters, type }` + A description of what the response format is for, used by the model to + determine how to respond in the format. - Combine multiple filters using `and` or `or`. + - `strict: optional boolean` - - `filters: array of ComparisonFilter or unknown` + 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). - Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + - `ResponseFormatJSONObject object { type }` - - `ComparisonFilter = object { key, type, value }` + 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. - A filter used to compare a specified attribute key to a given value using a defined comparison operation. + - `type: "json_object"` - - `key: string` + The type of response format being defined. Always `json_object`. - The key to compare against the value. + - `"json_object"` - - `type: "eq" or "ne" or "gt" or 5 more` + - `verbosity: optional "low" or "medium" or "high"` - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + 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`. - - `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 + - `"low"` - - `"eq"` + - `"medium"` - - `"ne"` + - `"high"` - - `"gt"` + - `top_logprobs: optional number` - - `"gte"` + An integer between 0 and 20 specifying the number of most likely tokens to + return at each token position, each with an associated log probability. - - `"lt"` + - `truncation: optional "auto" or "disabled"` - - `"lte"` + The truncation strategy to use for the model response. - - `"in"` + - `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. - - `"nin"` + - `"auto"` - - `value: string or number or boolean or array of string or number` + - `"disabled"` - The value to compare against the attribute key; supports string, number, or boolean types. + - `usage: optional ResponseUsage` - - `string` + Represents token usage details including input tokens, output tokens, + a breakdown of output tokens, and the total tokens used. - - `number` + - `input_tokens: number` - - `boolean` + The number of input tokens. - - `array of string or number` + - `input_tokens_details: object { cached_tokens }` - - `string` + A detailed breakdown of the input tokens. - - `number` + - `cached_tokens: number` - - `unknown` + The number of tokens that were retrieved from the cache. + [More on prompt caching](/docs/guides/prompt-caching). - - `type: "and" or "or"` + - `output_tokens: number` - Type of operation: `and` or `or`. + The number of output tokens. - - `"and"` + - `output_tokens_details: object { reasoning_tokens }` - - `"or"` + A detailed breakdown of the output tokens. - - `max_num_results: optional number` + - `reasoning_tokens: number` - The maximum number of results to return. This number should be between 1 and 50 inclusive. + The number of reasoning tokens. - - `ranking_options: optional object { hybrid_search, ranker, score_threshold }` + - `total_tokens: number` - Ranking options for search. + The total number of tokens used. - - `hybrid_search: optional object { embedding_weight, text_weight }` + - `user: optional string` - Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + 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). - - `embedding_weight: number` + - `sequence_number: number` - The weight of the embedding in the reciprocal ranking fusion. + The sequence number for this event. - - `text_weight: number` + - `type: "response.completed"` - The weight of the text in the reciprocal ranking fusion. + The type of the event. Always `response.completed`. - - `ranker: optional "auto" or "default-2024-11-15"` + - `"response.completed"` - The ranker to use for the file search. + - `ResponseContentPartAddedEvent object { content_index, item_id, output_index, 3 more }` - - `"auto"` + Emitted when a new content part is added. - - `"default-2024-11-15"` + - `content_index: number` - - `score_threshold: optional number` + The index of the content part that was added. - 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. + - `item_id: string` - - `Computer = object { type }` + The ID of the output item that the content part was added to. - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + - `output_index: number` - - `type: "computer"` + The index of the output item that the content part was added to. - The type of the computer tool. Always `computer`. + - `part: ResponseOutputText or ResponseOutputRefusal or object { text, type }` - - `"computer"` + The content part that was added. - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` - A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + A text output from the model. - - `display_height: number` + - `ResponseOutputRefusal object { refusal, type }` - The height of the computer display. + A refusal from the model. - - `display_width: number` + - `ReasoningText object { text, type }` - The width of the computer display. + Reasoning text from the model. - - `environment: "windows" or "mac" or "linux" or 2 more` + - `text: string` - The type of computer environment to control. + The reasoning text from the model. - - `"windows"` + - `type: "reasoning_text"` - - `"mac"` + The type of the reasoning text. Always `reasoning_text`. - - `"linux"` + - `"reasoning_text"` - - `"ubuntu"` + - `sequence_number: number` - - `"browser"` + The sequence number of this event. - - `type: "computer_use_preview"` + - `type: "response.content_part.added"` - The type of the computer use tool. Always `computer_use_preview`. + The type of the event. Always `response.content_part.added`. - - `"computer_use_preview"` + - `"response.content_part.added"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `ResponseContentPartDoneEvent object { content_index, item_id, output_index, 3 more }` - Search the Internet for sources related to the prompt. Learn more about the - [web search tool](/docs/guides/tools-web-search). + Emitted when a content part is done. - - `type: "web_search" or "web_search_2025_08_26"` + - `content_index: number` - The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + The index of the content part that is done. - - `"web_search"` + - `item_id: string` - - `"web_search_2025_08_26"` + The ID of the output item that the content part was added to. - - `filters: optional object { allowed_domains }` + - `output_index: number` - Filters for the search. + The index of the output item that the content part was added to. - - `allowed_domains: optional array of string` + - `part: ResponseOutputText or ResponseOutputRefusal or object { text, type }` - Allowed domains for the search. If not provided, all domains are allowed. - Subdomains of the provided domains are allowed as well. + The content part that is done. - Example: `["pubmed.ncbi.nlm.nih.gov"]` + - `ResponseOutputText object { annotations, logprobs, text, type }` - - `search_context_size: optional "low" or "medium" or "high"` + A text output from the model. - 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. + - `ResponseOutputRefusal object { refusal, type }` - - `"low"` + A refusal from the model. - - `"medium"` + - `ReasoningText object { text, type }` - - `"high"` + Reasoning text from the model. - - `user_location: optional object { city, country, region, 2 more }` + - `text: string` - The approximate location of the user. + The reasoning text from the model. - - `city: optional string` + - `type: "reasoning_text"` - Free text input for the city of the user, e.g. `San Francisco`. + The type of the reasoning text. Always `reasoning_text`. - - `country: optional string` + - `"reasoning_text"` - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + - `sequence_number: number` - - `region: optional string` + The sequence number of this event. - Free text input for the region of the user, e.g. `California`. + - `type: "response.content_part.done"` - - `timezone: optional string` + The type of the event. Always `response.content_part.done`. - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + - `"response.content_part.done"` - - `type: optional "approximate"` + - `ResponseCreatedEvent object { response, sequence_number, type }` - The type of location approximation. Always `approximate`. + An event that is emitted when a response is created. - - `"approximate"` + - `response: Response` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + The response that was created. - Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). + - `sequence_number: number` - - `server_label: string` + The sequence number for this event. - A label for this MCP server, used to identify it in tool calls. + - `type: "response.created"` - - `type: "mcp"` + The type of the event. Always `response.created`. - The type of the MCP tool. Always `mcp`. + - `"response.created"` - - `"mcp"` + - `ResponseErrorEvent object { code, message, param, 2 more }` - - `allowed_tools: optional array of string or object { read_only, tool_names }` + Emitted when an error occurs. - List of allowed tool names or a filter object. + - `code: string` - - `McpAllowedTools = array of string` + The error code. - A string array of allowed tool names + - `message: string` - - `McpToolFilter = object { read_only, tool_names }` + The error message. - A filter object to specify which tools are allowed. + - `param: string` - - `read_only: optional boolean` + The error parameter. - 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. + - `sequence_number: number` - - `tool_names: optional array of string` + The sequence number of this event. - List of allowed tool names. + - `type: "error"` - - `authorization: optional string` + The type of the event. Always `error`. - 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. + - `"error"` - - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more` + - `ResponseFileSearchCallCompletedEvent object { item_id, output_index, sequence_number, type }` - Identifier for service connectors, like those available in ChatGPT. One of - `server_url` or `connector_id` must be provided. Learn more about service - connectors [here](/docs/guides/tools-remote-mcp#connectors). + Emitted when a file search call is completed (results found). - Currently supported `connector_id` values are: + - `item_id: string` - - Dropbox: `connector_dropbox` - - Gmail: `connector_gmail` - - Google Calendar: `connector_googlecalendar` - - Google Drive: `connector_googledrive` - - Microsoft Teams: `connector_microsoftteams` - - Outlook Calendar: `connector_outlookcalendar` - - Outlook Email: `connector_outlookemail` - - SharePoint: `connector_sharepoint` + The ID of the output item that the file search call is initiated. - - `"connector_dropbox"` + - `output_index: number` - - `"connector_gmail"` + The index of the output item that the file search call is initiated. - - `"connector_googlecalendar"` + - `sequence_number: number` - - `"connector_googledrive"` + The sequence number of this event. - - `"connector_microsoftteams"` + - `type: "response.file_search_call.completed"` - - `"connector_outlookcalendar"` + The type of the event. Always `response.file_search_call.completed`. - - `"connector_outlookemail"` + - `"response.file_search_call.completed"` - - `"connector_sharepoint"` + - `ResponseFileSearchCallInProgressEvent object { item_id, output_index, sequence_number, type }` - - `defer_loading: optional boolean` + Emitted when a file search call is initiated. - Whether this MCP tool is deferred and discovered via tool search. + - `item_id: string` - - `headers: optional map[string]` + The ID of the output item that the file search call is initiated. - Optional HTTP headers to send to the MCP server. Use for authentication - or other purposes. + - `output_index: number` - - `require_approval: optional object { always, never } or "always" or "never"` + The index of the output item that the file search call is initiated. - Specify which of the MCP server's tools require approval. + - `sequence_number: number` - - `McpToolApprovalFilter = object { always, never }` + The sequence number of this event. - Specify which of the MCP server's tools require approval. Can be - `always`, `never`, or a filter object associated with tools - that require approval. + - `type: "response.file_search_call.in_progress"` - - `always: optional object { read_only, tool_names }` + The type of the event. Always `response.file_search_call.in_progress`. - A filter object to specify which tools are allowed. + - `"response.file_search_call.in_progress"` - - `read_only: optional boolean` + - `ResponseFileSearchCallSearchingEvent object { item_id, output_index, sequence_number, type }` - 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. + Emitted when a file search is currently searching. - - `tool_names: optional array of string` + - `item_id: string` - List of allowed tool names. + The ID of the output item that the file search call is initiated. - - `never: optional object { read_only, tool_names }` + - `output_index: number` - A filter object to specify which tools are allowed. + The index of the output item that the file search call is searching. - - `read_only: optional boolean` + - `sequence_number: number` - Indicates whether or not a tool modifies data or is read-only. If an - MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), - it will match this filter. + The sequence number of this event. - - `tool_names: optional array of string` + - `type: "response.file_search_call.searching"` - List of allowed tool names. + The type of the event. Always `response.file_search_call.searching`. - - `McpToolApprovalSetting = "always" or "never"` + - `"response.file_search_call.searching"` - 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. + - `ResponseFunctionCallArgumentsDeltaEvent object { delta, item_id, output_index, 2 more }` - - `"always"` + Emitted when there is a partial function-call arguments delta. - - `"never"` + - `delta: string` - - `server_description: optional string` + The function-call arguments delta that is added. - Optional description of the MCP server, used to provide more context. + - `item_id: string` - - `server_url: optional string` + The ID of the output item that the function-call arguments delta is added to. - The URL for the MCP server. One of `server_url` or `connector_id` must be - provided. + - `output_index: number` + + The index of the output item that the function-call arguments delta is added to. - - `CodeInterpreter = object { container, type }` + - `sequence_number: number` - A tool that runs Python code to help generate a response to a prompt. + The sequence number of this event. - - `container: string or object { type, file_ids, memory_limit, network_policy }` + - `type: "response.function_call_arguments.delta"` - 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. + The type of the event. Always `response.function_call_arguments.delta`. - - `string` + - `"response.function_call_arguments.delta"` - The container ID. + - `ResponseFunctionCallArgumentsDoneEvent object { arguments, item_id, name, 3 more }` - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + Emitted when function-call arguments are finalized. - Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. + - `arguments: string` - - `type: "auto"` + The function-call arguments. - Always `auto`. + - `item_id: string` - - `"auto"` + The ID of the item. - - `file_ids: optional array of string` + - `name: string` - An optional list of uploaded files to make available to your code. + The name of the function that was called. - - `memory_limit: optional "1g" or "4g" or "16g" or "64g"` + - `output_index: number` - The memory limit for the code interpreter container. + The index of the output item. - - `"1g"` + - `sequence_number: number` - - `"4g"` + The sequence number of this event. - - `"16g"` + - `type: "response.function_call_arguments.done"` - - `"64g"` + - `"response.function_call_arguments.done"` - - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` + - `ResponseInProgressEvent object { response, sequence_number, type }` - Network access policy for the container. + Emitted when the response is in progress. - - `ContainerNetworkPolicyDisabled = object { type }` + - `response: Response` - - `type: "disabled"` + The response that is in progress. - Disable outbound network access. Always `disabled`. + - `sequence_number: number` - - `"disabled"` + The sequence number of this event. - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `type: "response.in_progress"` - - `allowed_domains: array of string` + The type of the event. Always `response.in_progress`. - A list of allowed domains when type is `allowlist`. + - `"response.in_progress"` - - `type: "allowlist"` + - `ResponseFailedEvent object { response, sequence_number, type }` - Allow outbound network access only to specified domains. Always `allowlist`. + An event that is emitted when a response fails. - - `"allowlist"` + - `response: Response` - - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret` + The response that failed. - Optional domain-scoped secrets for allowlisted domains. + - `sequence_number: number` - - `domain: string` + The sequence number of this event. - The domain associated with the secret. + - `type: "response.failed"` - - `name: string` + The type of the event. Always `response.failed`. - The name of the secret to inject for the domain. + - `"response.failed"` - - `value: string` + - `ResponseIncompleteEvent object { response, sequence_number, type }` - The secret value to inject for the domain. + An event that is emitted when a response finishes as incomplete. - - `type: "code_interpreter"` + - `response: Response` - The type of the code interpreter tool. Always `code_interpreter`. + The response that was incomplete. - - `"code_interpreter"` + - `sequence_number: number` - - `ImageGeneration = object { type, action, background, 9 more }` + The sequence number of this event. - A tool that generates images using the GPT image models. + - `type: "response.incomplete"` - - `type: "image_generation"` + The type of the event. Always `response.incomplete`. - The type of the image generation tool. Always `image_generation`. + - `"response.incomplete"` - - `"image_generation"` + - `ResponseOutputItemAddedEvent object { item, output_index, sequence_number, type }` - - `action: optional "generate" or "edit" or "auto"` + Emitted when a new output item is added. - Whether to generate a new image or edit an existing image. Default: `auto`. + - `item: ResponseOutputItem` - - `"generate"` + The output item that was added. - - `"edit"` + - `ResponseOutputMessage object { id, content, role, 3 more }` - - `"auto"` + An output message from the model. - - `background: optional "transparent" or "opaque" or "auto"` + - `FileSearchCall object { id, queries, status, 2 more }` - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. + The results of a file search tool call. See the + [file search guide](/docs/guides/tools-file-search) for more information. - - `"transparent"` + - `FunctionCall object { arguments, call_id, name, 4 more }` - - `"opaque"` + A tool call to run a function. See the + [function calling guide](/docs/guides/function-calling) for more information. - - `"auto"` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - - `input_fidelity: optional "high" or "low"` + - `WebSearchCall object { id, action, status, type }` - 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`. + The results of a web search tool call. See the + [web search guide](/docs/guides/tools-web-search) for more information. - - `"high"` + - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }` - - `"low"` + A tool call to a computer use tool. See the + [computer use guide](/docs/guides/tools-computer-use) for more information. - - `input_image_mask: optional object { file_id, image_url }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). + - `Reasoning object { id, summary, type, 3 more }` - - `file_id: optional 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](/docs/guides/conversation-state). - File ID for the mask image. + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - - `image_url: optional string` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - Base64-encoded mask image. + - `Compaction object { id, encrypted_content, type, created_by }` - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + + - `ImageGenerationCall object { id, result, status, type }` - The image generation model to use. Default: `gpt-image-1`. + An image generation request made by the model. - - `string` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + A tool call to run code. - The image generation model to use. Default: `gpt-image-1`. + - `LocalShellCall object { id, action, call_id, 2 more }` - - `"gpt-image-1"` + A tool call to run a command on the local shell. - - `"gpt-image-1-mini"` + - `LocalShellCallOutput object { id, output, type, status }` - - `"gpt-image-1.5"` + The output of a local shell tool call. - - `moderation: optional "auto" or "low"` + - `ShellCall object { id, action, call_id, 4 more }` - Moderation level for the generated image. Default: `auto`. + A tool call that executes one or more shell commands in a managed environment. - - `"auto"` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` - - `"low"` + The output of a shell tool call that was emitted. - - `output_compression: optional number` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` - Compression level for the output image. Default: 100. + A tool call that applies file diffs by creating, deleting, or updating files. - - `output_format: optional "png" or "webp" or "jpeg"` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. + The output emitted by an apply patch tool call. - - `"png"` + - `McpCall object { id, arguments, name, 6 more }` - - `"webp"` + An invocation of a tool on an MCP server. - - `"jpeg"` + - `McpListTools object { id, server_label, tools, 2 more }` - - `partial_images: optional number` + A list of tools available on an MCP server. - Number of partial images to generate in streaming mode, from 0 (default value) to 3. + - `McpApprovalRequest object { id, arguments, name, 2 more }` - - `quality: optional "low" or "medium" or "high" or "auto"` + A request for human approval of a tool invocation. - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` - - `"low"` + A response to an MCP approval request. - - `"medium"` + - `CustomToolCall object { call_id, input, name, 3 more }` - - `"high"` + A call to a custom tool created by the model. - - `"auto"` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + - `output_index: number` - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. + The index of the output item that was added. - - `"1024x1024"` + - `sequence_number: number` - - `"1024x1536"` + The sequence number of this event. - - `"1536x1024"` + - `type: "response.output_item.added"` - - `"auto"` + The type of the event. Always `response.output_item.added`. - - `LocalShell = object { type }` + - `"response.output_item.added"` - A tool that allows the model to execute shell commands in a local environment. + - `ResponseOutputItemDoneEvent object { item, output_index, sequence_number, type }` - - `type: "local_shell"` + Emitted when an output item is marked done. - The type of the local shell tool. Always `local_shell`. + - `item: ResponseOutputItem` - - `"local_shell"` + The output item that was marked done. - - `Shell = object { type, environment }` + - `output_index: number` - A tool that allows the model to execute shell commands. + The index of the output item that was marked done. - - `type: "shell"` + - `sequence_number: number` - The type of the shell tool. Always `shell`. + The sequence number of this event. - - `"shell"` + - `type: "response.output_item.done"` - - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` + The type of the event. Always `response.output_item.done`. - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `"response.output_item.done"` - - `type: "container_auto"` + - `ResponseReasoningSummaryPartAddedEvent object { item_id, output_index, part, 3 more }` - Automatically creates a container for this request + Emitted when a new reasoning summary part is added. - - `"container_auto"` + - `item_id: string` - - `file_ids: optional array of string` + The ID of the item this summary part is associated with. - An optional list of uploaded files to make available to your code. + - `output_index: number` - - `memory_limit: optional "1g" or "4g" or "16g" or "64g"` + The index of the output item this summary part is associated with. - The memory limit for the container. + - `part: object { text, type }` - - `"1g"` + The summary part that was added. - - `"4g"` + - `text: string` - - `"16g"` + The text of the summary part. - - `"64g"` + - `type: "summary_text"` - - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist` + The type of the summary part. Always `summary_text`. - Network access policy for the container. + - `"summary_text"` - - `ContainerNetworkPolicyDisabled = object { type }` + - `sequence_number: number` - - `type: "disabled"` + The sequence number of this event. - Disable outbound network access. Always `disabled`. + - `summary_index: number` - - `"disabled"` + The index of the summary part within the reasoning summary. - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `type: "response.reasoning_summary_part.added"` - - `allowed_domains: array of string` + The type of the event. Always `response.reasoning_summary_part.added`. - A list of allowed domains when type is `allowlist`. + - `"response.reasoning_summary_part.added"` - - `type: "allowlist"` + - `ResponseReasoningSummaryPartDoneEvent object { item_id, output_index, part, 3 more }` - Allow outbound network access only to specified domains. Always `allowlist`. + Emitted when a reasoning summary part is completed. - - `"allowlist"` + - `item_id: string` - - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret` + The ID of the item this summary part is associated with. - Optional domain-scoped secrets for allowlisted domains. + - `output_index: number` - - `domain: string` + The index of the output item this summary part is associated with. - The domain associated with the secret. + - `part: object { text, type }` - - `name: string` + The completed summary part. - The name of the secret to inject for the domain. + - `text: string` - - `value: string` + The text of the summary part. - The secret value to inject for the domain. + - `type: "summary_text"` - - `skills: optional array of SkillReference or InlineSkill` + The type of the summary part. Always `summary_text`. - An optional list of skills referenced by id or inline data. + - `"summary_text"` - - `SkillReference = object { skill_id, type, version }` + - `sequence_number: number` - - `skill_id: string` + The sequence number of this event. - The ID of the referenced skill. + - `summary_index: number` - - `type: "skill_reference"` + The index of the summary part within the reasoning summary. - References a skill created with the /v1/skills endpoint. + - `type: "response.reasoning_summary_part.done"` - - `"skill_reference"` + The type of the event. Always `response.reasoning_summary_part.done`. - - `version: optional string` + - `"response.reasoning_summary_part.done"` - Optional skill version. Use a positive integer or 'latest'. Omit for default. + - `ResponseReasoningSummaryTextDeltaEvent object { delta, item_id, output_index, 3 more }` - - `InlineSkill = object { description, name, source, type }` + Emitted when a delta is added to a reasoning summary text. - - `description: string` + - `delta: string` - The description of the skill. + The text delta that was added to the summary. - - `name: string` + - `item_id: string` - The name of the skill. + The ID of the item this summary text delta is associated with. - - `source: InlineSkillSource` + - `output_index: number` - Inline skill payload + The index of the output item this summary text delta is associated with. - - `data: string` + - `sequence_number: number` - Base64-encoded skill zip bundle. + The sequence number of this event. - - `media_type: "application/zip"` + - `summary_index: number` - The media type of the inline skill payload. Must be `application/zip`. + The index of the summary part within the reasoning summary. - - `"application/zip"` + - `type: "response.reasoning_summary_text.delta"` - - `type: "base64"` + The type of the event. Always `response.reasoning_summary_text.delta`. - The type of the inline skill source. Must be `base64`. + - `"response.reasoning_summary_text.delta"` - - `"base64"` + - `ResponseReasoningSummaryTextDoneEvent object { item_id, output_index, sequence_number, 3 more }` - - `type: "inline"` + Emitted when a reasoning summary text is completed. - Defines an inline skill for this request. + - `item_id: string` - - `"inline"` + The ID of the item this summary text is associated with. - - `LocalEnvironment = object { type, skills }` + - `output_index: number` - - `type: "local"` + The index of the output item this summary text is associated with. - Use a local computer environment. + - `sequence_number: number` - - `"local"` + The sequence number of this event. - - `skills: optional array of LocalSkill` + - `summary_index: number` - An optional list of skills. + The index of the summary part within the reasoning summary. - - `description: string` + - `text: string` - The description of the skill. + The full text of the completed reasoning summary. - - `name: string` + - `type: "response.reasoning_summary_text.done"` - The name of the skill. + The type of the event. Always `response.reasoning_summary_text.done`. - - `path: string` + - `"response.reasoning_summary_text.done"` - The path to the directory containing the skill. + - `ResponseReasoningTextDeltaEvent object { content_index, delta, item_id, 3 more }` - - `ContainerReference = object { container_id, type }` + Emitted when a delta is added to a reasoning text. - - `container_id: string` + - `content_index: number` - The ID of the referenced container. + The index of the reasoning content part this delta is associated with. - - `type: "container_reference"` + - `delta: string` - References a container created with the /v1/containers endpoint + The text delta that was added to the reasoning content. - - `"container_reference"` + - `item_id: string` - - `Custom = object { name, type, defer_loading, 2 more }` + The ID of the item this reasoning text delta is associated with. - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + - `output_index: number` - - `name: string` + The index of the output item this reasoning text delta is associated with. - The name of the custom tool, used to identify it in tool calls. + - `sequence_number: number` - - `type: "custom"` + The sequence number of this event. - The type of the custom tool. Always `custom`. + - `type: "response.reasoning_text.delta"` - - `"custom"` + The type of the event. Always `response.reasoning_text.delta`. - - `defer_loading: optional boolean` + - `"response.reasoning_text.delta"` - Whether this tool should be deferred and discovered via tool search. + - `ResponseReasoningTextDoneEvent object { content_index, item_id, output_index, 3 more }` - - `description: optional string` + Emitted when a reasoning text is completed. - Optional description of the custom tool, used to provide more context. + - `content_index: number` - - `format: optional CustomToolInputFormat` + The index of the reasoning content part. - The input format for the custom tool. Default is unconstrained text. + - `item_id: string` - - `Text = object { type }` + The ID of the item this reasoning text is associated with. - Unconstrained free-form text. + - `output_index: number` - - `type: "text"` + The index of the output item this reasoning text is associated with. - Unconstrained text format. Always `text`. + - `sequence_number: number` - - `"text"` + The sequence number of this event. - - `Grammar = object { definition, syntax, type }` + - `text: string` - A grammar defined by the user. + The full text of the completed reasoning content. - - `definition: string` + - `type: "response.reasoning_text.done"` - The grammar definition. + The type of the event. Always `response.reasoning_text.done`. - - `syntax: "lark" or "regex"` + - `"response.reasoning_text.done"` - The syntax of the grammar definition. One of `lark` or `regex`. + - `ResponseRefusalDeltaEvent object { content_index, delta, item_id, 3 more }` - - `"lark"` + Emitted when there is a partial refusal text. - - `"regex"` + - `content_index: number` - - `type: "grammar"` + The index of the content part that the refusal text is added to. - Grammar format. Always `grammar`. + - `delta: string` - - `"grammar"` + The refusal text that is added. - - `Namespace = object { description, name, tools, type }` + - `item_id: string` - Groups function/custom tools under a shared namespace. + The ID of the output item that the refusal text is added to. - - `description: string` + - `output_index: number` - A description of the namespace shown to the model. + The index of the output item that the refusal text is added to. - - `name: string` + - `sequence_number: number` - The namespace name used in tool calls (for example, `crm`). + The sequence number of this event. - - `tools: array of object { name, type, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` + - `type: "response.refusal.delta"` - The function/custom tools available inside this namespace. + The type of the event. Always `response.refusal.delta`. - - `Function = object { name, type, defer_loading, 3 more }` + - `"response.refusal.delta"` - - `name: string` + - `ResponseRefusalDoneEvent object { content_index, item_id, output_index, 3 more }` - - `type: "function"` + Emitted when refusal text is finalized. - - `"function"` + - `content_index: number` - - `defer_loading: optional boolean` + The index of the content part that the refusal text is finalized. - Whether this function should be deferred and discovered via tool search. + - `item_id: string` - - `description: optional string` + The ID of the output item that the refusal text is finalized. - - `parameters: optional unknown` + - `output_index: number` - - `strict: optional boolean` + The index of the output item that the refusal text is finalized. - - `Custom = object { name, type, defer_loading, 2 more }` + - `refusal: string` - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + The refusal text that is finalized. - - `name: string` + - `sequence_number: number` - The name of the custom tool, used to identify it in tool calls. + The sequence number of this event. - - `type: "custom"` + - `type: "response.refusal.done"` - The type of the custom tool. Always `custom`. + The type of the event. Always `response.refusal.done`. - - `"custom"` + - `"response.refusal.done"` - - `defer_loading: optional boolean` + - `ResponseTextDeltaEvent object { content_index, delta, item_id, 4 more }` - Whether this tool should be deferred and discovered via tool search. + Emitted when there is an additional text delta. - - `description: optional string` + - `content_index: number` - Optional description of the custom tool, used to provide more context. + The index of the content part that the text delta was added to. - - `format: optional CustomToolInputFormat` + - `delta: string` - The input format for the custom tool. Default is unconstrained text. + The text delta that was added. - - `Text = object { type }` + - `item_id: string` - Unconstrained free-form text. + The ID of the output item that the text delta was added to. - - `type: "text"` + - `logprobs: array of object { token, logprob, top_logprobs }` - Unconstrained text format. Always `text`. + The log probabilities of the tokens in the delta. - - `"text"` + - `token: string` - - `Grammar = object { definition, syntax, type }` + A possible text token. - A grammar defined by the user. + - `logprob: number` - - `definition: string` + The log probability of this token. - The grammar definition. + - `top_logprobs: optional array of object { token, logprob }` - - `syntax: "lark" or "regex"` + The log probability of the top 20 most likely tokens. - The syntax of the grammar definition. One of `lark` or `regex`. + - `token: optional string` - - `"lark"` + A possible text token. - - `"regex"` + - `logprob: optional number` - - `type: "grammar"` + The log probability of this token. - Grammar format. Always `grammar`. + - `output_index: number` - - `"grammar"` + The index of the output item that the text delta was added to. - - `type: "namespace"` + - `sequence_number: number` - The type of the tool. Always `namespace`. + The sequence number for this event. - - `"namespace"` + - `type: "response.output_text.delta"` - - `ToolSearch = object { type, description, execution, parameters }` + The type of the event. Always `response.output_text.delta`. - Hosted or BYOT tool search configuration for deferred tools. + - `"response.output_text.delta"` - - `type: "tool_search"` + - `ResponseTextDoneEvent object { content_index, item_id, logprobs, 4 more }` - The type of the tool. Always `tool_search`. + Emitted when text content is finalized. - - `"tool_search"` + - `content_index: number` - - `description: optional string` + The index of the content part that the text content is finalized. - Description shown to the model for a client-executed tool search tool. + - `item_id: string` - - `execution: optional "server" or "client"` + The ID of the output item that the text content is finalized. - Whether tool search is executed by the server or by the client. + - `logprobs: array of object { token, logprob, top_logprobs }` - - `"server"` + The log probabilities of the tokens in the delta. - - `"client"` + - `token: string` - - `parameters: optional unknown` + A possible text token. - Parameter schema for a client-executed tool search tool. + - `logprob: number` - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + The log probability of this token. - 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). + - `top_logprobs: optional array of object { token, logprob }` - - `type: "web_search_preview" or "web_search_preview_2025_03_11"` + The log probability of the top 20 most likely tokens. - The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. + - `token: optional string` - - `"web_search_preview"` + A possible text token. - - `"web_search_preview_2025_03_11"` + - `logprob: optional number` - - `search_content_types: optional array of "text" or "image"` + The log probability of this token. - - `"text"` + - `output_index: number` - - `"image"` + The index of the output item that the text content is finalized. - - `search_context_size: optional "low" or "medium" or "high"` + - `sequence_number: number` - High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + The sequence number for this event. - - `"low"` + - `text: string` - - `"medium"` + The text content that is finalized. - - `"high"` + - `type: "response.output_text.done"` - - `user_location: optional object { type, city, country, 2 more }` + The type of the event. Always `response.output_text.done`. - The user's location. + - `"response.output_text.done"` - - `type: "approximate"` + - `ResponseWebSearchCallCompletedEvent object { item_id, output_index, sequence_number, type }` - The type of location approximation. Always `approximate`. + Emitted when a web search call is completed. - - `"approximate"` + - `item_id: string` - - `city: optional string` + Unique ID for the output item associated with the web search call. - Free text input for the city of the user, e.g. `San Francisco`. + - `output_index: number` - - `country: optional string` + The index of the output item that the web search call is associated with. - The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + - `sequence_number: number` - - `region: optional string` + The sequence number of the web search call being processed. - Free text input for the region of the user, e.g. `California`. + - `type: "response.web_search_call.completed"` - - `timezone: optional string` + The type of the event. Always `response.web_search_call.completed`. - The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + - `"response.web_search_call.completed"` - - `ApplyPatch = object { type }` + - `ResponseWebSearchCallInProgressEvent object { item_id, output_index, sequence_number, type }` - Allows the assistant to create, delete, or update files using unified diffs. + Emitted when a web search call is initiated. - - `type: "apply_patch"` + - `item_id: string` - The type of the tool. Always `apply_patch`. + Unique ID for the output item associated with the web search call. - - `"apply_patch"` + - `output_index: number` - - `top_p: number` + The index of the output item that the web search call is associated with. - 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. + - `sequence_number: number` - We generally recommend altering this or `temperature` but not both. + The sequence number of the web search call being processed. - - `background: optional boolean` + - `type: "response.web_search_call.in_progress"` - Whether to run the model response in the background. - [Learn more](/docs/guides/background). + The type of the event. Always `response.web_search_call.in_progress`. - - `completed_at: optional number` + - `"response.web_search_call.in_progress"` - Unix timestamp (in seconds) of when this Response was completed. - Only present when the status is `completed`. + - `ResponseWebSearchCallSearchingEvent object { item_id, output_index, sequence_number, type }` - - `conversation: optional object { id }` + Emitted when a web search call is executing. - The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. + - `item_id: string` - - `id: string` + Unique ID for the output item associated with the web search call. - The unique ID of the conversation that this response was associated with. + - `output_index: number` - - `max_output_tokens: optional number` + The index of the output item that the web search call is associated with. - 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). + - `sequence_number: number` - - `max_tool_calls: optional number` + The sequence number of the web search call being processed. - 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. + - `type: "response.web_search_call.searching"` - - `output_text: optional string` + The type of the event. Always `response.web_search_call.searching`. - 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. + - `"response.web_search_call.searching"` - - `previous_response_id: optional string` + - `ResponseImageGenCallCompletedEvent object { item_id, output_index, sequence_number, type }` - 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`. + Emitted when an image generation tool call has completed and the final image is available. - - `prompt: optional ResponsePrompt` + - `item_id: string` - Reference to a prompt template and its variables. - [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). + The unique identifier of the image generation item being processed. - - `id: string` + - `output_index: number` - The unique identifier of the prompt template to use. + The index of the output item in the response's output array. - - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile]` + - `sequence_number: number` - 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. + The sequence number of this event. - - `string` + - `type: "response.image_generation_call.completed"` - - `ResponseInputText = object { text, type }` + The type of the event. Always 'response.image_generation_call.completed'. - A text input to the model. + - `"response.image_generation_call.completed"` - - `text: string` + - `ResponseImageGenCallGeneratingEvent object { item_id, output_index, sequence_number, type }` - The text input to the model. + Emitted when an image generation tool call is actively generating an image (intermediate state). - - `type: "input_text"` + - `item_id: string` - The type of the input item. Always `input_text`. + The unique identifier of the image generation item being processed. - - `"input_text"` + - `output_index: number` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + The index of the output item in the response's output array. - An image input to the model. Learn about [image inputs](/docs/guides/vision). + - `sequence_number: number` - - `detail: "low" or "high" or "auto" or "original"` + The sequence number of the image generation item being processed. - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + - `type: "response.image_generation_call.generating"` - - `"low"` + The type of the event. Always 'response.image_generation_call.generating'. - - `"high"` + - `"response.image_generation_call.generating"` - - `"auto"` + - `ResponseImageGenCallInProgressEvent object { item_id, output_index, sequence_number, type }` - - `"original"` + Emitted when an image generation tool call is in progress. - - `type: "input_image"` + - `item_id: string` - The type of the input item. Always `input_image`. + The unique identifier of the image generation item being processed. - - `"input_image"` + - `output_index: number` - - `file_id: optional string` + The index of the output item in the response's output array. - The ID of the file to be sent to the model. + - `sequence_number: number` - - `image_url: optional string` + The sequence number of the image generation item being processed. - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `type: "response.image_generation_call.in_progress"` - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + The type of the event. Always 'response.image_generation_call.in_progress'. - A file input to the model. + - `"response.image_generation_call.in_progress"` - - `type: "input_file"` + - `ResponseImageGenCallPartialImageEvent object { item_id, output_index, partial_image_b64, 3 more }` - The type of the input item. Always `input_file`. + Emitted when a partial image is available during image generation streaming. - - `"input_file"` + - `item_id: string` - - `detail: optional "low" or "high"` + The unique identifier of the image generation item being processed. - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + - `output_index: number` - - `"low"` + The index of the output item in the response's output array. - - `"high"` + - `partial_image_b64: string` - - `file_data: optional string` + Base64-encoded partial image data, suitable for rendering as an image. - The content of the file to be sent to the model. + - `partial_image_index: number` - - `file_id: optional string` + 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). - The ID of the file to be sent to the model. + - `sequence_number: number` - - `file_url: optional string` + The sequence number of the image generation item being processed. - The URL of the file to be sent to the model. + - `type: "response.image_generation_call.partial_image"` - - `filename: optional string` + The type of the event. Always 'response.image_generation_call.partial_image'. - The name of the file to be sent to the model. + - `"response.image_generation_call.partial_image"` - - `version: optional string` + - `ResponseMcpCallArgumentsDeltaEvent object { delta, item_id, output_index, 2 more }` - Optional version of the prompt template. + Emitted when there is a delta (partial update) to the arguments of an MCP tool call. - - `prompt_cache_key: optional string` + - `delta: string` - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching). + A JSON string containing the partial update to the arguments for the MCP tool call. - - `prompt_cache_retention: optional "in-memory" or "24h"` + - `item_id: string` - 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). + The unique identifier of the MCP tool call item being processed. - - `"in-memory"` + - `output_index: number` - - `"24h"` + The index of the output item in the response's output array. - - `reasoning: optional Reasoning` + - `sequence_number: number` - **gpt-5 and o-series models only** + The sequence number of this event. - Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + - `type: "response.mcp_call_arguments.delta"` - - `effort: optional ReasoningEffort` + The type of the event. Always 'response.mcp_call_arguments.delta'. - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. + - `"response.mcp_call_arguments.delta"` - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + - `ResponseMcpCallArgumentsDoneEvent object { arguments, item_id, output_index, 2 more }` - - `"none"` + Emitted when the arguments for an MCP tool call are finalized. - - `"minimal"` + - `arguments: string` - - `"low"` + A JSON string containing the finalized arguments for the MCP tool call. - - `"medium"` + - `item_id: string` - - `"high"` + The unique identifier of the MCP tool call item being processed. - - `"xhigh"` + - `output_index: number` - - `generate_summary: optional "auto" or "concise" or "detailed"` + The index of the output item in the response's output array. - **Deprecated:** use `summary` instead. + - `sequence_number: number` - 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 sequence number of this event. - - `"auto"` + - `type: "response.mcp_call_arguments.done"` - - `"concise"` + The type of the event. Always 'response.mcp_call_arguments.done'. - - `"detailed"` + - `"response.mcp_call_arguments.done"` - - `summary: optional "auto" or "concise" or "detailed"` + - `ResponseMcpCallCompletedEvent object { item_id, output_index, sequence_number, type }` - 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`. + Emitted when an MCP tool call has completed successfully. - `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. + - `item_id: string` - - `"auto"` + The ID of the MCP tool call item that completed. - - `"concise"` + - `output_index: number` - - `"detailed"` + The index of the output item that completed. - - `safety_identifier: optional string` + - `sequence_number: number` - 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). + The sequence number of this event. - - `service_tier: optional "auto" or "default" or "flex" or 2 more` + - `type: "response.mcp_call.completed"` - Specifies the processing type used for serving the request. + The type of the event. Always 'response.mcp_call.completed'. - - 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'. + - `"response.mcp_call.completed"` - 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. + - `ResponseMcpCallFailedEvent object { item_id, output_index, sequence_number, type }` - - `"auto"` + Emitted when an MCP tool call has failed. - - `"default"` + - `item_id: string` - - `"flex"` + The ID of the MCP tool call item that failed. - - `"scale"` + - `output_index: number` - - `"priority"` + The index of the output item that failed. - - `status: optional ResponseStatus` + - `sequence_number: number` - The status of the response generation. One of `completed`, `failed`, - `in_progress`, `cancelled`, `queued`, or `incomplete`. + The sequence number of this event. - - `"completed"` + - `type: "response.mcp_call.failed"` - - `"failed"` + The type of the event. Always 'response.mcp_call.failed'. - - `"in_progress"` + - `"response.mcp_call.failed"` - - `"cancelled"` + - `ResponseMcpCallInProgressEvent object { item_id, output_index, sequence_number, type }` - - `"queued"` + Emitted when an MCP tool call is in progress. - - `"incomplete"` + - `item_id: string` - - `text: optional ResponseTextConfig` + The unique identifier of the MCP tool call item being processed. - Configuration options for a text response from the model. Can be plain - text or structured JSON data. Learn more: + - `output_index: number` - - [Text inputs and outputs](/docs/guides/text) - - [Structured Outputs](/docs/guides/structured-outputs) + The index of the output item in the response's output array. - - `format: optional ResponseFormatTextConfig` + - `sequence_number: number` - An object specifying the format that the model must output. + The sequence number of this event. - 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). + - `type: "response.mcp_call.in_progress"` - The default format is `{ "type": "text" }` with no additional options. + The type of the event. Always 'response.mcp_call.in_progress'. - **Not recommended for gpt-4o and newer models:** + - `"response.mcp_call.in_progress"` - 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. + - `ResponseMcpListToolsCompletedEvent object { item_id, output_index, sequence_number, type }` - - `ResponseFormatText = object { type }` + Emitted when the list of available MCP tools has been successfully retrieved. - Default response format. Used to generate text responses. + - `item_id: string` - - `type: "text"` + The ID of the MCP tool call item that produced this output. - The type of response format being defined. Always `text`. + - `output_index: number` - - `"text"` + The index of the output item that was processed. - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `sequence_number: number` - JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](/docs/guides/structured-outputs). + The sequence number of this event. - - `name: string` + - `type: "response.mcp_list_tools.completed"` - 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 type of the event. Always 'response.mcp_list_tools.completed'. - - `schema: map[unknown]` + - `"response.mcp_list_tools.completed"` - The schema for the response format, described as a JSON Schema object. - Learn how to build JSON schemas [here](https://json-schema.org/). + - `ResponseMcpListToolsFailedEvent object { item_id, output_index, sequence_number, type }` - - `type: "json_schema"` + Emitted when the attempt to list available MCP tools has failed. - The type of response format being defined. Always `json_schema`. + - `item_id: string` - - `"json_schema"` + The ID of the MCP tool call item that failed. - - `description: optional string` + - `output_index: number` - A description of what the response format is for, used by the model to - determine how to respond in the format. + The index of the output item that failed. - - `strict: optional boolean` + - `sequence_number: number` - 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). + The sequence number of this event. - - `ResponseFormatJSONObject = object { type }` + - `type: "response.mcp_list_tools.failed"` - JSON object response format. An older method of generating JSON responses. - Using `json_schema` is recommended for models that support it. Note that the - model will not generate JSON without a system or user message instructing it - to do so. + The type of the event. Always 'response.mcp_list_tools.failed'. - - `type: "json_object"` + - `"response.mcp_list_tools.failed"` - The type of response format being defined. Always `json_object`. + - `ResponseMcpListToolsInProgressEvent object { item_id, output_index, sequence_number, type }` - - `"json_object"` + Emitted when the system is in the process of retrieving the list of available MCP tools. - - `verbosity: optional "low" or "medium" or "high"` + - `item_id: string` - 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 ID of the MCP tool call item that is being processed. - - `"low"` + - `output_index: number` - - `"medium"` + The index of the output item that is being processed. - - `"high"` + - `sequence_number: number` - - `top_logprobs: optional number` + The sequence number of this event. - An integer between 0 and 20 specifying the number of most likely tokens to - return at each token position, each with an associated log probability. + - `type: "response.mcp_list_tools.in_progress"` - - `truncation: optional "auto" or "disabled"` + The type of the event. Always 'response.mcp_list_tools.in_progress'. - The truncation strategy to use for the model response. + - `"response.mcp_list_tools.in_progress"` - - `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. + - `ResponseOutputTextAnnotationAddedEvent object { annotation, annotation_index, content_index, 4 more }` - - `"auto"` + Emitted when an annotation is added to output text content. - - `"disabled"` + - `annotation: unknown` - - `usage: optional ResponseUsage` + The annotation object being added. (See annotation schema for details.) - Represents token usage details including input tokens, output tokens, - a breakdown of output tokens, and the total tokens used. + - `annotation_index: number` - - `input_tokens: number` + The index of the annotation within the content part. - The number of input tokens. + - `content_index: number` - - `input_tokens_details: object { cached_tokens }` + The index of the content part within the output item. - A detailed breakdown of the input tokens. + - `item_id: string` - - `cached_tokens: number` + The unique identifier of the item to which the annotation is being added. - The number of tokens that were retrieved from the cache. - [More on prompt caching](/docs/guides/prompt-caching). + - `output_index: number` - - `output_tokens: number` + The index of the output item in the response's output array. - The number of output tokens. + - `sequence_number: number` - - `output_tokens_details: object { reasoning_tokens }` + The sequence number of this event. - A detailed breakdown of the output tokens. + - `type: "response.output_text.annotation.added"` - - `reasoning_tokens: number` + The type of the event. Always 'response.output_text.annotation.added'. - The number of reasoning tokens. + - `"response.output_text.annotation.added"` - - `total_tokens: number` + - `ResponseQueuedEvent object { response, sequence_number, type }` - The total number of tokens used. + Emitted when a response is queued and waiting to be processed. - - `user: optional string` + - `response: 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](/docs/guides/safety-best-practices#safety-identifiers). + The full response object that is queued. - `sequence_number: number` @@ -232140,7 +109732,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.queued"` - - `ResponseCustomToolCallInputDeltaEvent = object { delta, item_id, output_index, 2 more }` + - `ResponseCustomToolCallInputDeltaEvent object { delta, item_id, output_index, 2 more }` Event representing a delta (partial update) to the input of a custom tool call. @@ -232166,7 +109758,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ - `"response.custom_tool_call_input.delta"` - - `ResponseCustomToolCallInputDoneEvent = object { input, item_id, output_index, 2 more }` + - `ResponseCustomToolCallInputDoneEvent object { input, item_id, output_index, 2 more }` Event indicating that input for a custom tool call is complete. @@ -232194,7 +109786,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Skill Reference -- `SkillReference = object { skill_id, type, version }` +- `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -232212,7 +109804,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Allowed -- `ToolChoiceAllowed = object { mode, tools, type }` +- `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -232251,7 +109843,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Apply Patch -- `ToolChoiceApplyPatch = object { type }` +- `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -232263,7 +109855,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Custom -- `ToolChoiceCustom = object { name, type }` +- `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -232279,7 +109871,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Function -- `ToolChoiceFunction = object { name, type }` +- `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -232295,7 +109887,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Mcp -- `ToolChoiceMcp = object { server_label, type, name }` +- `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -232334,7 +109926,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Shell -- `ToolChoiceShell = object { type }` +- `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -232346,7 +109938,7 @@ curl -X POST https://api.openai.com/v1/responses/compact \ ### Tool Choice Types -- `ToolChoiceTypes = object { type }` +- `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -232439,7 +110031,7 @@ Returns a list of input items for a given response. ### Returns -- `ResponseItemList = object { data, first_id, has_more, 2 more }` +- `ResponseItemList object { data, first_id, has_more, 2 more }` A list of Response items. @@ -232447,7 +110039,7 @@ Returns a list of input items for a given response. A list of items used to generate this response. - - `ResponseInputMessageItem = object { id, content, role, 2 more }` + - `ResponseInputMessageItem object { id, content, role, 2 more }` - `id: string` @@ -232458,7 +110050,7 @@ Returns a list of input items for a given response. A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -232472,7 +110064,7 @@ Returns a list of input items for a given response. - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -232502,7 +110094,7 @@ Returns a list of input items for a given response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -232563,7 +110155,7 @@ Returns a list of input items for a given response. - `"incomplete"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -232575,7 +110167,7 @@ Returns a list of input items for a given response. The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -232583,7 +110175,7 @@ Returns a list of input items for a given response. The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -232605,7 +110197,7 @@ Returns a list of input items for a given response. - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -232631,7 +110223,7 @@ Returns a list of input items for a given response. The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -232661,7 +110253,7 @@ Returns a list of input items for a given response. - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -232705,7 +110297,7 @@ Returns a list of input items for a given response. - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -232752,7 +110344,7 @@ Returns a list of input items for a given response. - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -232820,7 +110412,7 @@ Returns a list of input items for a given response. The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -232870,203 +110462,7 @@ Returns a list of input items for a given response. 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 }` + - `Click object { button, type, x, 2 more }` A click action. @@ -233102,7 +110498,7 @@ Returns a list of input items for a given response. The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -233124,7 +110520,7 @@ Returns a list of input items for a given response. The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -233157,7 +110553,7 @@ Returns a list of input items for a given response. The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -233171,7 +110567,7 @@ Returns a list of input items for a given response. - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -233193,7 +110589,7 @@ Returns a list of input items for a given response. The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -233203,7 +110599,7 @@ Returns a list of input items for a given response. - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -233233,7 +110629,7 @@ Returns a list of input items for a given response. The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -233247,7 +110643,7 @@ Returns a list of input items for a given response. - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -233257,7 +110653,48 @@ Returns a list of input items for a given response. - `"wait"` - - `ComputerCallOutput = object { id, call_id, output, 4 more }` + - `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` @@ -233326,7 +110763,7 @@ Returns a list of input items for a given response. The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -233340,7 +110777,7 @@ Returns a list of input items for a given response. 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -233372,7 +110809,7 @@ Returns a list of input items for a given response. The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -233386,7 +110823,7 @@ Returns a list of input items for a given response. The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -233422,7 +110859,7 @@ Returns a list of input items for a given response. - `"web_search_call"` - - `FunctionCall = object { id, arguments, call_id, 5 more }` + - `FunctionCall object { id, arguments, call_id, 5 more }` - `id: string` @@ -233465,7 +110902,7 @@ Returns a list of input items for a given response. The namespace of the function to run. - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -233488,84 +110925,18 @@ Returns a list of input items for a given response. Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -233587,7 +110958,7 @@ Returns a list of input items for a given response. The identifier of the actor that created the item. - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -233629,7 +111000,7 @@ Returns a list of input items for a given response. The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -233661,7 +111032,7 @@ Returns a list of input items for a given response. The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -233691,7 +111062,7 @@ Returns a list of input items for a given response. A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -233709,7 +111080,7 @@ Returns a list of input items for a given response. A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -233762,7 +111133,7 @@ Returns a list of input items for a given response. - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -233770,59 +111141,10 @@ Returns a list of input items for a given response. Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -233865,7 +111187,7 @@ Returns a list of input items for a given response. 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 }` + - `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). @@ -233875,7 +111197,7 @@ Returns a list of input items for a given response. - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -233907,7 +111229,7 @@ Returns a list of input items for a given response. - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -233967,7 +111289,7 @@ Returns a list of input items for a given response. - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -233990,7 +111312,7 @@ Returns a list of input items for a given response. A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -234056,7 +111378,7 @@ Returns a list of input items for a given response. Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -234109,7 +111431,7 @@ Returns a list of input items for a given response. The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -234123,7 +111445,7 @@ Returns a list of input items for a given response. The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -234153,7 +111475,7 @@ Returns a list of input items for a given response. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -234161,7 +111483,7 @@ Returns a list of input items for a given response. - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -234195,7 +111517,7 @@ Returns a list of input items for a given response. - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -234316,7 +111638,7 @@ Returns a list of input items for a given response. - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -234326,7 +111648,7 @@ Returns a list of input items for a given response. - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -234338,7 +111660,7 @@ Returns a list of input items for a given response. - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference` - - `ContainerAuto = object { type, file_ids, memory_limit, 2 more }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - `type: "container_auto"` @@ -234366,47 +111688,15 @@ Returns a list of input items for a given response. Network access policy for the container. - - `ContainerNetworkPolicyDisabled = object { type }` - - - `type: "disabled"` - - Disable outbound network access. Always `disabled`. - - - `"disabled"` + - `ContainerNetworkPolicyDisabled object { type }` - - `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. + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -234422,7 +111712,7 @@ Returns a list of input items for a given response. Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -234458,7 +111748,7 @@ Returns a list of input items for a given response. - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -234482,7 +111772,7 @@ Returns a list of input items for a given response. The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -234494,99 +111784,7 @@ Returns a list of input items for a given response. - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` - - A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) - - - `name: string` - - The name of the custom tool, used to identify it in tool calls. - - - `type: "custom"` - - The type of the custom tool. Always `custom`. - - - `"custom"` - - - `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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` - - The function/custom tools available inside this namespace. - - - `Function = object { name, type, defer_loading, 3 more }` - - - `name: string` - - - `type: "function"` - - - `"function"` - - - `defer_loading: optional boolean` - - Whether this function should be deferred and discovered via tool search. - - - `description: optional string` - - - `parameters: optional unknown` - - - `strict: optional boolean` - - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -234612,7 +111810,7 @@ Returns a list of input items for a given response. The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -234622,7 +111820,7 @@ Returns a list of input items for a given response. - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -234644,13 +111842,73 @@ Returns a list of input items for a given response. - `"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, defer_loading, 3 more } or object { name, type, defer_loading, 2 more }` + + The function/custom tools available inside this namespace. + + - `Function object { name, type, defer_loading, 3 more }` + + - `name: string` + + - `type: "function"` + + - `"function"` + + - `defer_loading: optional boolean` + + Whether this function should be deferred and discovered via tool search. + + - `description: optional string` + + - `parameters: optional unknown` + + - `strict: optional boolean` + + - `Custom object { name, type, defer_loading, 2 more }` + + A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + + - `name: string` + + The name of the custom tool, used to identify it in tool calls. + + - `type: "custom"` + + The type of the custom tool. Always `custom`. + + - `"custom"` + + - `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 }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -234676,7 +111934,7 @@ Returns a list of input items for a given response. Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -234730,7 +111988,7 @@ Returns a list of input items for a given response. The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -234750,7 +112008,7 @@ Returns a list of input items for a given response. The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -234811,7 +112069,7 @@ Returns a list of input items for a given response. - `"incomplete"` - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -234833,7 +112091,7 @@ Returns a list of input items for a given response. The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -234863,7 +112121,7 @@ Returns a list of input items for a given response. - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -234884,7 +112142,7 @@ Returns a list of input items for a given response. The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -234898,7 +112156,7 @@ Returns a list of input items for a given response. - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -234932,7 +112190,7 @@ Returns a list of input items for a given response. - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -234990,7 +112248,7 @@ Returns a list of input items for a given response. - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -235018,7 +112276,7 @@ Returns a list of input items for a given response. - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -235048,7 +112306,7 @@ Returns a list of input items for a given response. Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -235058,7 +112316,7 @@ Returns a list of input items for a given response. - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -235090,7 +112348,7 @@ Returns a list of input items for a given response. The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -235114,7 +112372,7 @@ Returns a list of input items for a given response. Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -235124,7 +112382,7 @@ Returns a list of input items for a given response. - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -235170,7 +112428,7 @@ Returns a list of input items for a given response. The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -235186,7 +112444,7 @@ Returns a list of input items for a given response. One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -235204,7 +112462,7 @@ Returns a list of input items for a given response. - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -235218,7 +112476,7 @@ Returns a list of input items for a given response. - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -235254,7 +112512,7 @@ Returns a list of input items for a given response. The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -235288,7 +112546,7 @@ Returns a list of input items for a given response. Optional textual output returned by the apply patch tool. - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -235330,7 +112588,7 @@ Returns a list of input items for a given response. Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -235356,7 +112614,7 @@ Returns a list of input items for a given response. - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -235382,7 +112640,7 @@ Returns a list of input items for a given response. Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -235435,7 +112693,7 @@ Returns a list of input items for a given response. - `"failed"` - - `CustomToolCall = object { id, call_id, input, 5 more }` + - `CustomToolCall object { id, call_id, input, 5 more }` - `id: string` @@ -235478,7 +112736,7 @@ Returns a list of input items for a given response. The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -235501,84 +112759,18 @@ Returns a list of input items for a given response. Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -235686,7 +112878,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ ### Response Item List -- `ResponseItemList = object { data, first_id, has_more, 2 more }` +- `ResponseItemList object { data, first_id, has_more, 2 more }` A list of Response items. @@ -235694,7 +112886,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A list of items used to generate this response. - - `ResponseInputMessageItem = object { id, content, role, 2 more }` + - `ResponseInputMessageItem object { id, content, role, 2 more }` - `id: string` @@ -235705,7 +112897,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -235719,7 +112911,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -235749,7 +112941,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -235810,7 +113002,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"incomplete"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -235822,7 +113014,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -235830,7 +113022,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -235852,7 +113044,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -235878,7 +113070,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -235908,7 +113100,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -235952,7 +113144,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -235999,7 +113191,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -236067,7 +113259,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -236117,7 +113309,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A click action. - - `Click = object { button, type, x, 2 more }` + - `Click object { button, type, x, 2 more }` A click action. @@ -236153,7 +113345,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -236175,7 +113367,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -236208,7 +113400,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -236222,7 +113414,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -236244,7 +113436,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -236254,7 +113446,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -236284,7 +113476,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -236298,7 +113490,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -236313,198 +113505,43 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. - - `Click = object { button, type, x, 2 more }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `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 }` + - `ComputerCallOutput object { id, call_id, output, 4 more }` - `id: string` @@ -236573,7 +113610,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The identifier of the actor that created the item. - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -236587,7 +113624,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -236619,7 +113656,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -236633,7 +113670,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -236669,7 +113706,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"web_search_call"` - - `FunctionCall = object { id, arguments, call_id, 5 more }` + - `FunctionCall object { id, arguments, call_id, 5 more }` - `id: string` @@ -236712,7 +113749,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The namespace of the function to run. - - `FunctionCallOutput = object { id, call_id, output, 3 more }` + - `FunctionCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -236735,84 +113772,18 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Text, image, or file output of the function call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -236834,7 +113805,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The identifier of the actor that created the item. - - `ToolSearchCall = object { id, arguments, call_id, 4 more }` + - `ToolSearchCall object { id, arguments, call_id, 4 more }` - `id: string` @@ -236876,7 +113847,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The identifier of the actor that created the item. - - `ToolSearchOutput = object { id, call_id, execution, 4 more }` + - `ToolSearchOutput object { id, call_id, execution, 4 more }` - `id: string` @@ -236908,7 +113879,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The loaded tool definitions returned by tool search. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -236938,7 +113909,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -236956,7 +113927,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -237009,7 +113980,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -237017,59 +113988,10 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -237112,7 +114034,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ 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 }` + - `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). @@ -237122,7 +114044,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -237154,7 +114076,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -237214,7 +114136,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -237237,7 +114159,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -237303,7 +114225,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -237356,7 +114278,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -237370,7 +114292,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -237400,220 +114322,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -237621,7 +114330,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -237649,11 +114358,192 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The secret value to inject for the domain. + - `type: "code_interpreter"` + + The type of the code interpreter tool. Always `code_interpreter`. + + - `"code_interpreter"` + + - `ImageGeneration object { type, action, background, 9 more }` + + A tool that generates images using the GPT image models. + + - `type: "image_generation"` + + The type of the image generation tool. Always `image_generation`. + + - `"image_generation"` + + - `action: optional "generate" or "edit" or "auto"` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `"generate"` + + - `"edit"` + + - `"auto"` + + - `background: optional "transparent" or "opaque" or "auto"` + + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. + + - `"transparent"` + + - `"opaque"` + + - `"auto"` + + - `input_fidelity: optional "high" or "low"` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `"high"` + + - `"low"` + + - `input_image_mask: optional object { file_id, image_url }` + + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). + + - `file_id: optional string` + + File ID for the mask image. + + - `image_url: optional string` + + Base64-encoded mask image. + + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `string` + + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `"gpt-image-1"` + + - `"gpt-image-1-mini"` + + - `"gpt-image-1.5"` + + - `moderation: optional "auto" or "low"` + + Moderation level for the generated image. Default: `auto`. + + - `"auto"` + + - `"low"` + + - `output_compression: optional number` + + Compression level for the output image. Default: 100. + + - `output_format: optional "png" or "webp" or "jpeg"` + + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. + + - `"png"` + + - `"webp"` + + - `"jpeg"` + + - `partial_images: optional number` + + Number of partial images to generate in streaming mode, from 0 (default value) to 3. + + - `quality: optional "low" or "medium" or "high" or "auto"` + + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"auto"` + + - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated image. One of `1024x1024`, `1024x1536`, + `1536x1024`, or `auto`. Default: `auto`. + + - `"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, environment }` + + A tool that allows the model to execute shell commands. + + - `type: "shell"` + + The type of the shell tool. Always `shell`. + + - `"shell"` + + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -237669,7 +114559,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -237705,7 +114595,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -237729,7 +114619,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -237741,7 +114631,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -237767,7 +114657,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -237777,7 +114667,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -237799,7 +114689,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -237815,7 +114705,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -237833,7 +114723,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -237859,45 +114749,13 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -237923,7 +114781,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -237977,7 +114835,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -237997,7 +114855,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The identifier of the actor that created the item. - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -238058,7 +114916,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"incomplete"` - - `Compaction = object { id, encrypted_content, type, created_by }` + - `Compaction object { id, encrypted_content, type, created_by }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -238080,7 +114938,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The identifier of the actor that created the item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -238110,7 +114968,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -238131,7 +114989,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -238145,7 +115003,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -238179,7 +115037,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -238237,7 +115095,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -238265,7 +115123,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"incomplete"` - - `ShellCall = object { id, action, call_id, 4 more }` + - `ShellCall object { id, action, call_id, 4 more }` A tool call that executes one or more shell commands in a managed environment. @@ -238295,7 +115153,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Represents the use of a local environment to perform shell actions. - - `ResponseLocalEnvironment = object { type }` + - `ResponseLocalEnvironment object { type }` Represents the use of a local environment to perform shell actions. @@ -238305,7 +115163,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"local"` - - `ResponseContainerReference = object { container_id, type }` + - `ResponseContainerReference object { container_id, type }` Represents a container created with /v1/containers. @@ -238337,7 +115195,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The ID of the entity that created this tool call. - - `ShellCallOutput = object { id, call_id, max_output_length, 4 more }` + - `ShellCallOutput object { id, call_id, max_output_length, 4 more }` The output of a shell tool call that was emitted. @@ -238361,7 +115219,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -238371,7 +115229,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -238417,7 +115275,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The identifier of the actor that created the item. - - `ApplyPatchCall = object { id, call_id, operation, 3 more }` + - `ApplyPatchCall object { id, call_id, operation, 3 more }` A tool call that applies file diffs by creating, deleting, or updating files. @@ -238433,7 +115291,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ One of the create_file, delete_file, or update_file operations applied via apply_patch. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction describing how to create a file via the apply_patch tool. @@ -238451,7 +115309,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction describing how to delete a file via the apply_patch tool. @@ -238465,7 +115323,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction describing how to update a file via the apply_patch tool. @@ -238501,7 +115359,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The ID of the entity that created this tool call. - - `ApplyPatchCallOutput = object { id, call_id, status, 3 more }` + - `ApplyPatchCallOutput object { id, call_id, status, 3 more }` The output emitted by an apply patch tool call. @@ -238535,7 +115393,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Optional textual output returned by the apply patch tool. - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -238577,7 +115435,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -238603,7 +115461,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"mcp_approval_request"` - - `McpApprovalResponse = object { id, approval_request_id, approve, 2 more }` + - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }` A response to an MCP approval request. @@ -238629,7 +115487,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -238682,7 +115540,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ - `"failed"` - - `CustomToolCall = object { id, call_id, input, 5 more }` + - `CustomToolCall object { id, call_id, input, 5 more }` - `id: string` @@ -238725,7 +115583,7 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ The namespace of the custom tool being called. - - `CustomToolCallOutput = object { id, call_id, output, 3 more }` + - `CustomToolCallOutput object { id, call_id, output, 3 more }` - `id: string` @@ -238748,84 +115606,18 @@ curl https://api.openai.com/v1/responses/resp_abc123/input_items \ Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `status: "in_progress" or "completed" or "incomplete"` The status of the item. One of `in_progress`, `completed`, or @@ -238886,7 +115678,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the conversation. - - `ResponseConversationParam = object { id }` + - `ResponseConversationParam object { id }` The conversation that this response belongs to. @@ -238906,7 +115698,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A list of one or many input items to the model, containing different content types. - - `EasyInputMessage = object { content, role, phase, type }` + - `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 @@ -238928,7 +115720,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` A text input to the model. @@ -238942,7 +115734,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"input_text"` - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). @@ -238972,7 +115764,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. @@ -239035,7 +115827,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"message"` - - `Message = object { content, role, status, type }` + - `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 @@ -239046,84 +115838,6 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A list of one or many input items to the model, containing different content types. - - `ResponseInputText = object { text, type }` - - 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` - - An image input to the model. Learn about [image inputs](/docs/guides/vision). - - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` - - A file input to the model. - - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `role: "user" or "system" or "developer"` The role of the message input. One of `user`, `system`, or `developer`. @@ -239151,7 +115865,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"message"` - - `ResponseOutputMessage = object { id, content, role, 3 more }` + - `ResponseOutputMessage object { id, content, role, 3 more }` An output message from the model. @@ -239163,7 +115877,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The content of the output message. - - `ResponseOutputText = object { annotations, logprobs, text, type }` + - `ResponseOutputText object { annotations, logprobs, text, type }` A text output from the model. @@ -239171,7 +115885,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The annotations of the text output. - - `FileCitation = object { file_id, filename, index, type }` + - `FileCitation object { file_id, filename, index, type }` A citation to a file. @@ -239193,7 +115907,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"file_citation"` - - `URLCitation = object { end_index, start_index, title, 2 more }` + - `URLCitation object { end_index, start_index, title, 2 more }` A citation for a web resource used to generate a model response. @@ -239219,7 +115933,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the web resource. - - `ContainerFileCitation = object { container_id, end_index, file_id, 3 more }` + - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }` A citation for a container file used to generate a model response. @@ -239249,7 +115963,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"container_file_citation"` - - `FilePath = object { file_id, index, type }` + - `FilePath object { file_id, index, type }` A path to a file. @@ -239293,7 +116007,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"output_text"` - - `ResponseOutputRefusal = object { refusal, type }` + - `ResponseOutputRefusal object { refusal, type }` A refusal from the model. @@ -239340,7 +116054,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"final_answer"` - - `FileSearchCall = object { id, queries, status, 2 more }` + - `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. @@ -239408,7 +116122,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The text that was retrieved from the file. - - `ComputerCall = object { id, call_id, pending_safety_checks, 4 more }` + - `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. @@ -239458,203 +116172,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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 }` + - `Click object { button, type, x, 2 more }` A click action. @@ -239690,7 +116208,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The keys being held while clicking. - - `DoubleClick = object { keys, type, x, y }` + - `DoubleClick object { keys, type, x, y }` A double click action. @@ -239712,7 +116230,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The y-coordinate where the double click occurred. - - `Drag = object { path, type, keys }` + - `Drag object { path, type, keys }` A drag action. @@ -239745,7 +116263,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The keys being held while dragging the mouse. - - `Keypress = object { keys, type }` + - `Keypress object { keys, type }` A collection of keypresses the model would like to perform. @@ -239759,7 +116277,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"keypress"` - - `Move = object { type, x, y, keys }` + - `Move object { type, x, y, keys }` A mouse move action. @@ -239781,7 +116299,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The keys being held while moving the mouse. - - `Screenshot = object { type }` + - `Screenshot object { type }` A screenshot action. @@ -239791,7 +116309,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"screenshot"` - - `Scroll = object { scroll_x, scroll_y, type, 3 more }` + - `Scroll object { scroll_x, scroll_y, type, 3 more }` A scroll action. @@ -239821,7 +116339,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The keys being held while scrolling. - - `Type = object { text, type }` + - `Type object { text, type }` An action to type in text. @@ -239835,7 +116353,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"type"` - - `Wait = object { type }` + - `Wait object { type }` A wait action. @@ -239845,7 +116363,48 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"wait"` - - `ComputerCallOutput = object { call_id, output, type, 3 more }` + - `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. @@ -239908,7 +116467,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `WebSearchCall = object { id, action, status, type }` + - `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. @@ -239922,7 +116481,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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 { query, type, queries, sources }` + - `Search object { query, type, queries, sources }` Action type "search" - Performs a web search query. @@ -239954,7 +116513,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the source. - - `OpenPage = object { type, url }` + - `OpenPage object { type, url }` Action type "open_page" - Opens a specific URL from search results. @@ -239968,7 +116527,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL opened by the model. - - `FindInPage = object { pattern, type, url }` + - `FindInPage object { pattern, type, url }` Action type "find_in_page": Searches for a pattern within a loaded page. @@ -240004,7 +116563,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"web_search_call"` - - `FunctionCall = object { arguments, call_id, name, 4 more }` + - `FunctionCall object { arguments, call_id, name, 4 more }` A tool call to run a function. See the [function calling guide](/docs/guides/function-calling) for more information. @@ -240046,7 +116605,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `FunctionCallOutput = object { call_id, output, type, 2 more }` + - `FunctionCallOutput object { call_id, output, type, 2 more }` The output of a function tool call. @@ -240066,7 +116625,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok An array of content outputs (text, image, file) for the function tool call. - - `ResponseInputTextContent = object { text, type }` + - `ResponseInputTextContent object { text, type }` A text input to the model. @@ -240080,7 +116639,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"input_text"` - - `ResponseInputImageContent = object { type, detail, file_id, image_url }` + - `ResponseInputImageContent object { type, detail, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision) @@ -240110,7 +116669,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `ResponseInputFileContent = object { type, detail, file_data, 3 more }` + - `ResponseInputFileContent object { type, detail, file_data, 3 more }` A file input to the model. @@ -240164,7 +116723,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `ToolSearchCall = object { arguments, type, id, 3 more }` + - `ToolSearchCall object { arguments, type, id, 3 more }` - `arguments: unknown` @@ -240202,13 +116761,13 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `ToolSearchOutput = object { tools, type, id, 3 more }` + - `ToolSearchOutput object { tools, type, id, 3 more }` - `tools: array of object { name, parameters, strict, 3 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 12 more` The loaded tool definitions returned by the tool search output. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -240238,7 +116797,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -240256,7 +116815,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. @@ -240309,7 +116868,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `number` - - `CompoundFilter = object { filters, type }` + - `CompoundFilter object { filters, type }` Combine multiple filters using `and` or `or`. @@ -240317,59 +116876,10 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - - `ComparisonFilter = object { key, type, value }` + - `ComparisonFilter object { key, type, value }` A filter used to compare a specified attribute key to a given value using a defined comparison operation. - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - `unknown` - `type: "and" or "or"` @@ -240412,7 +116922,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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 }` + - `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). @@ -240422,7 +116932,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -240454,7 +116964,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -240514,7 +117024,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -240537,7 +117047,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -240603,7 +117113,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -240656,7 +117166,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -240670,7 +117180,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -240700,220 +117210,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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"` - - - `ImageGeneration = object { type, action, background, 9 more }` - - A tool that generates images using the GPT image models. - - - `type: "image_generation"` - - The type of the image generation tool. Always `image_generation`. - - - `"image_generation"` - - - `action: optional "generate" or "edit" or "auto"` - - Whether to generate a new image or edit an existing image. Default: `auto`. - - - `"generate"` - - - `"edit"` - - - `"auto"` - - - `background: optional "transparent" or "opaque" or "auto"` - - Background type for the generated image. One of `transparent`, - `opaque`, or `auto`. Default: `auto`. - - - `"transparent"` - - - `"opaque"` - - - `"auto"` - - - `input_fidelity: optional "high" or "low"` - - Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - - - `"high"` - - - `"low"` - - - `input_image_mask: optional object { file_id, image_url }` - - Optional mask for inpainting. Contains `image_url` - (string, optional) and `file_id` (string, optional). - - - `file_id: optional string` - - File ID for the mask image. - - - `image_url: optional string` - - Base64-encoded mask image. - - - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `string` - - - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` - - The image generation model to use. Default: `gpt-image-1`. - - - `"gpt-image-1"` - - - `"gpt-image-1-mini"` - - - `"gpt-image-1.5"` - - - `moderation: optional "auto" or "low"` - - Moderation level for the generated image. Default: `auto`. - - - `"auto"` - - - `"low"` - - - `output_compression: optional number` - - Compression level for the output image. Default: 100. - - - `output_format: optional "png" or "webp" or "jpeg"` - - The output format of the generated image. One of `png`, `webp`, or - `jpeg`. Default: `png`. - - - `"png"` - - - `"webp"` - - - `"jpeg"` - - - `partial_images: optional number` - - Number of partial images to generate in streaming mode, from 0 (default value) to 3. - - - `quality: optional "low" or "medium" or "high" or "auto"` - - The quality of the generated image. One of `low`, `medium`, `high`, - or `auto`. Default: `auto`. - - - `"low"` - - - `"medium"` - - - `"high"` - - - `"auto"` - - - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` - - The size of the generated image. One of `1024x1024`, `1024x1536`, - `1536x1024`, or `auto`. Default: `auto`. - - - `"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, environment }` - - A tool that allows the model to execute shell commands. - - - `type: "shell"` - - The type of the shell tool. Always `shell`. - - - `"shell"` - - - `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 }` + - `ContainerNetworkPolicyDisabled object { type }` - `type: "disabled"` @@ -240921,7 +117218,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"disabled"` - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `allowed_domains: array of string` @@ -240949,11 +117246,192 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The secret value to inject for the domain. + - `type: "code_interpreter"` + + The type of the code interpreter tool. Always `code_interpreter`. + + - `"code_interpreter"` + + - `ImageGeneration object { type, action, background, 9 more }` + + A tool that generates images using the GPT image models. + + - `type: "image_generation"` + + The type of the image generation tool. Always `image_generation`. + + - `"image_generation"` + + - `action: optional "generate" or "edit" or "auto"` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `"generate"` + + - `"edit"` + + - `"auto"` + + - `background: optional "transparent" or "opaque" or "auto"` + + Background type for the generated image. One of `transparent`, + `opaque`, or `auto`. Default: `auto`. + + - `"transparent"` + + - `"opaque"` + + - `"auto"` + + - `input_fidelity: optional "high" or "low"` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `"high"` + + - `"low"` + + - `input_image_mask: optional object { file_id, image_url }` + + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). + + - `file_id: optional string` + + File ID for the mask image. + + - `image_url: optional string` + + Base64-encoded mask image. + + - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `string` + + - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5"` + + The image generation model to use. Default: `gpt-image-1`. + + - `"gpt-image-1"` + + - `"gpt-image-1-mini"` + + - `"gpt-image-1.5"` + + - `moderation: optional "auto" or "low"` + + Moderation level for the generated image. Default: `auto`. + + - `"auto"` + + - `"low"` + + - `output_compression: optional number` + + Compression level for the output image. Default: 100. + + - `output_format: optional "png" or "webp" or "jpeg"` + + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. + + - `"png"` + + - `"webp"` + + - `"jpeg"` + + - `partial_images: optional number` + + Number of partial images to generate in streaming mode, from 0 (default value) to 3. + + - `quality: optional "low" or "medium" or "high" or "auto"` + + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"auto"` + + - `size: optional "1024x1024" or "1024x1536" or "1536x1024" or "auto"` + + The size of the generated image. One of `1024x1024`, `1024x1536`, + `1536x1024`, or `auto`. Default: `auto`. + + - `"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, environment }` + + A tool that allows the model to execute shell commands. + + - `type: "shell"` + + The type of the shell tool. Always `shell`. + + - `"shell"` + + - `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 }` + - `SkillReference object { skill_id, type, version }` - `skill_id: string` @@ -240969,7 +117447,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Optional skill version. Use a positive integer or 'latest'. Omit for default. - - `InlineSkill = object { description, name, source, type }` + - `InlineSkill object { description, name, source, type }` - `description: string` @@ -241005,7 +117483,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"inline"` - - `LocalEnvironment = object { type, skills }` + - `LocalEnvironment object { type, skills }` - `type: "local"` @@ -241029,7 +117507,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The path to the directory containing the skill. - - `ContainerReference = object { container_id, type }` + - `ContainerReference object { container_id, type }` - `container_id: string` @@ -241041,7 +117519,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"container_reference"` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -241067,7 +117545,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` + - `Text object { type }` Unconstrained free-form text. @@ -241077,7 +117555,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"text"` - - `Grammar = object { definition, syntax, type }` + - `Grammar object { definition, syntax, type }` A grammar defined by the user. @@ -241099,7 +117577,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"grammar"` - - `Namespace = object { description, name, tools, type }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -241115,7 +117593,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -241133,7 +117611,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -241159,45 +117637,13 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -241223,7 +117669,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -241277,7 +117723,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -241319,7 +117765,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `Reasoning = object { id, summary, type, 3 more }` + - `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 @@ -241380,7 +117826,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `Compaction = object { encrypted_content, type, id }` + - `Compaction object { encrypted_content, type, id }` A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). @@ -241398,7 +117844,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The ID of the compaction item. - - `ImageGenerationCall = object { id, result, status, type }` + - `ImageGenerationCall object { id, result, status, type }` An image generation request made by the model. @@ -241428,7 +117874,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"image_generation_call"` - - `CodeInterpreterCall = object { id, code, container_id, 3 more }` + - `CodeInterpreterCall object { id, code, container_id, 3 more }` A tool call to run code. @@ -241449,7 +117895,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. - - `Logs = object { logs, type }` + - `Logs object { logs, type }` The logs output from the code interpreter. @@ -241463,7 +117909,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"logs"` - - `Image = object { type, url }` + - `Image object { type, url }` The image output from the code interpreter. @@ -241497,7 +117943,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"code_interpreter_call"` - - `LocalShellCall = object { id, action, call_id, 2 more }` + - `LocalShellCall object { id, action, call_id, 2 more }` A tool call to run a command on the local shell. @@ -241555,7 +118001,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"local_shell_call"` - - `LocalShellCallOutput = object { id, output, type, status }` + - `LocalShellCallOutput object { id, output, type, status }` The output of a local shell tool call. @@ -241583,7 +118029,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `ShellCall = object { action, call_id, type, 3 more }` + - `ShellCall object { action, call_id, type, 3 more }` A tool representing a request to execute one or more shell commands. @@ -241621,41 +118067,9 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The environment to execute the shell commands in. - - `LocalEnvironment = object { type, skills }` - - - `type: "local"` - - Use a local computer environment. - - - `"local"` - - - `skills: optional array of LocalSkill` - - An optional list of skills. + - `LocalEnvironment object { type, 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"` + - `ContainerReference object { container_id, type }` - `status: optional "in_progress" or "completed" or "incomplete"` @@ -241667,7 +118081,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `ShellCallOutput = object { call_id, output, type, 3 more }` + - `ShellCallOutput object { call_id, output, type, 3 more }` The streamed output items emitted by a shell tool call. @@ -241683,7 +118097,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The exit or timeout outcome associated with this shell call. - - `Timeout = object { type }` + - `Timeout object { type }` Indicates that the shell call exceeded its configured time limit. @@ -241693,7 +118107,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"timeout"` - - `Exit = object { exit_code, type }` + - `Exit object { exit_code, type }` Indicates that the shell commands finished and returned an exit code. @@ -241739,7 +118153,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"incomplete"` - - `ApplyPatchCall = object { call_id, operation, status, 2 more }` + - `ApplyPatchCall object { call_id, operation, status, 2 more }` A tool call representing a request to create, delete, or update files using diff patches. @@ -241751,7 +118165,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The specific create, delete, or update instruction for the apply_patch tool call. - - `CreateFile = object { diff, path, type }` + - `CreateFile object { diff, path, type }` Instruction for creating a new file via the apply_patch tool. @@ -241769,7 +118183,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"create_file"` - - `DeleteFile = object { path, type }` + - `DeleteFile object { path, type }` Instruction for deleting an existing file via the apply_patch tool. @@ -241783,7 +118197,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"delete_file"` - - `UpdateFile = object { diff, path, type }` + - `UpdateFile object { diff, path, type }` Instruction for updating an existing file via the apply_patch tool. @@ -241819,7 +118233,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the apply patch tool call. Populated when this item is returned via API. - - `ApplyPatchCallOutput = object { call_id, status, type, 2 more }` + - `ApplyPatchCallOutput object { call_id, status, type, 2 more }` The streamed output emitted by an apply patch tool call. @@ -241849,7 +118263,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `McpListTools = object { id, server_label, tools, 2 more }` + - `McpListTools object { id, server_label, tools, 2 more }` A list of tools available on an MCP server. @@ -241891,7 +118305,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Error message if the server could not list tools. - - `McpApprovalRequest = object { id, arguments, name, 2 more }` + - `McpApprovalRequest object { id, arguments, name, 2 more }` A request for human approval of a tool invocation. @@ -241917,7 +118331,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"mcp_approval_request"` - - `McpApprovalResponse = object { approval_request_id, approve, type, 2 more }` + - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }` A response to an MCP approval request. @@ -241943,7 +118357,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Optional reason for the decision. - - `McpCall = object { id, arguments, name, 6 more }` + - `McpCall object { id, arguments, name, 6 more }` An invocation of a tool on an MCP server. @@ -241996,7 +118410,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"failed"` - - `CustomToolCallOutput = object { call_id, output, type, id }` + - `CustomToolCallOutput object { call_id, output, type, id }` The output of a custom tool call from your code, being sent back to the model. @@ -242017,84 +118431,18 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Text, image, or file output of the custom tool call. - - `ResponseInputText = object { text, type }` + - `ResponseInputText object { text, type }` 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"` - - - `ResponseInputImage = object { detail, type, file_id, image_url }` + - `ResponseInputImage object { detail, type, file_id, image_url }` An image input to the model. Learn about [image inputs](/docs/guides/vision). - - `detail: "low" or "high" or "auto" or "original"` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `"low"` - - - `"high"` - - - `"auto"` - - - `"original"` - - - `type: "input_image"` - - The type of the input item. Always `input_image`. - - - `"input_image"` - - - `file_id: optional string` - - The ID of the file to be sent to the model. - - - `image_url: optional string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `ResponseInputFile = object { type, detail, file_data, 3 more }` + - `ResponseInputFile object { type, detail, file_data, 3 more }` A file input to the model. - - `type: "input_file"` - - The type of the input item. Always `input_file`. - - - `"input_file"` - - - `detail: optional "low" or "high"` - - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. - - - `"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. - - `type: "custom_tool_call_output"` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -242105,7 +118453,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the custom tool call output in the OpenAI platform. - - `CustomToolCall = object { call_id, input, name, 3 more }` + - `CustomToolCall object { call_id, input, name, 3 more }` A call to a custom tool created by the model. @@ -242135,7 +118483,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The namespace of the custom tool being called. - - `ItemReference = object { id, type }` + - `ItemReference object { id, type }` An internal identifier for an item to reference. @@ -242247,7 +118595,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. - - `ResponseFormatText = object { type }` + - `ResponseFormatText object { type }` Default response format. Used to generate text responses. @@ -242257,7 +118605,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"text"` - - `ResponseFormatTextJSONSchemaConfig = object { name, schema, type, 2 more }` + - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }` JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](/docs/guides/structured-outputs). @@ -242291,7 +118639,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs). - - `ResponseFormatJSONObject = object { type }` + - `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 @@ -242337,7 +118685,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"required"` - - `ToolChoiceAllowed = object { mode, tools, type }` + - `ToolChoiceAllowed object { mode, tools, type }` Constrains the tools available to the model to a pre-defined set. @@ -242374,7 +118722,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"allowed_tools"` - - `ToolChoiceTypes = object { type }` + - `ToolChoiceTypes object { type }` Indicates that the model should use a built-in tool to generate a response. [Learn more about built-in tools](/docs/guides/tools). @@ -242410,7 +118758,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"code_interpreter"` - - `ToolChoiceFunction = object { name, type }` + - `ToolChoiceFunction object { name, type }` Use this option to force the model to call a specific function. @@ -242424,7 +118772,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"function"` - - `ToolChoiceMcp = object { server_label, type, name }` + - `ToolChoiceMcp object { server_label, type, name }` Use this option to force the model to call a specific tool on a remote MCP server. @@ -242442,7 +118790,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The name of the tool to call on the server. - - `ToolChoiceCustom = object { name, type }` + - `ToolChoiceCustom object { name, type }` Use this option to force the model to call a specific custom tool. @@ -242456,7 +118804,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"custom"` - - `ToolChoiceApplyPatch = object { type }` + - `ToolChoiceApplyPatch object { type }` Forces the model to call the apply_patch tool when executing a tool call. @@ -242466,7 +118814,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"apply_patch"` - - `ToolChoiceShell = object { type }` + - `ToolChoiceShell object { type }` Forces the model to call the shell tool when a tool call is required. @@ -242480,7 +118828,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. - - `Function = object { name, parameters, strict, 3 more }` + - `Function object { name, parameters, strict, 3 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). @@ -242510,7 +118858,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A description of the function. Used by the model to determine whether or not to call the function. - - `FileSearch = object { type, vector_store_ids, filters, 2 more }` + - `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). @@ -242528,130 +118876,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A filter to apply. - - `ComparisonFilter = object { key, type, value }` + - `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 }` + - `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. - - - `key: string` - - The key to compare against the value. - - - `type: "eq" or "ne" or "gt" or 5 more` - - Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. - - - `eq`: equals - - `ne`: not equal - - `gt`: greater than - - `gte`: greater than or equal - - `lt`: less than - - `lte`: less than or equal - - `in`: in - - `nin`: not in - - - `"eq"` - - - `"ne"` - - - `"gt"` - - - `"gte"` - - - `"lt"` - - - `"lte"` - - - `"in"` - - - `"nin"` - - - `value: string or number or boolean or array of string or number` - - The value to compare against the attribute key; supports string, number, or boolean types. - - - `string` - - - `number` - - - `boolean` - - - `array of string or number` - - - `string` - - - `number` - - - `unknown` - - - `type: "and" or "or"` - - Type of operation: `and` or `or`. - - - `"and"` - - - `"or"` - - `max_num_results: optional number` The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -242684,7 +118916,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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 }` + - `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). @@ -242694,7 +118926,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"computer"` - - `ComputerUsePreview = object { display_height, display_width, environment, type }` + - `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). @@ -242726,7 +118958,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"computer_use_preview"` - - `WebSearch = object { type, filters, search_context_size, user_location }` + - `WebSearch object { type, filters, search_context_size, user_location }` Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). @@ -242786,7 +119018,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"approximate"` - - `Mcp = object { server_label, type, allowed_tools, 7 more }` + - `Mcp object { server_label, type, allowed_tools, 7 more }` Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). @@ -242809,7 +119041,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A string array of allowed tool names - - `McpToolFilter = object { read_only, tool_names }` + - `McpToolFilter object { read_only, tool_names }` A filter object to specify which tools are allowed. @@ -242875,7 +119107,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Specify which of the MCP server's tools require approval. - - `McpToolApprovalFilter = object { always, never }` + - `McpToolApprovalFilter object { always, never }` Specify which of the MCP server's tools require approval. Can be `always`, `never`, or a filter object associated with tools @@ -242928,7 +119160,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL for the MCP server. One of `server_url` or `connector_id` must be provided. - - `CodeInterpreter = object { container, type }` + - `CodeInterpreter object { container, type }` A tool that runs Python code to help generate a response to a prompt. @@ -242942,7 +119174,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The container ID. - - `CodeInterpreterToolAuto = object { type, file_ids, memory_limit, network_policy }` + - `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. @@ -242972,41 +119204,9 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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` + - `ContainerNetworkPolicyDisabled object { type }` - The secret value to inject for the domain. + - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }` - `type: "code_interpreter"` @@ -243014,7 +119214,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"code_interpreter"` - - `ImageGeneration = object { type, action, background, 9 more }` + - `ImageGeneration object { type, action, background, 9 more }` A tool that generates images using the GPT image models. @@ -243135,7 +119335,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"auto"` - - `LocalShell = object { type }` + - `LocalShell object { type }` A tool that allows the model to execute shell commands in a local environment. @@ -243145,7 +119345,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `"local_shell"` - - `Shell = object { type, environment }` + - `Shell object { type, environment }` A tool that allows the model to execute shell commands. @@ -243157,163 +119357,13 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `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 }` - - - `type: "disabled"` - - Disable outbound network access. Always `disabled`. - - - `"disabled"` - - - `ContainerNetworkPolicyAllowlist = object { allowed_domains, type, domain_secrets }` + - `ContainerAuto object { type, file_ids, memory_limit, 2 more }` - - `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` + - `LocalEnvironment object { type, skills }` - The secret value to inject for the domain. - - - `skills: optional array of SkillReference or InlineSkill` - - An optional list of skills referenced by id or inline data. - - - `SkillReference = object { skill_id, type, version }` + - `ContainerReference object { container_id, type }` - - `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, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -243339,39 +119389,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok 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 }` + - `Namespace object { description, name, tools, type }` Groups function/custom tools under a shared namespace. @@ -243387,7 +119405,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The function/custom tools available inside this namespace. - - `Function = object { name, type, defer_loading, 3 more }` + - `Function object { name, type, defer_loading, 3 more }` - `name: string` @@ -243405,7 +119423,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `strict: optional boolean` - - `Custom = object { name, type, defer_loading, 2 more }` + - `Custom object { name, type, defer_loading, 2 more }` A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) @@ -243431,45 +119449,13 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The input format for the custom tool. Default is unconstrained text. - - `Text = object { type }` - - Unconstrained free-form text. - - - `type: "text"` - - Unconstrained text format. Always `text`. - - - `"text"` - - - `Grammar = object { definition, syntax, type }` - - A grammar defined by the user. - - - `definition: string` - - The grammar definition. - - - `syntax: "lark" or "regex"` - - The syntax of the grammar definition. One of `lark` or `regex`. - - - `"lark"` - - - `"regex"` - - - `type: "grammar"` - - Grammar format. Always `grammar`. - - - `"grammar"` - - `type: "namespace"` The type of the tool. Always `namespace`. - `"namespace"` - - `ToolSearch = object { type, description, execution, parameters }` + - `ToolSearch object { type, description, execution, parameters }` Hosted or BYOT tool search configuration for deferred tools. @@ -243495,7 +119481,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok Parameter schema for a client-executed tool search tool. - - `WebSearchPreview = object { type, search_content_types, search_context_size, user_location }` + - `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). @@ -243549,7 +119535,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - - `ApplyPatch = object { type }` + - `ApplyPatch object { type }` Allows the assistant to create, delete, or update files using unified diffs. @@ -243612,3 +119598,15 @@ curl -X POST https://api.openai.com/v1/responses/input_tokens \ "input_tokens": 11 } ``` + +## Domain Types + +### Input Token Count Response + +- `InputTokenCountResponse object { input_tokens, object }` + + - `input_tokens: number` + + - `object: "response.input_tokens"` + + - `"response.input_tokens"`