Repository Public
1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.23## Create a model response45**post** `/responses`67Creates a model response. Provide [text](/api/docs/guides/text) or8[image](/api/docs/guides/images-vision) inputs to generate [text](/api/docs/guides/text)9or [JSON](/api/docs/guides/structured-outputs) outputs. Have the model call10your own [custom code](/api/docs/guides/function-calling) or use built-in11[tools](/api/docs/guides/tools) like [web search](/api/docs/guides/tools-web-search)12or [file search](/api/docs/guides/tools-file-search) to use your own data13as input for the model's response.1415### Body Parameters1617- `background: optional boolean or null`1819 Whether to run the model response in the background.20 [Learn more](/api/docs/guides/background).2122- `context_management: optional array of object { type, compact_threshold } or null`2324 Context management configuration for this request.2526 - `type: string`2728 The context management entry type. Currently only 'compaction' is supported.2930 - `compact_threshold: optional number or null`3132 Token threshold at which compaction should be triggered for this entry.3334- `conversation: optional string or ResponseConversationParam or null`3536 The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.37 Input items and output items from this response are automatically added to this conversation after this response completes.3839 - `ConversationID = string`4041 The unique ID of the conversation.4243 - `ResponseConversationParam object { id }`4445 The conversation that this response belongs to.4647 - `id: string`4849 The unique ID of the conversation.5051- `include: optional array of ResponseIncludable or null`5253 Specify additional output data to include in the model response. Currently supported values are:5455 - `web_search_call.action.sources`: Include the sources of the web search tool call.56 - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.57 - `computer_call_output.output.image_url`: Include image urls from the computer call output.58 - `file_search_call.results`: Include the search results of the file search tool call.59 - `message.input_image.image_url`: Include image urls from the input message.60 - `message.output_text.logprobs`: Include logprobs with assistant messages.61 - `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).6263 - `"file_search_call.results"`6465 - `"web_search_call.results"`6667 - `"web_search_call.action.sources"`6869 - `"message.input_image.image_url"`7071 - `"computer_call_output.output.image_url"`7273 - `"code_interpreter_call.outputs"`7475 - `"reasoning.encrypted_content"`7677 - `"message.output_text.logprobs"`7879- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more`8081 Text, image, or file inputs to the model, used to generate a response.8283 Learn more:8485 - [Text inputs and outputs](/api/docs/guides/text)86 - [Image inputs](/api/docs/guides/images-vision)87 - [File inputs](/api/docs/guides/file-inputs)88 - [Conversation state](/api/docs/guides/conversation-state)89 - [Function calling](/api/docs/guides/function-calling)9091 - `TextInput = string`9293 A text input to the model, equivalent to a text input with the94 `user` role.9596 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more`9798 A list of one or many input items to the model, containing99 different content types.100101 - `EasyInputMessage object { content, role, phase, type }`102103 A message input to the model with a role indicating instruction following104 hierarchy. Instructions given with the `developer` or `system` role take105 precedence over instructions given with the `user` role. Messages with the106 `assistant` role are presumed to have been generated by the model in previous107 interactions.108109 - `content: string or ResponseInputMessageContentList`110111 Text, image, or audio input to the model, used to generate a response.112 Can also contain previous assistant responses.113114 - `TextInput = string`115116 A text input to the model.117118 - `ResponseInputMessageContentList = array of ResponseInputContent`119120 A list of one or many input items to the model, containing different content121 types.122123 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`124125 A text input to the model.126127 - `text: string`128129 The text input to the model.130131 - `type: "input_text"`132133 The type of the input item. Always `input_text`.134135 - `"input_text"`136137 - `prompt_cache_breakpoint: optional object { mode }`138139 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.140141 - `mode: "explicit"`142143 The breakpoint mode. Always `explicit`.144145 - `"explicit"`146147 - `ResponseInputImage object { detail, type, file_id, 2 more }`148149 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).150151 - `detail: ImageDetail`152153 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.154155 - `"low"`156157 - `"high"`158159 - `"auto"`160161 - `"original"`162163 - `type: "input_image"`164165 The type of the input item. Always `input_image`.166167 - `"input_image"`168169 - `file_id: optional string or null`170171 The ID of the file to be sent to the model.172173 - `image_url: optional string or null`174175 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.176177 - `prompt_cache_breakpoint: optional object { mode }`178179 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.180181 - `mode: "explicit"`182183 The breakpoint mode. Always `explicit`.184185 - `"explicit"`186187 - `ResponseInputFile object { type, detail, file_data, 4 more }`188189 A file input to the model.190191 - `type: "input_file"`192193 The type of the input item. Always `input_file`.194195 - `"input_file"`196197 - `detail: optional "auto" or "low" or "high"`198199 The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.200201 - `"auto"`202203 - `"low"`204205 - `"high"`206207 - `file_data: optional string`208209 The content of the file to be sent to the model.210211 - `file_id: optional string or null`212213 The ID of the file to be sent to the model.214215 - `file_url: optional string`216217 The URL of the file to be sent to the model.218219 - `filename: optional string`220221 The name of the file to be sent to the model.222223 - `prompt_cache_breakpoint: optional object { mode }`224225 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.226227 - `mode: "explicit"`228229 The breakpoint mode. Always `explicit`.230231 - `"explicit"`232233 - `role: "user" or "assistant" or "system" or "developer"`234235 The role of the message input. One of `user`, `assistant`, `system`, or236 `developer`.237238 - `"user"`239240 - `"assistant"`241242 - `"system"`243244 - `"developer"`245246 - `phase: optional "commentary" or "final_answer" or null`247248 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).249 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend250 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.251252 - `"commentary"`253254 - `"final_answer"`255256 - `type: optional "message"`257258 The type of the message input. Always `message`.259260 - `"message"`261262 - `Message object { content, role, status, type }`263264 A message input to the model with a role indicating instruction following265 hierarchy. Instructions given with the `developer` or `system` role take266 precedence over instructions given with the `user` role.267268 - `content: ResponseInputMessageContentList`269270 A list of one or many input items to the model, containing different content271 types.272273 - `role: "user" or "system" or "developer"`274275 The role of the message input. One of `user`, `system`, or `developer`.276277 - `"user"`278279 - `"system"`280281 - `"developer"`282283 - `status: optional "in_progress" or "completed" or "incomplete"`284285 The status of item. One of `in_progress`, `completed`, or286 `incomplete`. Populated when items are returned via API.287288 - `"in_progress"`289290 - `"completed"`291292 - `"incomplete"`293294 - `type: optional "message"`295296 The type of the message input. Always set to `message`.297298 - `"message"`299300 - `ResponseOutputMessage object { id, content, role, 3 more }`301302 An output message from the model.303304 - `id: string`305306 The unique ID of the output message.307308 - `content: array of ResponseOutputText or ResponseOutputRefusal`309310 The content of the output message.311312 - `ResponseOutputText object { annotations, logprobs, text, type }`313314 A text output from the model.315316 - `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 }`317318 The annotations of the text output.319320 - `FileCitation object { file_id, filename, index, type }`321322 A citation to a file.323324 - `file_id: string`325326 The ID of the file.327328 - `filename: string`329330 The filename of the file cited.331332 - `index: number`333334 The index of the file in the list of files.335336 - `type: "file_citation"`337338 The type of the file citation. Always `file_citation`.339340 - `"file_citation"`341342 - `URLCitation object { end_index, start_index, title, 2 more }`343344 A citation for a web resource used to generate a model response.345346 - `end_index: number`347348 The index of the last character of the URL citation in the message.349350 - `start_index: number`351352 The index of the first character of the URL citation in the message.353354 - `title: string`355356 The title of the web resource.357358 - `type: "url_citation"`359360 The type of the URL citation. Always `url_citation`.361362 - `"url_citation"`363364 - `url: string`365366 The URL of the web resource.367368 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`369370 A citation for a container file used to generate a model response.371372 - `container_id: string`373374 The ID of the container file.375376 - `end_index: number`377378 The index of the last character of the container file citation in the message.379380 - `file_id: string`381382 The ID of the file.383384 - `filename: string`385386 The filename of the container file cited.387388 - `start_index: number`389390 The index of the first character of the container file citation in the message.391392 - `type: "container_file_citation"`393394 The type of the container file citation. Always `container_file_citation`.395396 - `"container_file_citation"`397398 - `FilePath object { file_id, index, type }`399400 A path to a file.401402 - `file_id: string`403404 The ID of the file.405406 - `index: number`407408 The index of the file in the list of files.409410 - `type: "file_path"`411412 The type of the file path. Always `file_path`.413414 - `"file_path"`415416 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`417418 - `token: string`419420 - `bytes: array of number`421422 - `logprob: number`423424 - `top_logprobs: array of object { token, bytes, logprob }`425426 - `token: string`427428 - `bytes: array of number`429430 - `logprob: number`431432 - `text: string`433434 The text output from the model.435436 - `type: "output_text"`437438 The type of the output text. Always `output_text`.439440 - `"output_text"`441442 - `ResponseOutputRefusal object { refusal, type }`443444 A refusal from the model.445446 - `refusal: string`447448 The refusal explanation from the model.449450 - `type: "refusal"`451452 The type of the refusal. Always `refusal`.453454 - `"refusal"`455456 - `role: "assistant"`457458 The role of the output message. Always `assistant`.459460 - `"assistant"`461462 - `status: "in_progress" or "completed" or "incomplete"`463464 The status of the message input. One of `in_progress`, `completed`, or465 `incomplete`. Populated when input items are returned via API.466467 - `"in_progress"`468469 - `"completed"`470471 - `"incomplete"`472473 - `type: "message"`474475 The type of the output message. Always `message`.476477 - `"message"`478479 - `phase: optional "commentary" or "final_answer" or null`480481 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).482 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend483 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.484485 - `"commentary"`486487 - `"final_answer"`488489 - `FileSearchCall object { id, queries, status, 2 more }`490491 The results of a file search tool call. See the492 [file search guide](/api/docs/guides/tools-file-search) for more information.493494 - `id: string`495496 The unique ID of the file search tool call.497498 - `queries: array of string`499500 The queries used to search for files.501502 - `status: "in_progress" or "searching" or "completed" or 2 more`503504 The status of the file search tool call. One of `in_progress`,505 `searching`, `incomplete` or `failed`,506507 - `"in_progress"`508509 - `"searching"`510511 - `"completed"`512513 - `"incomplete"`514515 - `"failed"`516517 - `type: "file_search_call"`518519 The type of the file search tool call. Always `file_search_call`.520521 - `"file_search_call"`522523 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`524525 The results of the file search tool call.526527 - `attributes: optional map[string or number or boolean] or null`528529 Set of 16 key-value pairs that can be attached to an object. This can be530 useful for storing additional information about the object in a structured531 format, and querying for objects via API or the dashboard. Keys are strings532 with a maximum length of 64 characters. Values are strings with a maximum533 length of 512 characters, booleans, or numbers.534535 - `string`536537 - `number`538539 - `boolean`540541 - `file_id: optional string`542543 The unique ID of the file.544545 - `filename: optional string`546547 The name of the file.548549 - `score: optional number`550551 The relevance score of the file - a value between 0 and 1.552553 - `text: optional string`554555 The text that was retrieved from the file.556557 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`558559 A tool call to a computer use tool. See the560 [computer use guide](/api/docs/guides/tools-computer-use) for more information.561562 - `id: string`563564 The unique ID of the computer call.565566 - `call_id: string`567568 An identifier used when responding to the tool call with output.569570 - `pending_safety_checks: array of object { id, code, message }`571572 The pending safety checks for the computer call.573574 - `id: string`575576 The ID of the pending safety check.577578 - `code: optional string or null`579580 The type of the pending safety check.581582 - `message: optional string or null`583584 Details about the pending safety check.585586 - `status: "in_progress" or "completed" or "incomplete"`587588 The status of the item. One of `in_progress`, `completed`, or589 `incomplete`. Populated when items are returned via API.590591 - `"in_progress"`592593 - `"completed"`594595 - `"incomplete"`596597 - `type: "computer_call"`598599 The type of the computer call. Always `computer_call`.600601 - `"computer_call"`602603 - `action: optional ComputerAction`604605 A click action.606607 - `Click object { button, type, x, 2 more }`608609 A click action.610611 - `button: "left" or "right" or "wheel" or 2 more`612613 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.614615 - `"left"`616617 - `"right"`618619 - `"wheel"`620621 - `"back"`622623 - `"forward"`624625 - `type: "click"`626627 Specifies the event type. For a click action, this property is always `click`.628629 - `"click"`630631 - `x: number`632633 The x-coordinate where the click occurred.634635 - `y: number`636637 The y-coordinate where the click occurred.638639 - `keys: optional array of string or null`640641 The keys being held while clicking.642643 - `DoubleClick object { keys, type, x, y }`644645 A double click action.646647 - `keys: array of string or null`648649 The keys being held while double-clicking.650651 - `type: "double_click"`652653 Specifies the event type. For a double click action, this property is always set to `double_click`.654655 - `"double_click"`656657 - `x: number`658659 The x-coordinate where the double click occurred.660661 - `y: number`662663 The y-coordinate where the double click occurred.664665 - `Drag object { path, type, keys }`666667 A drag action.668669 - `path: array of object { x, y }`670671 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg672673 ```674 [675 { x: 100, y: 200 },676 { x: 200, y: 300 }677 ]678 ```679680 - `x: number`681682 The x-coordinate.683684 - `y: number`685686 The y-coordinate.687688 - `type: "drag"`689690 Specifies the event type. For a drag action, this property is always set to `drag`.691692 - `"drag"`693694 - `keys: optional array of string or null`695696 The keys being held while dragging the mouse.697698 - `Keypress object { keys, type }`699700 A collection of keypresses the model would like to perform.701702 - `keys: array of string`703704 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.705706 - `type: "keypress"`707708 Specifies the event type. For a keypress action, this property is always set to `keypress`.709710 - `"keypress"`711712 - `Move object { type, x, y, keys }`713714 A mouse move action.715716 - `type: "move"`717718 Specifies the event type. For a move action, this property is always set to `move`.719720 - `"move"`721722 - `x: number`723724 The x-coordinate to move to.725726 - `y: number`727728 The y-coordinate to move to.729730 - `keys: optional array of string or null`731732 The keys being held while moving the mouse.733734 - `Screenshot object { type }`735736 A screenshot action.737738 - `type: "screenshot"`739740 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.741742 - `"screenshot"`743744 - `Scroll object { scroll_x, scroll_y, type, 3 more }`745746 A scroll action.747748 - `scroll_x: number`749750 The horizontal scroll distance.751752 - `scroll_y: number`753754 The vertical scroll distance.755756 - `type: "scroll"`757758 Specifies the event type. For a scroll action, this property is always set to `scroll`.759760 - `"scroll"`761762 - `x: number`763764 The x-coordinate where the scroll occurred.765766 - `y: number`767768 The y-coordinate where the scroll occurred.769770 - `keys: optional array of string or null`771772 The keys being held while scrolling.773774 - `Type object { text, type }`775776 An action to type in text.777778 - `text: string`779780 The text to type.781782 - `type: "type"`783784 Specifies the event type. For a type action, this property is always set to `type`.785786 - `"type"`787788 - `Wait object { type }`789790 A wait action.791792 - `type: "wait"`793794 Specifies the event type. For a wait action, this property is always set to `wait`.795796 - `"wait"`797798 - `actions: optional ComputerActionList`799800 Flattened batched actions for `computer_use`. Each action includes an801 `type` discriminator and action-specific fields.802803 - `Click object { button, type, x, 2 more }`804805 A click action.806807 - `DoubleClick object { keys, type, x, y }`808809 A double click action.810811 - `Drag object { path, type, keys }`812813 A drag action.814815 - `Keypress object { keys, type }`816817 A collection of keypresses the model would like to perform.818819 - `Move object { type, x, y, keys }`820821 A mouse move action.822823 - `Screenshot object { type }`824825 A screenshot action.826827 - `Scroll object { scroll_x, scroll_y, type, 3 more }`828829 A scroll action.830831 - `Type object { text, type }`832833 An action to type in text.834835 - `Wait object { type }`836837 A wait action.838839 - `ComputerCallOutput object { call_id, output, type, 3 more }`840841 The output of a computer tool call.842843 - `call_id: string`844845 The ID of the computer tool call that produced the output.846847 - `output: ResponseComputerToolCallOutputScreenshot`848849 A computer screenshot image used with the computer use tool.850851 - `type: "computer_screenshot"`852853 Specifies the event type. For a computer screenshot, this property is854 always set to `computer_screenshot`.855856 - `"computer_screenshot"`857858 - `file_id: optional string`859860 The identifier of an uploaded file that contains the screenshot.861862 - `image_url: optional string`863864 The URL of the screenshot image.865866 - `type: "computer_call_output"`867868 The type of the computer tool call output. Always `computer_call_output`.869870 - `"computer_call_output"`871872 - `id: optional string or null`873874 The ID of the computer tool call output.875876 - `acknowledged_safety_checks: optional array of object { id, code, message } or null`877878 The safety checks reported by the API that have been acknowledged by the developer.879880 - `id: string`881882 The ID of the pending safety check.883884 - `code: optional string or null`885886 The type of the pending safety check.887888 - `message: optional string or null`889890 Details about the pending safety check.891892 - `status: optional "in_progress" or "completed" or "incomplete" or null`893894 The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.895896 - `"in_progress"`897898 - `"completed"`899900 - `"incomplete"`901902 - `WebSearchCall object { id, action, status, type }`903904 The results of a web search tool call. See the905 [web search guide](/api/docs/guides/tools-web-search) for more information.906907 - `id: string`908909 The unique ID of the web search tool call.910911 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`912913 An object describing the specific action taken in this web search call.914 Includes details on how the model used the web (search, open_page, find_in_page).915916 - `Search object { type, queries, query, sources }`917918 Action type "search" - Performs a web search query.919920 - `type: "search"`921922 The action type.923924 - `"search"`925926 - `queries: optional array of string`927928 The search queries.929930 - `query: optional string`931932 The search query.933934 - `sources: optional array of object { type, url }`935936 The sources used in the search.937938 - `type: "url"`939940 The type of source. Always `url`.941942 - `"url"`943944 - `url: string`945946 The URL of the source.947948 - `OpenPage object { type, url }`949950 Action type "open_page" - Opens a specific URL from search results.951952 - `type: "open_page"`953954 The action type.955956 - `"open_page"`957958 - `url: optional string or null`959960 The URL opened by the model.961962 - `FindInPage object { pattern, type, url }`963964 Action type "find_in_page": Searches for a pattern within a loaded page.965966 - `pattern: string`967968 The pattern or text to search for within the page.969970 - `type: "find_in_page"`971972 The action type.973974 - `"find_in_page"`975976 - `url: string`977978 The URL of the page searched for the pattern.979980 - `status: "in_progress" or "searching" or "completed" or 2 more`981982 The status of the web search tool call.983984 - `"in_progress"`985986 - `"searching"`987988 - `"completed"`989990 - `"failed"`991992 - `"incomplete"`993994 - `type: "web_search_call"`995996 The type of the web search tool call. Always `web_search_call`.997998 - `"web_search_call"`9991000 - `FunctionCall object { arguments, call_id, name, 6 more }`10011002 A tool call to run a function. See the1003 [function calling guide](/api/docs/guides/function-calling) for more information.10041005 - `arguments: string`10061007 A JSON string of the arguments to pass to the function.10081009 - `call_id: string`10101011 The unique ID of the function tool call generated by the model.10121013 - `name: string`10141015 The name of the function to run.10161017 - `type: "function_call"`10181019 The type of the function tool call. Always `function_call`.10201021 - `"function_call"`10221023 - `id: optional string`10241025 The unique ID of the function tool call.10261027 - `async: optional boolean`10281029 Whether the function tool call runs asynchronously.10301031 - `caller: optional object { type } or object { caller_id, type } or null`10321033 The execution context that produced this tool call.10341035 - `Direct object { type }`10361037 - `type: "direct"`10381039 - `"direct"`10401041 - `Program object { caller_id, type }`10421043 - `caller_id: string`10441045 The call ID of the program item that produced this tool call.10461047 - `type: "program"`10481049 - `"program"`10501051 - `namespace: optional string`10521053 The namespace of the function to run.10541055 - `status: optional "in_progress" or "completed" or "incomplete"`10561057 The status of the item. One of `in_progress`, `completed`, or1058 `incomplete`. Populated when items are returned via API.10591060 - `"in_progress"`10611062 - `"completed"`10631064 - `"incomplete"`10651066 - `FunctionCallOutput object { output, type, id, 5 more }`10671068 The output of a function tool call.10691070 - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`10711072 Text, image, or file output of the function tool call.10731074 - `string`10751076 A JSON string of the output of the function tool call.10771078 - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`10791080 An array of content outputs (text, image, file) for the function tool call.10811082 - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`10831084 A text input to the model.10851086 - `text: string`10871088 The text input to the model.10891090 - `type: "input_text"`10911092 The type of the input item. Always `input_text`.10931094 - `"input_text"`10951096 - `prompt_cache_breakpoint: optional object { mode } or null`10971098 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.10991100 - `mode: "explicit"`11011102 The breakpoint mode. Always `explicit`.11031104 - `"explicit"`11051106 - `ResponseInputImageContent object { type, detail, file_id, 2 more }`11071108 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)11091110 - `type: "input_image"`11111112 The type of the input item. Always `input_image`.11131114 - `"input_image"`11151116 - `detail: optional ImageDetail or null`11171118 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.11191120 - `file_id: optional string or null`11211122 The ID of the file to be sent to the model.11231124 - `image_url: optional string or null`11251126 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.11271128 - `prompt_cache_breakpoint: optional object { mode } or null`11291130 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.11311132 - `mode: "explicit"`11331134 The breakpoint mode. Always `explicit`.11351136 - `"explicit"`11371138 - `ResponseInputFileContent object { type, detail, file_data, 4 more }`11391140 A file input to the model.11411142 - `type: "input_file"`11431144 The type of the input item. Always `input_file`.11451146 - `"input_file"`11471148 - `detail: optional "auto" or "low" or "high"`11491150 The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.11511152 - `"auto"`11531154 - `"low"`11551156 - `"high"`11571158 - `file_data: optional string or null`11591160 The base64-encoded data of the file to be sent to the model.11611162 - `file_id: optional string or null`11631164 The ID of the file to be sent to the model.11651166 - `file_url: optional string or null`11671168 The URL of the file to be sent to the model.11691170 - `filename: optional string or null`11711172 The name of the file to be sent to the model.11731174 - `prompt_cache_breakpoint: optional object { mode } or null`11751176 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.11771178 - `mode: "explicit"`11791180 The breakpoint mode. Always `explicit`.11811182 - `"explicit"`11831184 - `type: "function_call_output"`11851186 The type of the function tool call output. Always `function_call_output`.11871188 - `"function_call_output"`11891190 - `id: optional string or null`11911192 The unique ID of the function tool call output. Populated when this item is returned via API.11931194 - `call_id: optional string or null`11951196 The unique ID of the function tool call generated by the model.11971198 - `caller: optional object { type } or object { caller_id, type } or null`11991200 The execution context that produced this tool call.12011202 - `Direct object { type }`12031204 - `type: "direct"`12051206 The caller type. Always `direct`.12071208 - `"direct"`12091210 - `Program object { caller_id, type }`12111212 - `caller_id: string`12131214 The call ID of the program item that produced this tool call.12151216 - `type: "program"`12171218 The caller type. Always `program`.12191220 - `"program"`12211222 - `name: optional string or null`12231224 The name of the tool that produced the output.12251226 - `namespace: optional string or null`12271228 The namespace of the tool that produced the output.12291230 - `status: optional "in_progress" or "completed" or "incomplete" or null`12311232 The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.12331234 - `"in_progress"`12351236 - `"completed"`12371238 - `"incomplete"`12391240 - `ToolSearchCall object { arguments, type, id, 3 more }`12411242 - `arguments: unknown`12431244 The arguments supplied to the tool search call.12451246 - `type: "tool_search_call"`12471248 The item type. Always `tool_search_call`.12491250 - `"tool_search_call"`12511252 - `id: optional string or null`12531254 The unique ID of this tool search call.12551256 - `call_id: optional string or null`12571258 The unique ID of the tool search call generated by the model.12591260 - `execution: optional "server" or "client"`12611262 Whether tool search was executed by the server or by the client.12631264 - `"server"`12651266 - `"client"`12671268 - `status: optional "in_progress" or "completed" or "incomplete" or null`12691270 The status of the tool search call.12711272 - `"in_progress"`12731274 - `"completed"`12751276 - `"incomplete"`12771278 - `ToolSearchOutput object { tools, type, id, 3 more }`12791280 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`12811282 The loaded tool definitions returned by the tool search output.12831284 - `Function object { name, parameters, strict, 6 more }`12851286 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).12871288 - `name: string`12891290 The name of the function to call.12911292 - `parameters: map[unknown] or null`12931294 A JSON schema object describing the parameters of the function.12951296 - `strict: boolean or null`12971298 Whether strict parameter validation is enforced for this function tool.12991300 - `type: "function"`13011302 The type of the function tool. Always `function`.13031304 - `"function"`13051306 - `allowed_callers: optional array of "direct" or "programmatic" or null`13071308 The tool invocation context(s).13091310 - `"direct"`13111312 - `"programmatic"`13131314 - `async: optional boolean`13151316 - `defer_loading: optional boolean`13171318 Whether this function is deferred and loaded via tool search.13191320 - `description: optional string or null`13211322 A description of the function. Used by the model to determine whether or not to call the function.13231324 - `output_schema: optional map[unknown] or null`13251326 A JSON schema object describing the JSON value encoded in string outputs for this function.13271328 - `FileSearch object { type, vector_store_ids, filters, 2 more }`13291330 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).13311332 - `type: "file_search"`13331334 The type of the file search tool. Always `file_search`.13351336 - `"file_search"`13371338 - `vector_store_ids: array of string`13391340 The IDs of the vector stores to search.13411342 - `filters: optional ComparisonFilter or CompoundFilter or null`13431344 A filter to apply.13451346 - `ComparisonFilter object { key, type, value }`13471348 A filter used to compare a specified attribute key to a given value using a defined comparison operation.13491350 - `key: string`13511352 The key to compare against the value.13531354 - `type: "eq" or "ne" or "gt" or 5 more`13551356 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.13571358 - `eq`: equals1359 - `ne`: not equal1360 - `gt`: greater than1361 - `gte`: greater than or equal1362 - `lt`: less than1363 - `lte`: less than or equal1364 - `in`: in1365 - `nin`: not in13661367 - `"eq"`13681369 - `"ne"`13701371 - `"gt"`13721373 - `"gte"`13741375 - `"lt"`13761377 - `"lte"`13781379 - `"in"`13801381 - `"nin"`13821383 - `value: string or number or boolean or array of string or number`13841385 The value to compare against the attribute key; supports string, number, or boolean types.13861387 - `string`13881389 - `number`13901391 - `boolean`13921393 - `array of string or number`13941395 - `string`13961397 - `number`13981399 - `CompoundFilter object { filters, type }`14001401 Combine multiple filters using `and` or `or`.14021403 - `filters: array of ComparisonFilter or unknown`14041405 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.14061407 - `ComparisonFilter object { key, type, value }`14081409 A filter used to compare a specified attribute key to a given value using a defined comparison operation.14101411 - `unknown`14121413 - `type: "and" or "or"`14141415 Type of operation: `and` or `or`.14161417 - `"and"`14181419 - `"or"`14201421 - `max_num_results: optional number`14221423 The maximum number of results to return. This number should be between 1 and 50 inclusive.14241425 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`14261427 Ranking options for search.14281429 - `hybrid_search: optional object { embedding_weight, text_weight }`14301431 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.14321433 - `embedding_weight: number`14341435 The weight of the embedding in the reciprocal ranking fusion.14361437 - `text_weight: number`14381439 The weight of the text in the reciprocal ranking fusion.14401441 - `ranker: optional "auto" or "default-2024-11-15"`14421443 The ranker to use for the file search.14441445 - `"auto"`14461447 - `"default-2024-11-15"`14481449 - `score_threshold: optional number`14501451 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.14521453 - `Computer object { type }`14541455 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).14561457 - `type: "computer"`14581459 The type of the computer tool. Always `computer`.14601461 - `"computer"`14621463 - `ComputerUsePreview object { display_height, display_width, environment, type }`14641465 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).14661467 - `display_height: number`14681469 The height of the computer display.14701471 - `display_width: number`14721473 The width of the computer display.14741475 - `environment: "windows" or "mac" or "linux" or 2 more`14761477 The type of computer environment to control.14781479 - `"windows"`14801481 - `"mac"`14821483 - `"linux"`14841485 - `"ubuntu"`14861487 - `"browser"`14881489 - `type: "computer_use_preview"`14901491 The type of the computer use tool. Always `computer_use_preview`.14921493 - `"computer_use_preview"`14941495 - `WebSearch object { type, external_web_access, filters, 2 more }`14961497 Search the Internet for sources related to the prompt. Learn more about the1498 [web search tool](/api/docs/guides/tools-web-search).14991500 - `type: "web_search" or "web_search_2025_08_26"`15011502 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.15031504 - `"web_search"`15051506 - `"web_search_2025_08_26"`15071508 - `external_web_access: optional boolean`15091510 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.15111512 - `filters: optional object { allowed_domains } or null`15131514 Filters for the search.15151516 - `allowed_domains: optional array of string or null`15171518 Allowed domains for the search. If not provided, all domains are allowed.1519 Subdomains of the provided domains are allowed as well.15201521 Example: `["pubmed.ncbi.nlm.nih.gov"]`15221523 - `search_context_size: optional "low" or "medium" or "high"`15241525 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.15261527 - `"low"`15281529 - `"medium"`15301531 - `"high"`15321533 - `user_location: optional object { city, country, region, 2 more } or null`15341535 The approximate location of the user.15361537 - `city: optional string or null`15381539 Free text input for the city of the user, e.g. `San Francisco`.15401541 - `country: optional string or null`15421543 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.15441545 - `region: optional string or null`15461547 Free text input for the region of the user, e.g. `California`.15481549 - `timezone: optional string or null`15501551 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.15521553 - `type: optional "approximate"`15541555 The type of location approximation. Always `approximate`.15561557 - `"approximate"`15581559 - `Mcp object { server_label, type, allowed_callers, 9 more }`15601561 Give the model access to additional tools via remote Model Context Protocol1562 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).15631564 - `server_label: string`15651566 A label for this MCP server, used to identify it in tool calls.15671568 - `type: "mcp"`15691570 The type of the MCP tool. Always `mcp`.15711572 - `"mcp"`15731574 - `allowed_callers: optional array of "direct" or "programmatic" or null`15751576 The tool invocation context(s).15771578 - `"direct"`15791580 - `"programmatic"`15811582 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`15831584 List of allowed tool names or a filter object.15851586 - `McpAllowedTools = array of string`15871588 A string array of allowed tool names15891590 - `McpToolFilter object { read_only, tool_names }`15911592 A filter object to specify which tools are allowed.15931594 - `read_only: optional boolean`15951596 Indicates whether or not a tool modifies data or is read-only. If an1597 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1598 it will match this filter.15991600 - `tool_names: optional array of string`16011602 List of allowed tool names.16031604 - `authorization: optional string`16051606 An OAuth access token that can be used with a remote MCP server, either1607 with a custom MCP server URL or a service connector. Your application1608 must handle the OAuth authorization flow and provide the token here.16091610 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`16111612 Identifier for service connectors, like those available in ChatGPT. One of1613 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more1614 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).16151616 This field is deprecated for models released after September 1, 2026.1617 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to1618 connect through a Secure MCP Tunnel.16191620 Currently supported `connector_id` values are:16211622 - Dropbox: `connector_dropbox`1623 - Gmail: `connector_gmail`1624 - Google Calendar: `connector_googlecalendar`1625 - Google Drive: `connector_googledrive`1626 - Microsoft Teams: `connector_microsoftteams`1627 - Outlook Calendar: `connector_outlookcalendar`1628 - Outlook Email: `connector_outlookemail`1629 - SharePoint: `connector_sharepoint`16301631 - `"connector_dropbox"`16321633 - `"connector_gmail"`16341635 - `"connector_googlecalendar"`16361637 - `"connector_googledrive"`16381639 - `"connector_microsoftteams"`16401641 - `"connector_outlookcalendar"`16421643 - `"connector_outlookemail"`16441645 - `"connector_sharepoint"`16461647 - `defer_loading: optional boolean`16481649 Whether this MCP tool is deferred and discovered via tool search.16501651 - `headers: optional map[string] or null`16521653 Optional HTTP headers to send to the MCP server. Use for authentication1654 or other purposes.16551656 - `require_approval: optional object { always, never } or "always" or "never" or null`16571658 Specify which of the MCP server's tools require approval.16591660 - `McpToolApprovalFilter object { always, never }`16611662 Specify which of the MCP server's tools require approval. Can be1663 `always`, `never`, or a filter object associated with tools1664 that require approval.16651666 - `always: optional object { read_only, tool_names }`16671668 A filter object to specify which tools are allowed.16691670 - `read_only: optional boolean`16711672 Indicates whether or not a tool modifies data or is read-only. If an1673 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1674 it will match this filter.16751676 - `tool_names: optional array of string`16771678 List of allowed tool names.16791680 - `never: optional object { read_only, tool_names }`16811682 A filter object to specify which tools are allowed.16831684 - `read_only: optional boolean`16851686 Indicates whether or not a tool modifies data or is read-only. If an1687 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1688 it will match this filter.16891690 - `tool_names: optional array of string`16911692 List of allowed tool names.16931694 - `McpToolApprovalSetting = "always" or "never"`16951696 Specify a single approval policy for all tools. One of `always` or1697 `never`. When set to `always`, all tools will require approval. When1698 set to `never`, all tools will not require approval.16991700 - `"always"`17011702 - `"never"`17031704 - `server_description: optional string`17051706 Optional description of the MCP server, used to provide more context.17071708 - `server_url: optional string`17091710 The URL for the MCP server. One of `server_url`, `connector_id`, or1711 `tunnel_id` must be provided.17121713 - `tunnel_id: optional string`17141715 The Secure MCP Tunnel ID to use instead of a direct server URL. One of1716 `server_url`, `connector_id`, or `tunnel_id` must be provided.17171718 - `CodeInterpreter object { container, type, allowed_callers }`17191720 A tool that runs Python code to help generate a response to a prompt.17211722 - `container: string or object { type, file_ids, memory_limit, network_policy }`17231724 The code interpreter container. Can be a container ID or an object that1725 specifies uploaded file IDs to make available to your code, along with an1726 optional `memory_limit` setting.17271728 - `string`17291730 The container ID.17311732 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`17331734 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.17351736 - `type: "auto"`17371738 Always `auto`.17391740 - `"auto"`17411742 - `file_ids: optional array of string`17431744 An optional list of uploaded files to make available to your code.17451746 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`17471748 The memory limit for the code interpreter container.17491750 - `"1g"`17511752 - `"4g"`17531754 - `"16g"`17551756 - `"64g"`17571758 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`17591760 Network access policy for the container.17611762 - `ContainerNetworkPolicyDisabled object { type }`17631764 - `type: "disabled"`17651766 Disable outbound network access. Always `disabled`.17671768 - `"disabled"`17691770 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`17711772 - `allowed_domains: array of string`17731774 A list of allowed domains when type is `allowlist`.17751776 - `type: "allowlist"`17771778 Allow outbound network access only to specified domains. Always `allowlist`.17791780 - `"allowlist"`17811782 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`17831784 Optional domain-scoped secrets for allowlisted domains.17851786 - `domain: string`17871788 The domain associated with the secret.17891790 - `name: string`17911792 The name of the secret to inject for the domain.17931794 - `value: string`17951796 The secret value to inject for the domain.17971798 - `type: "code_interpreter"`17991800 The type of the code interpreter tool. Always `code_interpreter`.18011802 - `"code_interpreter"`18031804 - `allowed_callers: optional array of "direct" or "programmatic" or null`18051806 The tool invocation context(s).18071808 - `"direct"`18091810 - `"programmatic"`18111812 - `ProgrammaticToolCalling object { type }`18131814 - `type: "programmatic_tool_calling"`18151816 The type of the tool. Always `programmatic_tool_calling`.18171818 - `"programmatic_tool_calling"`18191820 - `ImageGeneration object { type, action, background, 9 more }`18211822 A tool that generates images using the GPT image models.18231824 - `type: "image_generation"`18251826 The type of the image generation tool. Always `image_generation`.18271828 - `"image_generation"`18291830 - `action: optional "generate" or "edit" or "auto"`18311832 Whether to generate a new image or edit an existing image. Default: `auto`.18331834 - `"generate"`18351836 - `"edit"`18371838 - `"auto"`18391840 - `background: optional "transparent" or "opaque" or "auto"`18411842 Set the background of the generated image. One of `transparent`, `opaque`,1843 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including1844 their `2026-09-08` snapshots, support `opaque` and `transparent`1845 backgrounds. Transparent backgrounds are available for supported GPT Image1846 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in1847 preview. When using `transparent`, set the output format to `png` or `webp`.1848 Default: `auto`.18491850 - `"transparent"`18511852 - `"opaque"`18531854 - `"auto"`18551856 - `input_fidelity: optional "high" or "low" or null`18571858 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`.18591860 - `"high"`18611862 - `"low"`18631864 - `input_image_mask: optional object { file_id, image_url }`18651866 Optional mask for inpainting. Contains `image_url`1867 (string, optional) and `file_id` (string, optional).18681869 - `file_id: optional string`18701871 File ID for the mask image.18721873 - `image_url: optional string`18741875 Base64-encoded mask image.18761877 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`18781879 The image generation model to use. One of `gpt-image-1`,1880 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1881 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1882 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1883 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1884 `gpt-image-1`.18851886 - `string`18871888 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`18891890 The image generation model to use. One of `gpt-image-1`,1891 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1892 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1893 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1894 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1895 `gpt-image-1`.18961897 - `"gpt-image-1"`18981899 - `"gpt-image-1-mini"`19001901 - `"gpt-image-1.5"`19021903 - `"gpt-image-2"`19041905 - `"gpt-image-2-2026-04-21"`19061907 - `"gpt-image-2.5-sunburst"`19081909 - `"gpt-image-2.5-sunburst-2026-09-08"`19101911 - `"gpt-image-2.5-flare"`19121913 - `"gpt-image-2.5-flare-2026-09-08"`19141915 - `moderation: optional "auto" or "low"`19161917 Moderation level for the generated image. Default: `auto`.19181919 - `"auto"`19201921 - `"low"`19221923 - `output_compression: optional number`19241925 Compression level for the output image. Default: 100.19261927 - `output_format: optional "png" or "webp" or "jpeg"`19281929 The output format of the generated image. One of `png`, `webp`, or1930 `jpeg`. Default: `png`.19311932 - `"png"`19331934 - `"webp"`19351936 - `"jpeg"`19371938 - `partial_images: optional number`19391940 Number of partial images to generate in streaming mode, from 0 (default value) to 3.19411942 - `quality: optional "low" or "medium" or "high" or 3 more`19431944 The quality of the generated image. The GPT image models support `low`,1945 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,1946 including their `2026-09-08` snapshots, also support `xhigh` and `max`.1947 Default: `auto`.19481949 - `"low"`19501951 - `"medium"`19521953 - `"high"`19541955 - `"xhigh"`19561957 - `"max"`19581959 - `"auto"`19601961 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`19621963 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.19641965 - `string`19661967 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`19681969 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.19701971 - `"1024x1024"`19721973 - `"1024x1536"`19741975 - `"1536x1024"`19761977 - `"auto"`19781979 - `LocalShell object { type }`19801981 A tool that allows the model to execute shell commands in a local environment.19821983 - `type: "local_shell"`19841985 The type of the local shell tool. Always `local_shell`.19861987 - `"local_shell"`19881989 - `Shell object { type, allowed_callers, environment }`19901991 A tool that allows the model to execute shell commands.19921993 - `type: "shell"`19941995 The type of the shell tool. Always `shell`.19961997 - `"shell"`19981999 - `allowed_callers: optional array of "direct" or "programmatic" or null`20002001 The tool invocation context(s).20022003 - `"direct"`20042005 - `"programmatic"`20062007 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`20082009 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`20102011 - `type: "container_auto"`20122013 Automatically creates a container for this request20142015 - `"container_auto"`20162017 - `file_ids: optional array of string`20182019 An optional list of uploaded files to make available to your code.20202021 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`20222023 The memory limit for the container.20242025 - `"1g"`20262027 - `"4g"`20282029 - `"16g"`20302031 - `"64g"`20322033 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`20342035 Network access policy for the container.20362037 - `ContainerNetworkPolicyDisabled object { type }`20382039 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`20402041 - `skills: optional array of SkillReference or InlineSkill`20422043 An optional list of skills referenced by id or inline data.20442045 - `SkillReference object { skill_id, type, version }`20462047 - `skill_id: string`20482049 The ID of the referenced skill.20502051 - `type: "skill_reference"`20522053 References a skill created with the /v1/skills endpoint.20542055 - `"skill_reference"`20562057 - `version: optional string`20582059 Optional skill version. Use a positive integer or 'latest'. Omit for default.20602061 - `InlineSkill object { description, name, source, type }`20622063 - `description: string`20642065 The description of the skill.20662067 - `name: string`20682069 The name of the skill.20702071 - `source: InlineSkillSource`20722073 Inline skill payload20742075 - `data: string`20762077 Base64-encoded skill zip bundle.20782079 - `media_type: "application/zip"`20802081 The media type of the inline skill payload. Must be `application/zip`.20822083 - `"application/zip"`20842085 - `type: "base64"`20862087 The type of the inline skill source. Must be `base64`.20882089 - `"base64"`20902091 - `type: "inline"`20922093 Defines an inline skill for this request.20942095 - `"inline"`20962097 - `LocalEnvironment object { type, skills }`20982099 - `type: "local"`21002101 Use a local computer environment.21022103 - `"local"`21042105 - `skills: optional array of LocalSkill`21062107 An optional list of skills.21082109 - `description: string`21102111 The description of the skill.21122113 - `name: string`21142115 The name of the skill.21162117 - `path: string`21182119 The path to the directory containing the skill.21202121 - `ContainerReference object { container_id, type }`21222123 - `container_id: string`21242125 The ID of the referenced container.21262127 - `type: "container_reference"`21282129 References a container created with the /v1/containers endpoint21302131 - `"container_reference"`21322133 - `Custom object { name, type, allowed_callers, 4 more }`21342135 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)21362137 - `name: string`21382139 The name of the custom tool, used to identify it in tool calls.21402141 - `type: "custom"`21422143 The type of the custom tool. Always `custom`.21442145 - `"custom"`21462147 - `allowed_callers: optional array of "direct" or "programmatic" or null`21482149 The tool invocation context(s).21502151 - `"direct"`21522153 - `"programmatic"`21542155 - `async: optional boolean`21562157 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.21582159 - `defer_loading: optional boolean`21602161 Whether this tool should be deferred and discovered via tool search.21622163 - `description: optional string`21642165 Optional description of the custom tool, used to provide more context.21662167 - `format: optional CustomToolInputFormat`21682169 The input format for the custom tool. Default is unconstrained text.21702171 - `Text object { type }`21722173 Unconstrained free-form text.21742175 - `type: "text"`21762177 Unconstrained text format. Always `text`.21782179 - `"text"`21802181 - `Grammar object { definition, syntax, type }`21822183 A grammar defined by the user.21842185 - `definition: string`21862187 The grammar definition.21882189 - `syntax: "lark" or "regex"`21902191 The syntax of the grammar definition. One of `lark` or `regex`.21922193 - `"lark"`21942195 - `"regex"`21962197 - `type: "grammar"`21982199 Grammar format. Always `grammar`.22002201 - `"grammar"`22022203 - `Namespace object { description, name, tools, type }`22042205 Groups function/custom tools under a shared namespace.22062207 - `description: string`22082209 A description of the namespace shown to the model.22102211 - `name: string`22122213 The namespace name used in tool calls (for example, `crm`).22142215 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`22162217 The function/custom tools available inside this namespace.22182219 - `Function object { name, type, allowed_callers, 6 more }`22202221 - `name: string`22222223 - `type: "function"`22242225 - `"function"`22262227 - `allowed_callers: optional array of "direct" or "programmatic" or null`22282229 The tool invocation context(s).22302231 - `"direct"`22322233 - `"programmatic"`22342235 - `async: optional boolean`22362237 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.22382239 - `defer_loading: optional boolean`22402241 Whether this function should be deferred and discovered via tool search.22422243 - `description: optional string or null`22442245 - `output_schema: optional map[unknown] or null`22462247 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.22482249 - `parameters: optional unknown or null`22502251 - `strict: optional boolean or null`22522253 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.22542255 - `Custom object { name, type, allowed_callers, 4 more }`22562257 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)22582259 - `name: string`22602261 The name of the custom tool, used to identify it in tool calls.22622263 - `type: "custom"`22642265 The type of the custom tool. Always `custom`.22662267 - `"custom"`22682269 - `allowed_callers: optional array of "direct" or "programmatic" or null`22702271 The tool invocation context(s).22722273 - `"direct"`22742275 - `"programmatic"`22762277 - `async: optional boolean`22782279 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.22802281 - `defer_loading: optional boolean`22822283 Whether this tool should be deferred and discovered via tool search.22842285 - `description: optional string`22862287 Optional description of the custom tool, used to provide more context.22882289 - `format: optional CustomToolInputFormat`22902291 The input format for the custom tool. Default is unconstrained text.22922293 - `type: "namespace"`22942295 The type of the tool. Always `namespace`.22962297 - `"namespace"`22982299 - `ToolSearch object { type, description, execution, parameters }`23002301 Hosted or BYOT tool search configuration for deferred tools.23022303 - `type: "tool_search"`23042305 The type of the tool. Always `tool_search`.23062307 - `"tool_search"`23082309 - `description: optional string or null`23102311 Description shown to the model for a client-executed tool search tool.23122313 - `execution: optional "server" or "client"`23142315 Whether tool search is executed by the server or by the client.23162317 - `"server"`23182319 - `"client"`23202321 - `parameters: optional unknown or null`23222323 Parameter schema for a client-executed tool search tool.23242325 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`23262327 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).23282329 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`23302331 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.23322333 - `"web_search_preview"`23342335 - `"web_search_preview_2025_03_11"`23362337 - `search_content_types: optional array of "text" or "image"`23382339 - `"text"`23402341 - `"image"`23422343 - `search_context_size: optional "low" or "medium" or "high"`23442345 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.23462347 - `"low"`23482349 - `"medium"`23502351 - `"high"`23522353 - `user_location: optional object { type, city, country, 2 more } or null`23542355 The user's location.23562357 - `type: "approximate"`23582359 The type of location approximation. Always `approximate`.23602361 - `"approximate"`23622363 - `city: optional string or null`23642365 Free text input for the city of the user, e.g. `San Francisco`.23662367 - `country: optional string or null`23682369 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.23702371 - `region: optional string or null`23722373 Free text input for the region of the user, e.g. `California`.23742375 - `timezone: optional string or null`23762377 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.23782379 - `ApplyPatch object { type, allowed_callers }`23802381 Allows the assistant to create, delete, or update files using unified diffs.23822383 - `type: "apply_patch"`23842385 The type of the tool. Always `apply_patch`.23862387 - `"apply_patch"`23882389 - `allowed_callers: optional array of "direct" or "programmatic" or null`23902391 The tool invocation context(s).23922393 - `"direct"`23942395 - `"programmatic"`23962397 - `type: "tool_search_output"`23982399 The item type. Always `tool_search_output`.24002401 - `"tool_search_output"`24022403 - `id: optional string or null`24042405 The unique ID of this tool search output.24062407 - `call_id: optional string or null`24082409 The unique ID of the tool search call generated by the model.24102411 - `execution: optional "server" or "client"`24122413 Whether tool search was executed by the server or by the client.24142415 - `"server"`24162417 - `"client"`24182419 - `status: optional "in_progress" or "completed" or "incomplete" or null`24202421 The status of the tool search output.24222423 - `"in_progress"`24242425 - `"completed"`24262427 - `"incomplete"`24282429 - `AdditionalTools object { role, tools, type, id }`24302431 - `role: "developer"`24322433 The role that provided the additional tools. Only `developer` is supported.24342435 - `"developer"`24362437 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`24382439 A list of additional tools made available at this item.24402441 - `Function object { name, parameters, strict, 6 more }`24422443 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).24442445 - `name: string`24462447 The name of the function to call.24482449 - `parameters: map[unknown] or null`24502451 A JSON schema object describing the parameters of the function.24522453 - `strict: boolean or null`24542455 Whether strict parameter validation is enforced for this function tool.24562457 - `type: "function"`24582459 The type of the function tool. Always `function`.24602461 - `"function"`24622463 - `allowed_callers: optional array of "direct" or "programmatic" or null`24642465 The tool invocation context(s).24662467 - `"direct"`24682469 - `"programmatic"`24702471 - `async: optional boolean`24722473 - `defer_loading: optional boolean`24742475 Whether this function is deferred and loaded via tool search.24762477 - `description: optional string or null`24782479 A description of the function. Used by the model to determine whether or not to call the function.24802481 - `output_schema: optional map[unknown] or null`24822483 A JSON schema object describing the JSON value encoded in string outputs for this function.24842485 - `FileSearch object { type, vector_store_ids, filters, 2 more }`24862487 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).24882489 - `type: "file_search"`24902491 The type of the file search tool. Always `file_search`.24922493 - `"file_search"`24942495 - `vector_store_ids: array of string`24962497 The IDs of the vector stores to search.24982499 - `filters: optional ComparisonFilter or CompoundFilter or null`25002501 A filter to apply.25022503 - `ComparisonFilter object { key, type, value }`25042505 A filter used to compare a specified attribute key to a given value using a defined comparison operation.25062507 - `CompoundFilter object { filters, type }`25082509 Combine multiple filters using `and` or `or`.25102511 - `max_num_results: optional number`25122513 The maximum number of results to return. This number should be between 1 and 50 inclusive.25142515 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`25162517 Ranking options for search.25182519 - `hybrid_search: optional object { embedding_weight, text_weight }`25202521 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.25222523 - `embedding_weight: number`25242525 The weight of the embedding in the reciprocal ranking fusion.25262527 - `text_weight: number`25282529 The weight of the text in the reciprocal ranking fusion.25302531 - `ranker: optional "auto" or "default-2024-11-15"`25322533 The ranker to use for the file search.25342535 - `"auto"`25362537 - `"default-2024-11-15"`25382539 - `score_threshold: optional number`25402541 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.25422543 - `Computer object { type }`25442545 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).25462547 - `type: "computer"`25482549 The type of the computer tool. Always `computer`.25502551 - `"computer"`25522553 - `ComputerUsePreview object { display_height, display_width, environment, type }`25542555 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).25562557 - `display_height: number`25582559 The height of the computer display.25602561 - `display_width: number`25622563 The width of the computer display.25642565 - `environment: "windows" or "mac" or "linux" or 2 more`25662567 The type of computer environment to control.25682569 - `"windows"`25702571 - `"mac"`25722573 - `"linux"`25742575 - `"ubuntu"`25762577 - `"browser"`25782579 - `type: "computer_use_preview"`25802581 The type of the computer use tool. Always `computer_use_preview`.25822583 - `"computer_use_preview"`25842585 - `WebSearch object { type, external_web_access, filters, 2 more }`25862587 Search the Internet for sources related to the prompt. Learn more about the2588 [web search tool](/api/docs/guides/tools-web-search).25892590 - `type: "web_search" or "web_search_2025_08_26"`25912592 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.25932594 - `"web_search"`25952596 - `"web_search_2025_08_26"`25972598 - `external_web_access: optional boolean`25992600 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.26012602 - `filters: optional object { allowed_domains } or null`26032604 Filters for the search.26052606 - `allowed_domains: optional array of string or null`26072608 Allowed domains for the search. If not provided, all domains are allowed.2609 Subdomains of the provided domains are allowed as well.26102611 Example: `["pubmed.ncbi.nlm.nih.gov"]`26122613 - `search_context_size: optional "low" or "medium" or "high"`26142615 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.26162617 - `"low"`26182619 - `"medium"`26202621 - `"high"`26222623 - `user_location: optional object { city, country, region, 2 more } or null`26242625 The approximate location of the user.26262627 - `city: optional string or null`26282629 Free text input for the city of the user, e.g. `San Francisco`.26302631 - `country: optional string or null`26322633 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.26342635 - `region: optional string or null`26362637 Free text input for the region of the user, e.g. `California`.26382639 - `timezone: optional string or null`26402641 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.26422643 - `type: optional "approximate"`26442645 The type of location approximation. Always `approximate`.26462647 - `"approximate"`26482649 - `Mcp object { server_label, type, allowed_callers, 9 more }`26502651 Give the model access to additional tools via remote Model Context Protocol2652 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).26532654 - `server_label: string`26552656 A label for this MCP server, used to identify it in tool calls.26572658 - `type: "mcp"`26592660 The type of the MCP tool. Always `mcp`.26612662 - `"mcp"`26632664 - `allowed_callers: optional array of "direct" or "programmatic" or null`26652666 The tool invocation context(s).26672668 - `"direct"`26692670 - `"programmatic"`26712672 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`26732674 List of allowed tool names or a filter object.26752676 - `McpAllowedTools = array of string`26772678 A string array of allowed tool names26792680 - `McpToolFilter object { read_only, tool_names }`26812682 A filter object to specify which tools are allowed.26832684 - `read_only: optional boolean`26852686 Indicates whether or not a tool modifies data or is read-only. If an2687 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2688 it will match this filter.26892690 - `tool_names: optional array of string`26912692 List of allowed tool names.26932694 - `authorization: optional string`26952696 An OAuth access token that can be used with a remote MCP server, either2697 with a custom MCP server URL or a service connector. Your application2698 must handle the OAuth authorization flow and provide the token here.26992700 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`27012702 Identifier for service connectors, like those available in ChatGPT. One of2703 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more2704 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).27052706 This field is deprecated for models released after September 1, 2026.2707 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to2708 connect through a Secure MCP Tunnel.27092710 Currently supported `connector_id` values are:27112712 - Dropbox: `connector_dropbox`2713 - Gmail: `connector_gmail`2714 - Google Calendar: `connector_googlecalendar`2715 - Google Drive: `connector_googledrive`2716 - Microsoft Teams: `connector_microsoftteams`2717 - Outlook Calendar: `connector_outlookcalendar`2718 - Outlook Email: `connector_outlookemail`2719 - SharePoint: `connector_sharepoint`27202721 - `"connector_dropbox"`27222723 - `"connector_gmail"`27242725 - `"connector_googlecalendar"`27262727 - `"connector_googledrive"`27282729 - `"connector_microsoftteams"`27302731 - `"connector_outlookcalendar"`27322733 - `"connector_outlookemail"`27342735 - `"connector_sharepoint"`27362737 - `defer_loading: optional boolean`27382739 Whether this MCP tool is deferred and discovered via tool search.27402741 - `headers: optional map[string] or null`27422743 Optional HTTP headers to send to the MCP server. Use for authentication2744 or other purposes.27452746 - `require_approval: optional object { always, never } or "always" or "never" or null`27472748 Specify which of the MCP server's tools require approval.27492750 - `McpToolApprovalFilter object { always, never }`27512752 Specify which of the MCP server's tools require approval. Can be2753 `always`, `never`, or a filter object associated with tools2754 that require approval.27552756 - `always: optional object { read_only, tool_names }`27572758 A filter object to specify which tools are allowed.27592760 - `read_only: optional boolean`27612762 Indicates whether or not a tool modifies data or is read-only. If an2763 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2764 it will match this filter.27652766 - `tool_names: optional array of string`27672768 List of allowed tool names.27692770 - `never: optional object { read_only, tool_names }`27712772 A filter object to specify which tools are allowed.27732774 - `read_only: optional boolean`27752776 Indicates whether or not a tool modifies data or is read-only. If an2777 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2778 it will match this filter.27792780 - `tool_names: optional array of string`27812782 List of allowed tool names.27832784 - `McpToolApprovalSetting = "always" or "never"`27852786 Specify a single approval policy for all tools. One of `always` or2787 `never`. When set to `always`, all tools will require approval. When2788 set to `never`, all tools will not require approval.27892790 - `"always"`27912792 - `"never"`27932794 - `server_description: optional string`27952796 Optional description of the MCP server, used to provide more context.27972798 - `server_url: optional string`27992800 The URL for the MCP server. One of `server_url`, `connector_id`, or2801 `tunnel_id` must be provided.28022803 - `tunnel_id: optional string`28042805 The Secure MCP Tunnel ID to use instead of a direct server URL. One of2806 `server_url`, `connector_id`, or `tunnel_id` must be provided.28072808 - `CodeInterpreter object { container, type, allowed_callers }`28092810 A tool that runs Python code to help generate a response to a prompt.28112812 - `container: string or object { type, file_ids, memory_limit, network_policy }`28132814 The code interpreter container. Can be a container ID or an object that2815 specifies uploaded file IDs to make available to your code, along with an2816 optional `memory_limit` setting.28172818 - `string`28192820 The container ID.28212822 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`28232824 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.28252826 - `type: "auto"`28272828 Always `auto`.28292830 - `"auto"`28312832 - `file_ids: optional array of string`28332834 An optional list of uploaded files to make available to your code.28352836 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`28372838 The memory limit for the code interpreter container.28392840 - `"1g"`28412842 - `"4g"`28432844 - `"16g"`28452846 - `"64g"`28472848 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`28492850 Network access policy for the container.28512852 - `ContainerNetworkPolicyDisabled object { type }`28532854 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`28552856 - `type: "code_interpreter"`28572858 The type of the code interpreter tool. Always `code_interpreter`.28592860 - `"code_interpreter"`28612862 - `allowed_callers: optional array of "direct" or "programmatic" or null`28632864 The tool invocation context(s).28652866 - `"direct"`28672868 - `"programmatic"`28692870 - `ProgrammaticToolCalling object { type }`28712872 - `type: "programmatic_tool_calling"`28732874 The type of the tool. Always `programmatic_tool_calling`.28752876 - `"programmatic_tool_calling"`28772878 - `ImageGeneration object { type, action, background, 9 more }`28792880 A tool that generates images using the GPT image models.28812882 - `type: "image_generation"`28832884 The type of the image generation tool. Always `image_generation`.28852886 - `"image_generation"`28872888 - `action: optional "generate" or "edit" or "auto"`28892890 Whether to generate a new image or edit an existing image. Default: `auto`.28912892 - `"generate"`28932894 - `"edit"`28952896 - `"auto"`28972898 - `background: optional "transparent" or "opaque" or "auto"`28992900 Set the background of the generated image. One of `transparent`, `opaque`,2901 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including2902 their `2026-09-08` snapshots, support `opaque` and `transparent`2903 backgrounds. Transparent backgrounds are available for supported GPT Image2904 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in2905 preview. When using `transparent`, set the output format to `png` or `webp`.2906 Default: `auto`.29072908 - `"transparent"`29092910 - `"opaque"`29112912 - `"auto"`29132914 - `input_fidelity: optional "high" or "low" or null`29152916 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`.29172918 - `"high"`29192920 - `"low"`29212922 - `input_image_mask: optional object { file_id, image_url }`29232924 Optional mask for inpainting. Contains `image_url`2925 (string, optional) and `file_id` (string, optional).29262927 - `file_id: optional string`29282929 File ID for the mask image.29302931 - `image_url: optional string`29322933 Base64-encoded mask image.29342935 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`29362937 The image generation model to use. One of `gpt-image-1`,2938 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2939 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2940 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2941 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2942 `gpt-image-1`.29432944 - `string`29452946 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`29472948 The image generation model to use. One of `gpt-image-1`,2949 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2950 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2951 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2952 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2953 `gpt-image-1`.29542955 - `"gpt-image-1"`29562957 - `"gpt-image-1-mini"`29582959 - `"gpt-image-1.5"`29602961 - `"gpt-image-2"`29622963 - `"gpt-image-2-2026-04-21"`29642965 - `"gpt-image-2.5-sunburst"`29662967 - `"gpt-image-2.5-sunburst-2026-09-08"`29682969 - `"gpt-image-2.5-flare"`29702971 - `"gpt-image-2.5-flare-2026-09-08"`29722973 - `moderation: optional "auto" or "low"`29742975 Moderation level for the generated image. Default: `auto`.29762977 - `"auto"`29782979 - `"low"`29802981 - `output_compression: optional number`29822983 Compression level for the output image. Default: 100.29842985 - `output_format: optional "png" or "webp" or "jpeg"`29862987 The output format of the generated image. One of `png`, `webp`, or2988 `jpeg`. Default: `png`.29892990 - `"png"`29912992 - `"webp"`29932994 - `"jpeg"`29952996 - `partial_images: optional number`29972998 Number of partial images to generate in streaming mode, from 0 (default value) to 3.29993000 - `quality: optional "low" or "medium" or "high" or 3 more`30013002 The quality of the generated image. The GPT image models support `low`,3003 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,3004 including their `2026-09-08` snapshots, also support `xhigh` and `max`.3005 Default: `auto`.30063007 - `"low"`30083009 - `"medium"`30103011 - `"high"`30123013 - `"xhigh"`30143015 - `"max"`30163017 - `"auto"`30183019 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`30203021 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.30223023 - `string`30243025 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`30263027 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.30283029 - `"1024x1024"`30303031 - `"1024x1536"`30323033 - `"1536x1024"`30343035 - `"auto"`30363037 - `LocalShell object { type }`30383039 A tool that allows the model to execute shell commands in a local environment.30403041 - `type: "local_shell"`30423043 The type of the local shell tool. Always `local_shell`.30443045 - `"local_shell"`30463047 - `Shell object { type, allowed_callers, environment }`30483049 A tool that allows the model to execute shell commands.30503051 - `type: "shell"`30523053 The type of the shell tool. Always `shell`.30543055 - `"shell"`30563057 - `allowed_callers: optional array of "direct" or "programmatic" or null`30583059 The tool invocation context(s).30603061 - `"direct"`30623063 - `"programmatic"`30643065 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`30663067 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`30683069 - `LocalEnvironment object { type, skills }`30703071 - `ContainerReference object { container_id, type }`30723073 - `Custom object { name, type, allowed_callers, 4 more }`30743075 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)30763077 - `name: string`30783079 The name of the custom tool, used to identify it in tool calls.30803081 - `type: "custom"`30823083 The type of the custom tool. Always `custom`.30843085 - `"custom"`30863087 - `allowed_callers: optional array of "direct" or "programmatic" or null`30883089 The tool invocation context(s).30903091 - `"direct"`30923093 - `"programmatic"`30943095 - `async: optional boolean`30963097 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.30983099 - `defer_loading: optional boolean`31003101 Whether this tool should be deferred and discovered via tool search.31023103 - `description: optional string`31043105 Optional description of the custom tool, used to provide more context.31063107 - `format: optional CustomToolInputFormat`31083109 The input format for the custom tool. Default is unconstrained text.31103111 - `Namespace object { description, name, tools, type }`31123113 Groups function/custom tools under a shared namespace.31143115 - `description: string`31163117 A description of the namespace shown to the model.31183119 - `name: string`31203121 The namespace name used in tool calls (for example, `crm`).31223123 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`31243125 The function/custom tools available inside this namespace.31263127 - `Function object { name, type, allowed_callers, 6 more }`31283129 - `name: string`31303131 - `type: "function"`31323133 - `"function"`31343135 - `allowed_callers: optional array of "direct" or "programmatic" or null`31363137 The tool invocation context(s).31383139 - `"direct"`31403141 - `"programmatic"`31423143 - `async: optional boolean`31443145 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.31463147 - `defer_loading: optional boolean`31483149 Whether this function should be deferred and discovered via tool search.31503151 - `description: optional string or null`31523153 - `output_schema: optional map[unknown] or null`31543155 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.31563157 - `parameters: optional unknown or null`31583159 - `strict: optional boolean or null`31603161 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.31623163 - `Custom object { name, type, allowed_callers, 4 more }`31643165 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)31663167 - `name: string`31683169 The name of the custom tool, used to identify it in tool calls.31703171 - `type: "custom"`31723173 The type of the custom tool. Always `custom`.31743175 - `"custom"`31763177 - `allowed_callers: optional array of "direct" or "programmatic" or null`31783179 The tool invocation context(s).31803181 - `"direct"`31823183 - `"programmatic"`31843185 - `async: optional boolean`31863187 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.31883189 - `defer_loading: optional boolean`31903191 Whether this tool should be deferred and discovered via tool search.31923193 - `description: optional string`31943195 Optional description of the custom tool, used to provide more context.31963197 - `format: optional CustomToolInputFormat`31983199 The input format for the custom tool. Default is unconstrained text.32003201 - `type: "namespace"`32023203 The type of the tool. Always `namespace`.32043205 - `"namespace"`32063207 - `ToolSearch object { type, description, execution, parameters }`32083209 Hosted or BYOT tool search configuration for deferred tools.32103211 - `type: "tool_search"`32123213 The type of the tool. Always `tool_search`.32143215 - `"tool_search"`32163217 - `description: optional string or null`32183219 Description shown to the model for a client-executed tool search tool.32203221 - `execution: optional "server" or "client"`32223223 Whether tool search is executed by the server or by the client.32243225 - `"server"`32263227 - `"client"`32283229 - `parameters: optional unknown or null`32303231 Parameter schema for a client-executed tool search tool.32323233 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`32343235 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).32363237 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`32383239 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.32403241 - `"web_search_preview"`32423243 - `"web_search_preview_2025_03_11"`32443245 - `search_content_types: optional array of "text" or "image"`32463247 - `"text"`32483249 - `"image"`32503251 - `search_context_size: optional "low" or "medium" or "high"`32523253 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.32543255 - `"low"`32563257 - `"medium"`32583259 - `"high"`32603261 - `user_location: optional object { type, city, country, 2 more } or null`32623263 The user's location.32643265 - `type: "approximate"`32663267 The type of location approximation. Always `approximate`.32683269 - `"approximate"`32703271 - `city: optional string or null`32723273 Free text input for the city of the user, e.g. `San Francisco`.32743275 - `country: optional string or null`32763277 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.32783279 - `region: optional string or null`32803281 Free text input for the region of the user, e.g. `California`.32823283 - `timezone: optional string or null`32843285 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.32863287 - `ApplyPatch object { type, allowed_callers }`32883289 Allows the assistant to create, delete, or update files using unified diffs.32903291 - `type: "apply_patch"`32923293 The type of the tool. Always `apply_patch`.32943295 - `"apply_patch"`32963297 - `allowed_callers: optional array of "direct" or "programmatic" or null`32983299 The tool invocation context(s).33003301 - `"direct"`33023303 - `"programmatic"`33043305 - `type: "additional_tools"`33063307 The item type. Always `additional_tools`.33083309 - `"additional_tools"`33103311 - `id: optional string or null`33123313 The unique ID of this additional tools item.33143315 - `ConfigurationUpdate object { type, id, reasoning }`33163317 An update to the conversation's response configuration. The configuration3318 remains in effect for subsequent responses until it is replaced by another3319 configuration update.33203321 - `type: "configuration_update"`33223323 The item type. Always `configuration_update`.33243325 - `"configuration_update"`33263327 - `id: optional string or null`33283329 The unique ID of the configuration update item.33303331 - `reasoning: optional object { effort }`33323333 Updates to reasoning configuration. Only effort is supported.33343335 - `effort: optional ReasoningEffort or null`33363337 The reasoning effort to use for subsequent responses until another3338 configuration update replaces it.33393340 - `"none"`33413342 - `"minimal"`33433344 - `"low"`33453346 - `"medium"`33473348 - `"high"`33493350 - `"xhigh"`33513352 - `"max"`33533354 - `Reasoning object { id, summary, type, 3 more }`33553356 A description of the chain of thought used by a reasoning model while generating3357 a response. Be sure to include these items in your `input` to the Responses API3358 for subsequent turns of a conversation if you are manually3359 [managing context](/api/docs/guides/conversation-state).33603361 - `id: string`33623363 The unique identifier of the reasoning content.33643365 - `summary: array of SummaryTextContent`33663367 Reasoning summary content.33683369 - `text: string`33703371 A summary of the reasoning output from the model so far.33723373 - `type: "summary_text"`33743375 The type of the object. Always `summary_text`.33763377 - `"summary_text"`33783379 - `type: "reasoning"`33803381 The type of the object. Always `reasoning`.33823383 - `"reasoning"`33843385 - `content: optional array of object { text, type }`33863387 Reasoning text content.33883389 - `text: string`33903391 The reasoning text from the model.33923393 - `type: "reasoning_text"`33943395 The type of the reasoning text. Always `reasoning_text`.33963397 - `"reasoning_text"`33983399 - `encrypted_content: optional string or null`34003401 The encrypted content of the reasoning item. This is populated by default3402 for reasoning items returned by `POST /v1/responses` and WebSocket3403 `response.create` requests.34043405 When streaming, use the completed reasoning item and its3406 `encrypted_content` from the `response.output_item.done` event in3407 subsequent requests. The `encrypted_content` in3408 `response.output_item.added` may be incomplete. This is especially3409 important when `store` is `false` or when using Zero Data Retention.34103411 - `status: optional "in_progress" or "completed" or "incomplete"`34123413 The status of the item. One of `in_progress`, `completed`, or3414 `incomplete`. Populated when items are returned via API.34153416 - `"in_progress"`34173418 - `"completed"`34193420 - `"incomplete"`34213422 - `Compaction object { encrypted_content, type, id }`34233424 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).34253426 - `encrypted_content: string`34273428 The encrypted content of the compaction summary.34293430 - `type: "compaction"`34313432 The type of the item. Always `compaction`.34333434 - `"compaction"`34353436 - `id: optional string or null`34373438 The ID of the compaction item.34393440 - `ImageGenerationCall object { id, result, status, 7 more }`34413442 An image generation request made by the model.34433444 - `id: string`34453446 The unique ID of the image generation call.34473448 - `result: string or null`34493450 The generated image encoded in base64.34513452 - `status: "in_progress" or "completed" or "generating" or "failed"`34533454 The status of the image generation call.34553456 - `"in_progress"`34573458 - `"completed"`34593460 - `"generating"`34613462 - `"failed"`34633464 - `type: "image_generation_call"`34653466 The type of the image generation call. Always `image_generation_call`.34673468 - `"image_generation_call"`34693470 - `action: optional "generate" or "edit" or "auto" or null`34713472 The action used for image generation.34733474 - `"generate"`34753476 - `"edit"`34773478 - `"auto"`34793480 - `background: optional "transparent" or "opaque" or "auto" or null`34813482 The background setting used for generation.34833484 - `"transparent"`34853486 - `"opaque"`34873488 - `"auto"`34893490 - `output_format: optional "png" or "webp" or "jpeg" or null`34913492 The output format used for generation.34933494 - `"png"`34953496 - `"webp"`34973498 - `"jpeg"`34993500 - `quality: optional "low" or "medium" or "high" or 3 more or null`35013502 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.35033504 - `"low"`35053506 - `"medium"`35073508 - `"high"`35093510 - `"xhigh"`35113512 - `"max"`35133514 - `"auto"`35153516 - `revised_prompt: optional string or null`35173518 The prompt that was used after any model prompt rewriting.35193520 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`35213522 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.35233524 - `string`35253526 - `"1024x1024" or "1024x1536" or "1536x1024"`35273528 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.35293530 - `"1024x1024"`35313532 - `"1024x1536"`35333534 - `"1536x1024"`35353536 - `CodeInterpreterCall object { id, code, container_id, 3 more }`35373538 A tool call to run code.35393540 - `id: string`35413542 The unique ID of the code interpreter tool call.35433544 - `code: string or null`35453546 The code to run, or null if not available.35473548 - `container_id: string`35493550 The ID of the container used to run the code.35513552 - `outputs: array of object { logs, type } or object { type, url } or null`35533554 The outputs generated by the code interpreter, such as logs or images.3555 Can be null if no outputs are available.35563557 - `Logs object { logs, type }`35583559 The logs output from the code interpreter.35603561 - `logs: string`35623563 The logs output from the code interpreter.35643565 - `type: "logs"`35663567 The type of the output. Always `logs`.35683569 - `"logs"`35703571 - `Image object { type, url }`35723573 The image output from the code interpreter.35743575 - `type: "image"`35763577 The type of the output. Always `image`.35783579 - `"image"`35803581 - `url: string`35823583 The URL of the image output from the code interpreter.35843585 - `status: "in_progress" or "completed" or "incomplete" or 2 more`35863587 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.35883589 - `"in_progress"`35903591 - `"completed"`35923593 - `"incomplete"`35943595 - `"interpreting"`35963597 - `"failed"`35983599 - `type: "code_interpreter_call"`36003601 The type of the code interpreter tool call. Always `code_interpreter_call`.36023603 - `"code_interpreter_call"`36043605 - `LocalShellCall object { id, action, call_id, 2 more }`36063607 A tool call to run a command on the local shell.36083609 - `id: string`36103611 The unique ID of the local shell call.36123613 - `action: object { command, env, type, 3 more }`36143615 Execute a shell command on the server.36163617 - `command: array of string`36183619 The command to run.36203621 - `env: map[string]`36223623 Environment variables to set for the command.36243625 - `type: "exec"`36263627 The type of the local shell action. Always `exec`.36283629 - `"exec"`36303631 - `timeout_ms: optional number or null`36323633 Optional timeout in milliseconds for the command.36343635 - `user: optional string or null`36363637 Optional user to run the command as.36383639 - `working_directory: optional string or null`36403641 Optional working directory to run the command in.36423643 - `call_id: string`36443645 The unique ID of the local shell tool call generated by the model.36463647 - `status: "in_progress" or "completed" or "incomplete"`36483649 The status of the local shell call.36503651 - `"in_progress"`36523653 - `"completed"`36543655 - `"incomplete"`36563657 - `type: "local_shell_call"`36583659 The type of the local shell call. Always `local_shell_call`.36603661 - `"local_shell_call"`36623663 - `LocalShellCallOutput object { id, output, type, status }`36643665 The output of a local shell tool call.36663667 - `id: string`36683669 The unique ID of the local shell tool call generated by the model.36703671 - `output: string`36723673 A JSON string of the output of the local shell tool call.36743675 - `type: "local_shell_call_output"`36763677 The type of the local shell tool call output. Always `local_shell_call_output`.36783679 - `"local_shell_call_output"`36803681 - `status: optional "in_progress" or "completed" or "incomplete" or null`36823683 The status of the item. One of `in_progress`, `completed`, or `incomplete`.36843685 - `"in_progress"`36863687 - `"completed"`36883689 - `"incomplete"`36903691 - `ShellCall object { action, call_id, type, 4 more }`36923693 A tool representing a request to execute one or more shell commands.36943695 - `action: object { commands, max_output_length, timeout_ms }`36963697 The shell commands and limits that describe how to run the tool call.36983699 - `commands: array of string`37003701 Ordered shell commands for the execution environment to run.37023703 - `max_output_length: optional number or null`37043705 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.37063707 - `timeout_ms: optional number or null`37083709 Maximum wall-clock time in milliseconds to allow the shell commands to run.37103711 - `call_id: string`37123713 The unique ID of the shell tool call generated by the model.37143715 - `type: "shell_call"`37163717 The type of the item. Always `shell_call`.37183719 - `"shell_call"`37203721 - `id: optional string or null`37223723 The unique ID of the shell tool call. Populated when this item is returned via API.37243725 - `caller: optional object { type } or object { caller_id, type } or null`37263727 The execution context that produced this tool call.37283729 - `Direct object { type }`37303731 - `type: "direct"`37323733 The caller type. Always `direct`.37343735 - `"direct"`37363737 - `Program object { caller_id, type }`37383739 - `caller_id: string`37403741 The call ID of the program item that produced this tool call.37423743 - `type: "program"`37443745 The caller type. Always `program`.37463747 - `"program"`37483749 - `environment: optional LocalEnvironment or ContainerReference or null`37503751 The environment to execute the shell commands in.37523753 - `LocalEnvironment object { type, skills }`37543755 - `ContainerReference object { container_id, type }`37563757 - `status: optional "in_progress" or "completed" or "incomplete" or null`37583759 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.37603761 - `"in_progress"`37623763 - `"completed"`37643765 - `"incomplete"`37663767 - `ShellCallOutput object { call_id, output, type, 4 more }`37683769 The streamed output items emitted by a shell tool call.37703771 - `call_id: string`37723773 The unique ID of the shell tool call generated by the model.37743775 - `output: array of ResponseFunctionShellCallOutputContent`37763777 Captured chunks of stdout and stderr output, along with their associated outcomes.37783779 - `outcome: object { type } or object { exit_code, type }`37803781 The exit or timeout outcome associated with this shell call.37823783 - `Timeout object { type }`37843785 Indicates that the shell call exceeded its configured time limit.37863787 - `type: "timeout"`37883789 The outcome type. Always `timeout`.37903791 - `"timeout"`37923793 - `Exit object { exit_code, type }`37943795 Indicates that the shell commands finished and returned an exit code.37963797 - `exit_code: number`37983799 The exit code returned by the shell process.38003801 - `type: "exit"`38023803 The outcome type. Always `exit`.38043805 - `"exit"`38063807 - `stderr: string`38083809 Captured stderr output for the shell call.38103811 - `stdout: string`38123813 Captured stdout output for the shell call.38143815 - `type: "shell_call_output"`38163817 The type of the item. Always `shell_call_output`.38183819 - `"shell_call_output"`38203821 - `id: optional string or null`38223823 The unique ID of the shell tool call output. Populated when this item is returned via API.38243825 - `caller: optional object { type } or object { caller_id, type } or null`38263827 The execution context that produced this tool call.38283829 - `Direct object { type }`38303831 - `type: "direct"`38323833 The caller type. Always `direct`.38343835 - `"direct"`38363837 - `Program object { caller_id, type }`38383839 - `caller_id: string`38403841 The call ID of the program item that produced this tool call.38423843 - `type: "program"`38443845 The caller type. Always `program`.38463847 - `"program"`38483849 - `max_output_length: optional number or null`38503851 The maximum number of UTF-8 characters captured for this shell call's combined output.38523853 - `status: optional "in_progress" or "completed" or "incomplete" or null`38543855 The status of the shell call output.38563857 - `"in_progress"`38583859 - `"completed"`38603861 - `"incomplete"`38623863 - `ApplyPatchCall object { call_id, operation, status, 3 more }`38643865 A tool call representing a request to create, delete, or update files using diff patches.38663867 - `call_id: string`38683869 The unique ID of the apply patch tool call generated by the model.38703871 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`38723873 The specific create, delete, or update instruction for the apply_patch tool call.38743875 - `CreateFile object { diff, path, type }`38763877 Instruction for creating a new file via the apply_patch tool.38783879 - `diff: string`38803881 Unified diff content to apply when creating the file.38823883 - `path: string`38843885 Path of the file to create relative to the workspace root.38863887 - `type: "create_file"`38883889 The operation type. Always `create_file`.38903891 - `"create_file"`38923893 - `DeleteFile object { path, type }`38943895 Instruction for deleting an existing file via the apply_patch tool.38963897 - `path: string`38983899 Path of the file to delete relative to the workspace root.39003901 - `type: "delete_file"`39023903 The operation type. Always `delete_file`.39043905 - `"delete_file"`39063907 - `UpdateFile object { diff, path, type }`39083909 Instruction for updating an existing file via the apply_patch tool.39103911 - `diff: string`39123913 Unified diff content to apply to the existing file.39143915 - `path: string`39163917 Path of the file to update relative to the workspace root.39183919 - `type: "update_file"`39203921 The operation type. Always `update_file`.39223923 - `"update_file"`39243925 - `status: "in_progress" or "completed"`39263927 The status of the apply patch tool call. One of `in_progress` or `completed`.39283929 - `"in_progress"`39303931 - `"completed"`39323933 - `type: "apply_patch_call"`39343935 The type of the item. Always `apply_patch_call`.39363937 - `"apply_patch_call"`39383939 - `id: optional string or null`39403941 The unique ID of the apply patch tool call. Populated when this item is returned via API.39423943 - `caller: optional object { type } or object { caller_id, type } or null`39443945 The execution context that produced this tool call.39463947 - `Direct object { type }`39483949 - `type: "direct"`39503951 The caller type. Always `direct`.39523953 - `"direct"`39543955 - `Program object { caller_id, type }`39563957 - `caller_id: string`39583959 The call ID of the program item that produced this tool call.39603961 - `type: "program"`39623963 The caller type. Always `program`.39643965 - `"program"`39663967 - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`39683969 The streamed output emitted by an apply patch tool call.39703971 - `call_id: string`39723973 The unique ID of the apply patch tool call generated by the model.39743975 - `status: "completed" or "failed"`39763977 The status of the apply patch tool call output. One of `completed` or `failed`.39783979 - `"completed"`39803981 - `"failed"`39823983 - `type: "apply_patch_call_output"`39843985 The type of the item. Always `apply_patch_call_output`.39863987 - `"apply_patch_call_output"`39883989 - `id: optional string or null`39903991 The unique ID of the apply patch tool call output. Populated when this item is returned via API.39923993 - `caller: optional object { type } or object { caller_id, type } or null`39943995 The execution context that produced this tool call.39963997 - `Direct object { type }`39983999 - `type: "direct"`40004001 The caller type. Always `direct`.40024003 - `"direct"`40044005 - `Program object { caller_id, type }`40064007 - `caller_id: string`40084009 The call ID of the program item that produced this tool call.40104011 - `type: "program"`40124013 The caller type. Always `program`.40144015 - `"program"`40164017 - `output: optional string or null`40184019 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).40204021 - `McpListTools object { id, server_label, tools, 2 more }`40224023 A list of tools available on an MCP server.40244025 - `id: string`40264027 The unique ID of the list.40284029 - `server_label: string`40304031 The label of the MCP server.40324033 - `tools: array of object { input_schema, name, annotations, description }`40344035 The tools available on the server.40364037 - `input_schema: unknown`40384039 The JSON schema describing the tool's input.40404041 - `name: string`40424043 The name of the tool.40444045 - `annotations: optional unknown or null`40464047 Additional annotations about the tool.40484049 - `description: optional string or null`40504051 The description of the tool.40524053 - `type: "mcp_list_tools"`40544055 The type of the item. Always `mcp_list_tools`.40564057 - `"mcp_list_tools"`40584059 - `error: optional string or null`40604061 Error message if the server could not list tools.40624063 - `McpApprovalRequest object { id, arguments, name, 2 more }`40644065 A request for human approval of a tool invocation.40664067 - `id: string`40684069 The unique ID of the approval request.40704071 - `arguments: string`40724073 A JSON string of arguments for the tool.40744075 - `name: string`40764077 The name of the tool to run.40784079 - `server_label: string`40804081 The label of the MCP server making the request.40824083 - `type: "mcp_approval_request"`40844085 The type of the item. Always `mcp_approval_request`.40864087 - `"mcp_approval_request"`40884089 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`40904091 A response to an MCP approval request.40924093 - `approval_request_id: string`40944095 The ID of the approval request being answered.40964097 - `approve: boolean`40984099 Whether the request was approved.41004101 - `type: "mcp_approval_response"`41024103 The type of the item. Always `mcp_approval_response`.41044105 - `"mcp_approval_response"`41064107 - `id: optional string or null`41084109 The unique ID of the approval response41104111 - `reason: optional string or null`41124113 Optional reason for the decision.41144115 - `McpCall object { id, arguments, name, 6 more }`41164117 An invocation of a tool on an MCP server.41184119 - `id: string`41204121 The unique ID of the tool call.41224123 - `arguments: string`41244125 A JSON string of the arguments passed to the tool.41264127 - `name: string`41284129 The name of the tool that was run.41304131 - `server_label: string`41324133 The label of the MCP server running the tool.41344135 - `type: "mcp_call"`41364137 The type of the item. Always `mcp_call`.41384139 - `"mcp_call"`41404141 - `approval_request_id: optional string or null`41424143 Unique identifier for the MCP tool call approval request.4144 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.41454146 - `error: optional McpToolCallError or null`41474148 The error from the tool call, if any.41494150 - `McpProtocolError object { code, message, type }`41514152 - `code: number`41534154 - `message: string`41554156 - `type: "mcp_protocol_error"`41574158 - `"mcp_protocol_error"`41594160 - `McpToolExecutionError object { content, type }`41614162 - `content: unknown`41634164 - `type: "mcp_tool_execution_error"`41654166 - `"mcp_tool_execution_error"`41674168 - `HTTPError object { code, message, type }`41694170 - `code: number`41714172 - `message: string`41734174 - `type: "http_error"`41754176 - `"http_error"`41774178 - `output: optional string or null`41794180 The output from the tool call.41814182 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`41834184 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.41854186 - `"in_progress"`41874188 - `"completed"`41894190 - `"incomplete"`41914192 - `"calling"`41934194 - `"failed"`41954196 - `CustomToolCallOutput object { call_id, output, type, 2 more }`41974198 The output of a custom tool call from your code, being sent back to the model.41994200 - `call_id: string`42014202 The call ID, used to map this custom tool call output to a custom tool call.42034204 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`42054206 The output from the custom tool call generated by your code.4207 Can be a string or an list of output content.42084209 - `StringOutput = string`42104211 A string of the output of the custom tool call.42124213 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`42144215 Text, image, or file output of the custom tool call.42164217 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`42184219 A text input to the model.42204221 - `ResponseInputImage object { detail, type, file_id, 2 more }`42224223 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).42244225 - `ResponseInputFile object { type, detail, file_data, 4 more }`42264227 A file input to the model.42284229 - `type: "custom_tool_call_output"`42304231 The type of the custom tool call output. Always `custom_tool_call_output`.42324233 - `"custom_tool_call_output"`42344235 - `id: optional string`42364237 The unique ID of the custom tool call output in the OpenAI platform.42384239 - `caller: optional object { type } or object { caller_id, type } or null`42404241 The execution context that produced this tool call.42424243 - `Direct object { type }`42444245 - `type: "direct"`42464247 The caller type. Always `direct`.42484249 - `"direct"`42504251 - `Program object { caller_id, type }`42524253 - `caller_id: string`42544255 The call ID of the program item that produced this tool call.42564257 - `type: "program"`42584259 The caller type. Always `program`.42604261 - `"program"`42624263 - `CustomToolCall object { call_id, input, name, 5 more }`42644265 A call to a custom tool created by the model.42664267 - `call_id: string`42684269 An identifier used to map this custom tool call to a tool call output.42704271 - `input: string`42724273 The input for the custom tool call generated by the model.42744275 - `name: string`42764277 The name of the custom tool being called.42784279 - `type: "custom_tool_call"`42804281 The type of the custom tool call. Always `custom_tool_call`.42824283 - `"custom_tool_call"`42844285 - `id: optional string`42864287 The unique ID of the custom tool call in the OpenAI platform.42884289 - `async: optional boolean`42904291 Whether the custom tool call runs asynchronously.42924293 - `caller: optional object { type } or object { caller_id, type } or null`42944295 The execution context that produced this tool call.42964297 - `Direct object { type }`42984299 - `type: "direct"`43004301 - `"direct"`43024303 - `Program object { caller_id, type }`43044305 - `caller_id: string`43064307 The call ID of the program item that produced this tool call.43084309 - `type: "program"`43104311 - `"program"`43124313 - `namespace: optional string`43144315 The namespace of the custom tool being called.43164317 - `CompactionTrigger object { type, id }`43184319 Compacts the current context. Must be the final input item.43204321 - `type: "compaction_trigger"`43224323 The type of the item. Always `compaction_trigger`.43244325 - `"compaction_trigger"`43264327 - `id: optional string or null`43284329 The unique ID of this compaction trigger.43304331 - `ItemReference object { id, type }`43324333 An internal identifier for an item to reference.43344335 - `id: string`43364337 The ID of the item to reference.43384339 - `type: optional "item_reference" or null`43404341 The type of item to reference. Always `item_reference`.43424343 - `"item_reference"`43444345 - `Program object { id, call_id, code, 2 more }`43464347 - `id: string`43484349 The unique ID of this program item.43504351 - `call_id: string`43524353 The stable call ID of the program item.43544355 - `code: string`43564357 The JavaScript source executed by programmatic tool calling.43584359 - `fingerprint: string`43604361 Opaque program replay fingerprint that must be round-tripped.43624363 - `type: "program"`43644365 The item type. Always `program`.43664367 - `"program"`43684369 - `ProgramOutput object { id, call_id, result, 2 more }`43704371 - `id: string`43724373 The unique ID of this program output item.43744375 - `call_id: string`43764377 The call ID of the program item.43784379 - `result: string`43804381 The result produced by the program item.43824383 - `status: "completed" or "incomplete"`43844385 The terminal status of the program output.43864387 - `"completed"`43884389 - `"incomplete"`43904391 - `type: "program_output"`43924393 The item type. Always `program_output`.43944395 - `"program_output"`43964397- `instructions: optional string or null`43984399 A system (or developer) message inserted into the model's context.44004401 When using along with `previous_response_id`, the instructions from a previous4402 response will not be carried over to the next response. This makes it simple4403 to swap out system (or developer) messages in new responses.44044405- `max_output_tokens: optional number or null`44064407 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).44084409- `max_tool_calls: optional number or null`44104411 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.44124413- `metadata: optional Metadata or null`44144415 Set of 16 key-value pairs that can be attached to an object. This can be4416 useful for storing additional information about the object in a structured4417 format, and querying for objects via API or the dashboard.44184419 Keys are strings with a maximum length of 64 characters. Values are strings4420 with a maximum length of 512 characters.44214422- `model: optional ResponsesModel`44234424 Model ID used to generate the response, like `gpt-6-astra`. OpenAI4425 offers a wide range of models with different capabilities, performance4426 characteristics, and price points. Refer to the [model guide](/api/docs/models)4427 to browse and compare available models.44284429 - `string`44304431 - `"gpt-6-astra" or "gpt-5.6-sol" or "gpt-5.6-terra" or 82 more`44324433 - `"gpt-6-astra"`44344435 - `"gpt-5.6-sol"`44364437 - `"gpt-5.6-terra"`44384439 - `"gpt-5.6-luna"`44404441 - `"gpt-5.5"`44424443 - `"gpt-5.5-2026-04-23"`44444445 - `"gpt-5.4"`44464447 - `"gpt-5.4-mini"`44484449 - `"gpt-5.4-nano"`44504451 - `"gpt-5.4-mini-2026-03-17"`44524453 - `"gpt-5.4-nano-2026-03-17"`44544455 - `"gpt-5.3-chat-latest"`44564457 - `"gpt-5.2"`44584459 - `"gpt-5.2-2025-12-11"`44604461 - `"gpt-5.2-chat-latest"`44624463 - `"gpt-5.2-pro"`44644465 - `"gpt-5.2-pro-2025-12-11"`44664467 - `"gpt-5.1"`44684469 - `"gpt-5.1-2025-11-13"`44704471 - `"gpt-5.1-codex"`44724473 - `"gpt-5.1-chat-latest"`44744475 - `"gpt-5"`44764477 - `"gpt-5-mini"`44784479 - `"gpt-5-nano"`44804481 - `"gpt-5-2025-08-07"`44824483 - `"gpt-5-mini-2025-08-07"`44844485 - `"gpt-5-nano-2025-08-07"`44864487 - `"gpt-5-chat-latest"`44884489 - `"gpt-4.1"`44904491 - `"gpt-4.1-mini"`44924493 - `"gpt-4.1-nano"`44944495 - `"gpt-4.1-2025-04-14"`44964497 - `"gpt-4.1-mini-2025-04-14"`44984499 - `"gpt-4.1-nano-2025-04-14"`45004501 - `"o4-mini"`45024503 - `"o4-mini-2025-04-16"`45044505 - `"o3"`45064507 - `"o3-2025-04-16"`45084509 - `"o3-mini"`45104511 - `"o3-mini-2025-01-31"`45124513 - `"o1"`45144515 - `"o1-2024-12-17"`45164517 - `"o1-preview"`45184519 - `"o1-preview-2024-09-12"`45204521 - `"o1-mini"`45224523 - `"o1-mini-2024-09-12"`45244525 - `"gpt-4o"`45264527 - `"gpt-4o-2024-11-20"`45284529 - `"gpt-4o-2024-08-06"`45304531 - `"gpt-4o-2024-05-13"`45324533 - `"gpt-audio-mini"`45344535 - `"gpt-audio-mini-2025-12-15"`45364537 - `"gpt-4o-audio-preview"`45384539 - `"gpt-4o-audio-preview-2024-10-01"`45404541 - `"gpt-4o-audio-preview-2024-12-17"`45424543 - `"gpt-4o-audio-preview-2025-06-03"`45444545 - `"gpt-4o-mini-audio-preview"`45464547 - `"gpt-4o-mini-audio-preview-2024-12-17"`45484549 - `"gpt-4o-search-preview"`45504551 - `"gpt-4o-mini-search-preview"`45524553 - `"gpt-4o-search-preview-2025-03-11"`45544555 - `"gpt-4o-mini-search-preview-2025-03-11"`45564557 - `"chatgpt-4o-latest"`45584559 - `"codex-mini-latest"`45604561 - `"gpt-4o-mini"`45624563 - `"gpt-4o-mini-2024-07-18"`45644565 - `"gpt-4-turbo"`45664567 - `"gpt-4-turbo-2024-04-09"`45684569 - `"gpt-4-0125-preview"`45704571 - `"gpt-4-turbo-preview"`45724573 - `"gpt-4-1106-preview"`45744575 - `"gpt-4-vision-preview"`45764577 - `"gpt-4"`45784579 - `"gpt-4-0314"`45804581 - `"gpt-4-0613"`45824583 - `"gpt-4-32k"`45844585 - `"gpt-4-32k-0314"`45864587 - `"gpt-4-32k-0613"`45884589 - `"gpt-3.5-turbo"`45904591 - `"gpt-3.5-turbo-16k"`45924593 - `"gpt-3.5-turbo-0301"`45944595 - `"gpt-3.5-turbo-0613"`45964597 - `"gpt-3.5-turbo-1106"`45984599 - `"gpt-3.5-turbo-0125"`46004601 - `"gpt-3.5-turbo-16k-0613"`46024603 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 16 more`46044605 - `"o1-pro"`46064607 - `"o1-pro-2025-03-19"`46084609 - `"o3-pro"`46104611 - `"o3-pro-2025-06-10"`46124613 - `"o3-deep-research"`46144615 - `"o3-deep-research-2025-06-26"`46164617 - `"o4-mini-deep-research"`46184619 - `"o4-mini-deep-research-2025-06-26"`46204621 - `"computer-use-preview"`46224623 - `"computer-use-preview-2025-03-11"`46244625 - `"gpt-5.5-pro"`46264627 - `"gpt-5.5-pro-2026-04-23"`46284629 - `"gpt-5-codex"`46304631 - `"gpt-5-pro"`46324633 - `"gpt-5-pro-2025-10-06"`46344635 - `"gpt-5.1-codex-max"`46364637 - `"gpt-daybreak-blue-latest"`46384639 - `"gpt-daybreak-red-latest"`46404641 - `"gpt-5.6-cyber"`46424643- `moderation: optional object { model, policy } or null`46444645 Configuration for running moderation on the input and output of this response.46464647 - `model: string`46484649 The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'.46504651 - `policy: optional object { input, output } or null`46524653 The policy to apply to moderated response input and output.46544655 - `input: optional object { mode } or null`46564657 The moderation policy for the response input.46584659 - `mode: "score" or "block"`46604661 - `"score"`46624663 - `"block"`46644665 - `output: optional object { mode } or null`46664667 The moderation policy for the response output.46684669 - `mode: "score" or "block"`46704671 - `"score"`46724673 - `"block"`46744675- `parallel_tool_calls: optional boolean or null`46764677 Whether to allow the model to run tool calls in parallel.46784679- `previous_response_id: optional string or null`46804681 The unique ID of the previous response to the model. Use this to4682 create multi-turn conversations. Learn more about4683 [conversation state](/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.46844685- `prompt: optional ResponsePrompt or null`46864687 Reference to a prompt template and its variables.4688 [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).46894690 - `id: string`46914692 The unique identifier of the prompt template to use.46934694 - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`46954696 Optional map of values to substitute in for variables in your4697 prompt. The substitution values can either be strings, or other4698 Response input types like images or files.46994700 - `string`47014702 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`47034704 A text input to the model.47054706 - `ResponseInputImage object { detail, type, file_id, 2 more }`47074708 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).47094710 - `ResponseInputFile object { type, detail, file_data, 4 more }`47114712 A file input to the model.47134714 - `version: optional string or null`47154716 Optional version of the prompt template.47174718- `prompt_cache_key: optional string or null`47194720 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/api/docs/guides/prompt-caching).47214722- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`47234724 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.47254726 - `comparison_response_id: optional string or null`47274728 The ID of a response to compare when diagnosing prompt cache reuse. Supplying this field requests prompt cache diagnostics when the feature is enabled.47294730 - `mode: optional "implicit" or "explicit"`47314732 Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.47334734 - `"implicit"`47354736 - `"explicit"`47374738 - `prewarm: optional boolean`47394740 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.47414742 - `ttl: optional "30m"`47434744 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.47454746 - `"30m"`47474748- `prompt_cache_retention: optional "in_memory" or "24h" or null`47494750 Deprecated. Use `prompt_cache_options.ttl` instead.47514752 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](/api/docs/guides/prompt-caching#prompt-cache-retention).4753 This field expresses a maximum retention policy, while4754 `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two4755 fields are independent and do not interact.4756 For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.47574758 For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:47594760 - Organizations without ZDR enabled default to `24h`.4761 - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.47624763 - `"in_memory"`47644765 - `"24h"`47664767- `reasoning: optional Reasoning or null`47684769 Configuration options for4770 [reasoning models](/api/docs/guides/reasoning).47714772 - `context: optional "auto" or "current_turn" or "all_turns" or null`47734774 Controls which reasoning items are rendered back to the model on later turns.4775 If omitted or set to `auto`, the model determines the context mode. The4776 `gpt-5.6` model family defaults to `all_turns`; earlier models default to4777 `current_turn`.47784779 When returned on a response, this is the effective reasoning context mode4780 used for the response.47814782 - `"auto"`47834784 - `"current_turn"`47854786 - `"all_turns"`47874788 - `effort: optional ReasoningEffort or null`47894790 Constrains effort on reasoning for reasoning models. Currently supported4791 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.4792 Reducing reasoning effort can result in faster responses and fewer tokens4793 used on reasoning in a response. Not all reasoning models support every4794 value. See the4795 [reasoning guide](/api/docs/guides/reasoning)4796 for model-specific support.47974798 - `generate_summary: optional "auto" or "concise" or "detailed" or null`47994800 **Deprecated:** use `summary` instead.48014802 A summary of the reasoning performed by the model. This can be4803 useful for debugging and understanding the model's reasoning process.4804 One of `auto`, `concise`, or `detailed`.48054806 - `"auto"`48074808 - `"concise"`48094810 - `"detailed"`48114812 - `mode: optional string or "standard" or "pro"`48134814 Controls the reasoning execution mode for the request.48154816 When returned on a response, this is the effective execution mode.48174818 - `string`48194820 - `"standard" or "pro"`48214822 Controls the reasoning execution mode for the request.48234824 When returned on a response, this is the effective execution mode.48254826 - `"standard"`48274828 - `"pro"`48294830 - `summary: optional "auto" or "concise" or "detailed" or null`48314832 A summary of the reasoning performed by the model. This can be4833 useful for debugging and understanding the model's reasoning process.4834 One of `auto`, `concise`, or `detailed`.48354836 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.48374838 - `"auto"`48394840 - `"concise"`48414842 - `"detailed"`48434844- `safety_identifier: optional string or null`48454846 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.4847 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](/api/docs/guides/safety-best-practices#implement-safety-identifiers).48484849- `service_tier: optional ServiceTier or null`48504851 Specifies the processing type used for serving the request.48524853 - 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'.4854 - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.4855 - If set to '[flex](/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier.4856 - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.4857 - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`.4858 - When not set, the default behavior is 'auto'.48594860 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.48614862 - `"auto"`48634864 - `"default"`48654866 - `"flex"`48674868 - `"scale"`48694870 - `"priority"`48714872 - `"fast"`48734874 - `"ultrafast"`48754876- `store: optional boolean or null`48774878 Whether to store the generated model response for later retrieval via4879 API.4880 Defaults to true when omitted.4881 If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](/api/docs/guides/your-data#v1responses).48824883- `stream: optional boolean or null`48844885 If set to true, the model response data will be streamed to the client4886 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).4887 See the [Streaming section below](/api/reference/resources/responses/streaming-events)4888 for more information.48894890- `stream_options: optional object { include_obfuscation } or null`48914892 Options for streaming responses. Only set this when you set `stream: true`.48934894 - `include_obfuscation: optional boolean`48954896 When true, stream obfuscation will be enabled. Stream obfuscation adds4897 random characters to an `obfuscation` field on streaming delta events to4898 normalize payload sizes as a mitigation to certain side-channel attacks.4899 These obfuscation fields are included by default, but add a small amount4900 of overhead to the data stream. You can set `include_obfuscation` to4901 false to optimize for bandwidth if you trust the network links between4902 your application and the OpenAI API.49034904- `temperature: optional number or null`49054906 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.4907 We generally recommend altering this or `top_p` but not both.49084909- `text: optional ResponseTextConfig`49104911 Configuration options for a text response from the model. Can be plain4912 text or structured JSON data. Learn more:49134914 - [Text inputs and outputs](/api/docs/guides/text)4915 - [Structured Outputs](/api/docs/guides/structured-outputs)49164917 - `format: optional ResponseFormatTextConfig`49184919 An object specifying the format that the model must output.49204921 Configuring `{ "type": "json_schema" }` enables Structured Outputs,4922 which ensures the model will match your supplied JSON schema. Learn more in the4923 [Structured Outputs guide](/api/docs/guides/structured-outputs).49244925 The default format is `{ "type": "text" }` with no additional options.49264927 **Not recommended for gpt-4o and newer models:**49284929 Setting to `{ "type": "json_object" }` enables the older JSON mode, which4930 ensures the message the model generates is valid JSON. Using `json_schema`4931 is preferred for models that support it.49324933 - `ResponseFormatText object { type }`49344935 Default response format. Used to generate text responses.49364937 - `type: "text"`49384939 The type of response format being defined. Always `text`.49404941 - `"text"`49424943 - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`49444945 JSON Schema response format. Used to generate structured JSON responses.4946 Learn more about [Structured Outputs](/api/docs/guides/structured-outputs).49474948 - `name: string`49494950 The name of the response format. Must be a-z, A-Z, 0-9, or contain4951 underscores and dashes, with a maximum length of 64.49524953 - `schema: map[unknown]`49544955 The schema for the response format, described as a JSON Schema object.4956 Learn how to build JSON schemas [here](https://json-schema.org/).49574958 - `type: "json_schema"`49594960 The type of response format being defined. Always `json_schema`.49614962 - `"json_schema"`49634964 - `description: optional string`49654966 A description of what the response format is for, used by the model to4967 determine how to respond in the format.49684969 - `strict: optional boolean or null`49704971 Whether to enable strict schema adherence when generating the output.4972 If set to true, the model will always follow the exact schema defined4973 in the `schema` field. Only a subset of JSON Schema is supported when4974 `strict` is `true`. To learn more, read the [Structured Outputs4975 guide](/api/docs/guides/structured-outputs).49764977 - `ResponseFormatJSONObject object { type }`49784979 JSON object response format. An older method of generating JSON responses.4980 Using `json_schema` is recommended for models that support it. Note that the4981 model will not generate JSON without a system or user message instructing it4982 to do so.49834984 - `type: "json_object"`49854986 The type of response format being defined. Always `json_object`.49874988 - `"json_object"`49894990 - `verbosity: optional "low" or "medium" or "high" or null`49914992 Constrains the verbosity of the model's response. Lower values will result in4993 more concise responses, while higher values will result in more verbose responses.4994 Currently supported values are `low`, `medium`, and `high`. The default is4995 `medium`.49964997 - `"low"`49984999 - `"medium"`50005001 - `"high"`50025003- `tool_choice: optional ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 6 more`50045005 How the model should select which tool (or tools) to use when generating5006 a response. See the `tools` parameter to see how to specify which tools5007 the model can call.50085009 - `ToolChoiceOptions = "none" or "auto" or "required"`50105011 Controls which (if any) tool is called by the model.50125013 `none` means the model will not call any tool and instead generates a message.50145015 `auto` means the model can pick between generating a message or calling one or5016 more tools.50175018 `required` means the model must call one or more tools.50195020 - `"none"`50215022 - `"auto"`50235024 - `"required"`50255026 - `ToolChoiceAllowed object { mode, tools, type }`50275028 Constrains the tools available to the model to a pre-defined set.50295030 - `mode: "auto" or "required"`50315032 Constrains the tools available to the model to a pre-defined set.50335034 `auto` allows the model to pick from among the allowed tools and generate a5035 message.50365037 `required` requires the model to call one or more of the allowed tools.50385039 - `"auto"`50405041 - `"required"`50425043 - `tools: array of map[unknown]`50445045 A list of tool definitions that the model should be allowed to call.50465047 For the Responses API, the list of tool definitions might look like:50485049 ```json5050 [5051 { "type": "function", "name": "get_weather" },5052 { "type": "mcp", "server_label": "deepwiki" },5053 { "type": "image_generation" }5054 ]5055 ```50565057 - `type: "allowed_tools"`50585059 Allowed tool configuration type. Always `allowed_tools`.50605061 - `"allowed_tools"`50625063 - `ToolChoiceTypes object { type }`50645065 Indicates that the model should use a built-in tool to generate a response.5066 [Learn more about built-in tools](/api/docs/guides/tools).50675068 - `type: "file_search" or "web_search_preview" or "computer" or 5 more`50695070 The type of hosted tool the model should to use. Learn more about5071 [built-in tools](/api/docs/guides/tools).50725073 Allowed values are:50745075 - `file_search`5076 - `web_search_preview`5077 - `computer`5078 - `computer_use_preview`5079 - `computer_use`5080 - `code_interpreter`5081 - `image_generation`50825083 - `"file_search"`50845085 - `"web_search_preview"`50865087 - `"computer"`50885089 - `"computer_use_preview"`50905091 - `"computer_use"`50925093 - `"web_search_preview_2025_03_11"`50945095 - `"image_generation"`50965097 - `"code_interpreter"`50985099 - `ToolChoiceFunction object { name, type }`51005101 Use this option to force the model to call a specific function.51025103 - `name: string`51045105 The name of the function to call.51065107 - `type: "function"`51085109 For function calling, the type is always `function`.51105111 - `"function"`51125113 - `ToolChoiceMcp object { server_label, type, name }`51145115 Use this option to force the model to call a specific tool on a remote MCP server.51165117 - `server_label: string`51185119 The label of the MCP server to use.51205121 - `type: "mcp"`51225123 For MCP tools, the type is always `mcp`.51245125 - `"mcp"`51265127 - `name: optional string or null`51285129 The name of the tool to call on the server.51305131 - `ToolChoiceCustom object { name, type }`51325133 Use this option to force the model to call a specific custom tool.51345135 - `name: string`51365137 The name of the custom tool to call.51385139 - `type: "custom"`51405141 For custom tool calling, the type is always `custom`.51425143 - `"custom"`51445145 - `SpecificProgrammaticToolCallingParam object { type }`51465147 - `type: "programmatic_tool_calling"`51485149 The tool to call. Always `programmatic_tool_calling`.51505151 - `"programmatic_tool_calling"`51525153 - `ToolChoiceApplyPatch object { type }`51545155 Forces the model to call the apply_patch tool when executing a tool call.51565157 - `type: "apply_patch"`51585159 The tool to call. Always `apply_patch`.51605161 - `"apply_patch"`51625163 - `ToolChoiceShell object { type }`51645165 Forces the model to call the shell tool when a tool call is required.51665167 - `type: "shell"`51685169 The tool to call. Always `shell`.51705171 - `"shell"`51725173- `tools: optional array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`51745175 An array of tools the model may call while generating a response. You5176 can specify which tool to use by setting the `tool_choice` parameter.51775178 We support the following categories of tools:51795180 - **Built-in tools**: Tools that are provided by OpenAI that extend the5181 model's capabilities, like [web search](/api/docs/guides/tools-web-search)5182 or [file search](/api/docs/guides/tools-file-search). Learn more about5183 [built-in tools](/api/docs/guides/tools).5184 - **MCP Tools**: Integrations with third-party systems via custom MCP servers5185 or predefined connectors such as Google Drive and SharePoint. Learn more about5186 [MCP Tools](/api/docs/guides/tools-connectors-mcp).5187 - **Function calls (custom tools)**: Functions that are defined by you,5188 enabling the model to call your own code with strongly typed arguments5189 and outputs. Learn more about5190 [function calling](/api/docs/guides/function-calling). You can also use5191 custom tools to call your own code.51925193 - `Function object { name, parameters, strict, 6 more }`51945195 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).51965197 - `name: string`51985199 The name of the function to call.52005201 - `parameters: map[unknown] or null`52025203 A JSON schema object describing the parameters of the function.52045205 - `strict: boolean or null`52065207 Whether strict parameter validation is enforced for this function tool.52085209 - `type: "function"`52105211 The type of the function tool. Always `function`.52125213 - `"function"`52145215 - `allowed_callers: optional array of "direct" or "programmatic" or null`52165217 The tool invocation context(s).52185219 - `"direct"`52205221 - `"programmatic"`52225223 - `async: optional boolean`52245225 - `defer_loading: optional boolean`52265227 Whether this function is deferred and loaded via tool search.52285229 - `description: optional string or null`52305231 A description of the function. Used by the model to determine whether or not to call the function.52325233 - `output_schema: optional map[unknown] or null`52345235 A JSON schema object describing the JSON value encoded in string outputs for this function.52365237 - `FileSearch object { type, vector_store_ids, filters, 2 more }`52385239 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).52405241 - `type: "file_search"`52425243 The type of the file search tool. Always `file_search`.52445245 - `"file_search"`52465247 - `vector_store_ids: array of string`52485249 The IDs of the vector stores to search.52505251 - `filters: optional ComparisonFilter or CompoundFilter or null`52525253 A filter to apply.52545255 - `ComparisonFilter object { key, type, value }`52565257 A filter used to compare a specified attribute key to a given value using a defined comparison operation.52585259 - `CompoundFilter object { filters, type }`52605261 Combine multiple filters using `and` or `or`.52625263 - `max_num_results: optional number`52645265 The maximum number of results to return. This number should be between 1 and 50 inclusive.52665267 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`52685269 Ranking options for search.52705271 - `hybrid_search: optional object { embedding_weight, text_weight }`52725273 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.52745275 - `embedding_weight: number`52765277 The weight of the embedding in the reciprocal ranking fusion.52785279 - `text_weight: number`52805281 The weight of the text in the reciprocal ranking fusion.52825283 - `ranker: optional "auto" or "default-2024-11-15"`52845285 The ranker to use for the file search.52865287 - `"auto"`52885289 - `"default-2024-11-15"`52905291 - `score_threshold: optional number`52925293 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.52945295 - `Computer object { type }`52965297 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).52985299 - `type: "computer"`53005301 The type of the computer tool. Always `computer`.53025303 - `"computer"`53045305 - `ComputerUsePreview object { display_height, display_width, environment, type }`53065307 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).53085309 - `display_height: number`53105311 The height of the computer display.53125313 - `display_width: number`53145315 The width of the computer display.53165317 - `environment: "windows" or "mac" or "linux" or 2 more`53185319 The type of computer environment to control.53205321 - `"windows"`53225323 - `"mac"`53245325 - `"linux"`53265327 - `"ubuntu"`53285329 - `"browser"`53305331 - `type: "computer_use_preview"`53325333 The type of the computer use tool. Always `computer_use_preview`.53345335 - `"computer_use_preview"`53365337 - `WebSearch object { type, external_web_access, filters, 2 more }`53385339 Search the Internet for sources related to the prompt. Learn more about the5340 [web search tool](/api/docs/guides/tools-web-search).53415342 - `type: "web_search" or "web_search_2025_08_26"`53435344 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.53455346 - `"web_search"`53475348 - `"web_search_2025_08_26"`53495350 - `external_web_access: optional boolean`53515352 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.53535354 - `filters: optional object { allowed_domains } or null`53555356 Filters for the search.53575358 - `allowed_domains: optional array of string or null`53595360 Allowed domains for the search. If not provided, all domains are allowed.5361 Subdomains of the provided domains are allowed as well.53625363 Example: `["pubmed.ncbi.nlm.nih.gov"]`53645365 - `search_context_size: optional "low" or "medium" or "high"`53665367 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.53685369 - `"low"`53705371 - `"medium"`53725373 - `"high"`53745375 - `user_location: optional object { city, country, region, 2 more } or null`53765377 The approximate location of the user.53785379 - `city: optional string or null`53805381 Free text input for the city of the user, e.g. `San Francisco`.53825383 - `country: optional string or null`53845385 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.53865387 - `region: optional string or null`53885389 Free text input for the region of the user, e.g. `California`.53905391 - `timezone: optional string or null`53925393 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.53945395 - `type: optional "approximate"`53965397 The type of location approximation. Always `approximate`.53985399 - `"approximate"`54005401 - `Mcp object { server_label, type, allowed_callers, 9 more }`54025403 Give the model access to additional tools via remote Model Context Protocol5404 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).54055406 - `server_label: string`54075408 A label for this MCP server, used to identify it in tool calls.54095410 - `type: "mcp"`54115412 The type of the MCP tool. Always `mcp`.54135414 - `"mcp"`54155416 - `allowed_callers: optional array of "direct" or "programmatic" or null`54175418 The tool invocation context(s).54195420 - `"direct"`54215422 - `"programmatic"`54235424 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`54255426 List of allowed tool names or a filter object.54275428 - `McpAllowedTools = array of string`54295430 A string array of allowed tool names54315432 - `McpToolFilter object { read_only, tool_names }`54335434 A filter object to specify which tools are allowed.54355436 - `read_only: optional boolean`54375438 Indicates whether or not a tool modifies data or is read-only. If an5439 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5440 it will match this filter.54415442 - `tool_names: optional array of string`54435444 List of allowed tool names.54455446 - `authorization: optional string`54475448 An OAuth access token that can be used with a remote MCP server, either5449 with a custom MCP server URL or a service connector. Your application5450 must handle the OAuth authorization flow and provide the token here.54515452 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`54535454 Identifier for service connectors, like those available in ChatGPT. One of5455 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more5456 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).54575458 This field is deprecated for models released after September 1, 2026.5459 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to5460 connect through a Secure MCP Tunnel.54615462 Currently supported `connector_id` values are:54635464 - Dropbox: `connector_dropbox`5465 - Gmail: `connector_gmail`5466 - Google Calendar: `connector_googlecalendar`5467 - Google Drive: `connector_googledrive`5468 - Microsoft Teams: `connector_microsoftteams`5469 - Outlook Calendar: `connector_outlookcalendar`5470 - Outlook Email: `connector_outlookemail`5471 - SharePoint: `connector_sharepoint`54725473 - `"connector_dropbox"`54745475 - `"connector_gmail"`54765477 - `"connector_googlecalendar"`54785479 - `"connector_googledrive"`54805481 - `"connector_microsoftteams"`54825483 - `"connector_outlookcalendar"`54845485 - `"connector_outlookemail"`54865487 - `"connector_sharepoint"`54885489 - `defer_loading: optional boolean`54905491 Whether this MCP tool is deferred and discovered via tool search.54925493 - `headers: optional map[string] or null`54945495 Optional HTTP headers to send to the MCP server. Use for authentication5496 or other purposes.54975498 - `require_approval: optional object { always, never } or "always" or "never" or null`54995500 Specify which of the MCP server's tools require approval.55015502 - `McpToolApprovalFilter object { always, never }`55035504 Specify which of the MCP server's tools require approval. Can be5505 `always`, `never`, or a filter object associated with tools5506 that require approval.55075508 - `always: optional object { read_only, tool_names }`55095510 A filter object to specify which tools are allowed.55115512 - `read_only: optional boolean`55135514 Indicates whether or not a tool modifies data or is read-only. If an5515 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5516 it will match this filter.55175518 - `tool_names: optional array of string`55195520 List of allowed tool names.55215522 - `never: optional object { read_only, tool_names }`55235524 A filter object to specify which tools are allowed.55255526 - `read_only: optional boolean`55275528 Indicates whether or not a tool modifies data or is read-only. If an5529 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5530 it will match this filter.55315532 - `tool_names: optional array of string`55335534 List of allowed tool names.55355536 - `McpToolApprovalSetting = "always" or "never"`55375538 Specify a single approval policy for all tools. One of `always` or5539 `never`. When set to `always`, all tools will require approval. When5540 set to `never`, all tools will not require approval.55415542 - `"always"`55435544 - `"never"`55455546 - `server_description: optional string`55475548 Optional description of the MCP server, used to provide more context.55495550 - `server_url: optional string`55515552 The URL for the MCP server. One of `server_url`, `connector_id`, or5553 `tunnel_id` must be provided.55545555 - `tunnel_id: optional string`55565557 The Secure MCP Tunnel ID to use instead of a direct server URL. One of5558 `server_url`, `connector_id`, or `tunnel_id` must be provided.55595560 - `CodeInterpreter object { container, type, allowed_callers }`55615562 A tool that runs Python code to help generate a response to a prompt.55635564 - `container: string or object { type, file_ids, memory_limit, network_policy }`55655566 The code interpreter container. Can be a container ID or an object that5567 specifies uploaded file IDs to make available to your code, along with an5568 optional `memory_limit` setting.55695570 - `string`55715572 The container ID.55735574 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`55755576 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.55775578 - `type: "auto"`55795580 Always `auto`.55815582 - `"auto"`55835584 - `file_ids: optional array of string`55855586 An optional list of uploaded files to make available to your code.55875588 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`55895590 The memory limit for the code interpreter container.55915592 - `"1g"`55935594 - `"4g"`55955596 - `"16g"`55975598 - `"64g"`55995600 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`56015602 Network access policy for the container.56035604 - `ContainerNetworkPolicyDisabled object { type }`56055606 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`56075608 - `type: "code_interpreter"`56095610 The type of the code interpreter tool. Always `code_interpreter`.56115612 - `"code_interpreter"`56135614 - `allowed_callers: optional array of "direct" or "programmatic" or null`56155616 The tool invocation context(s).56175618 - `"direct"`56195620 - `"programmatic"`56215622 - `ProgrammaticToolCalling object { type }`56235624 - `type: "programmatic_tool_calling"`56255626 The type of the tool. Always `programmatic_tool_calling`.56275628 - `"programmatic_tool_calling"`56295630 - `ImageGeneration object { type, action, background, 9 more }`56315632 A tool that generates images using the GPT image models.56335634 - `type: "image_generation"`56355636 The type of the image generation tool. Always `image_generation`.56375638 - `"image_generation"`56395640 - `action: optional "generate" or "edit" or "auto"`56415642 Whether to generate a new image or edit an existing image. Default: `auto`.56435644 - `"generate"`56455646 - `"edit"`56475648 - `"auto"`56495650 - `background: optional "transparent" or "opaque" or "auto"`56515652 Set the background of the generated image. One of `transparent`, `opaque`,5653 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including5654 their `2026-09-08` snapshots, support `opaque` and `transparent`5655 backgrounds. Transparent backgrounds are available for supported GPT Image5656 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in5657 preview. When using `transparent`, set the output format to `png` or `webp`.5658 Default: `auto`.56595660 - `"transparent"`56615662 - `"opaque"`56635664 - `"auto"`56655666 - `input_fidelity: optional "high" or "low" or null`56675668 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`.56695670 - `"high"`56715672 - `"low"`56735674 - `input_image_mask: optional object { file_id, image_url }`56755676 Optional mask for inpainting. Contains `image_url`5677 (string, optional) and `file_id` (string, optional).56785679 - `file_id: optional string`56805681 File ID for the mask image.56825683 - `image_url: optional string`56845685 Base64-encoded mask image.56865687 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`56885689 The image generation model to use. One of `gpt-image-1`,5690 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5691 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5692 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5693 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5694 `gpt-image-1`.56955696 - `string`56975698 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`56995700 The image generation model to use. One of `gpt-image-1`,5701 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5702 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5703 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5704 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5705 `gpt-image-1`.57065707 - `"gpt-image-1"`57085709 - `"gpt-image-1-mini"`57105711 - `"gpt-image-1.5"`57125713 - `"gpt-image-2"`57145715 - `"gpt-image-2-2026-04-21"`57165717 - `"gpt-image-2.5-sunburst"`57185719 - `"gpt-image-2.5-sunburst-2026-09-08"`57205721 - `"gpt-image-2.5-flare"`57225723 - `"gpt-image-2.5-flare-2026-09-08"`57245725 - `moderation: optional "auto" or "low"`57265727 Moderation level for the generated image. Default: `auto`.57285729 - `"auto"`57305731 - `"low"`57325733 - `output_compression: optional number`57345735 Compression level for the output image. Default: 100.57365737 - `output_format: optional "png" or "webp" or "jpeg"`57385739 The output format of the generated image. One of `png`, `webp`, or5740 `jpeg`. Default: `png`.57415742 - `"png"`57435744 - `"webp"`57455746 - `"jpeg"`57475748 - `partial_images: optional number`57495750 Number of partial images to generate in streaming mode, from 0 (default value) to 3.57515752 - `quality: optional "low" or "medium" or "high" or 3 more`57535754 The quality of the generated image. The GPT image models support `low`,5755 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,5756 including their `2026-09-08` snapshots, also support `xhigh` and `max`.5757 Default: `auto`.57585759 - `"low"`57605761 - `"medium"`57625763 - `"high"`57645765 - `"xhigh"`57665767 - `"max"`57685769 - `"auto"`57705771 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`57725773 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.57745775 - `string`57765777 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`57785779 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.57805781 - `"1024x1024"`57825783 - `"1024x1536"`57845785 - `"1536x1024"`57865787 - `"auto"`57885789 - `LocalShell object { type }`57905791 A tool that allows the model to execute shell commands in a local environment.57925793 - `type: "local_shell"`57945795 The type of the local shell tool. Always `local_shell`.57965797 - `"local_shell"`57985799 - `Shell object { type, allowed_callers, environment }`58005801 A tool that allows the model to execute shell commands.58025803 - `type: "shell"`58045805 The type of the shell tool. Always `shell`.58065807 - `"shell"`58085809 - `allowed_callers: optional array of "direct" or "programmatic" or null`58105811 The tool invocation context(s).58125813 - `"direct"`58145815 - `"programmatic"`58165817 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`58185819 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`58205821 - `LocalEnvironment object { type, skills }`58225823 - `ContainerReference object { container_id, type }`58245825 - `Custom object { name, type, allowed_callers, 4 more }`58265827 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)58285829 - `name: string`58305831 The name of the custom tool, used to identify it in tool calls.58325833 - `type: "custom"`58345835 The type of the custom tool. Always `custom`.58365837 - `"custom"`58385839 - `allowed_callers: optional array of "direct" or "programmatic" or null`58405841 The tool invocation context(s).58425843 - `"direct"`58445845 - `"programmatic"`58465847 - `async: optional boolean`58485849 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.58505851 - `defer_loading: optional boolean`58525853 Whether this tool should be deferred and discovered via tool search.58545855 - `description: optional string`58565857 Optional description of the custom tool, used to provide more context.58585859 - `format: optional CustomToolInputFormat`58605861 The input format for the custom tool. Default is unconstrained text.58625863 - `Namespace object { description, name, tools, type }`58645865 Groups function/custom tools under a shared namespace.58665867 - `description: string`58685869 A description of the namespace shown to the model.58705871 - `name: string`58725873 The namespace name used in tool calls (for example, `crm`).58745875 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`58765877 The function/custom tools available inside this namespace.58785879 - `Function object { name, type, allowed_callers, 6 more }`58805881 - `name: string`58825883 - `type: "function"`58845885 - `"function"`58865887 - `allowed_callers: optional array of "direct" or "programmatic" or null`58885889 The tool invocation context(s).58905891 - `"direct"`58925893 - `"programmatic"`58945895 - `async: optional boolean`58965897 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.58985899 - `defer_loading: optional boolean`59005901 Whether this function should be deferred and discovered via tool search.59025903 - `description: optional string or null`59045905 - `output_schema: optional map[unknown] or null`59065907 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.59085909 - `parameters: optional unknown or null`59105911 - `strict: optional boolean or null`59125913 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.59145915 - `Custom object { name, type, allowed_callers, 4 more }`59165917 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)59185919 - `name: string`59205921 The name of the custom tool, used to identify it in tool calls.59225923 - `type: "custom"`59245925 The type of the custom tool. Always `custom`.59265927 - `"custom"`59285929 - `allowed_callers: optional array of "direct" or "programmatic" or null`59305931 The tool invocation context(s).59325933 - `"direct"`59345935 - `"programmatic"`59365937 - `async: optional boolean`59385939 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.59405941 - `defer_loading: optional boolean`59425943 Whether this tool should be deferred and discovered via tool search.59445945 - `description: optional string`59465947 Optional description of the custom tool, used to provide more context.59485949 - `format: optional CustomToolInputFormat`59505951 The input format for the custom tool. Default is unconstrained text.59525953 - `type: "namespace"`59545955 The type of the tool. Always `namespace`.59565957 - `"namespace"`59585959 - `ToolSearch object { type, description, execution, parameters }`59605961 Hosted or BYOT tool search configuration for deferred tools.59625963 - `type: "tool_search"`59645965 The type of the tool. Always `tool_search`.59665967 - `"tool_search"`59685969 - `description: optional string or null`59705971 Description shown to the model for a client-executed tool search tool.59725973 - `execution: optional "server" or "client"`59745975 Whether tool search is executed by the server or by the client.59765977 - `"server"`59785979 - `"client"`59805981 - `parameters: optional unknown or null`59825983 Parameter schema for a client-executed tool search tool.59845985 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`59865987 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).59885989 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`59905991 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.59925993 - `"web_search_preview"`59945995 - `"web_search_preview_2025_03_11"`59965997 - `search_content_types: optional array of "text" or "image"`59985999 - `"text"`60006001 - `"image"`60026003 - `search_context_size: optional "low" or "medium" or "high"`60046005 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.60066007 - `"low"`60086009 - `"medium"`60106011 - `"high"`60126013 - `user_location: optional object { type, city, country, 2 more } or null`60146015 The user's location.60166017 - `type: "approximate"`60186019 The type of location approximation. Always `approximate`.60206021 - `"approximate"`60226023 - `city: optional string or null`60246025 Free text input for the city of the user, e.g. `San Francisco`.60266027 - `country: optional string or null`60286029 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.60306031 - `region: optional string or null`60326033 Free text input for the region of the user, e.g. `California`.60346035 - `timezone: optional string or null`60366037 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.60386039 - `ApplyPatch object { type, allowed_callers }`60406041 Allows the assistant to create, delete, or update files using unified diffs.60426043 - `type: "apply_patch"`60446045 The type of the tool. Always `apply_patch`.60466047 - `"apply_patch"`60486049 - `allowed_callers: optional array of "direct" or "programmatic" or null`60506051 The tool invocation context(s).60526053 - `"direct"`60546055 - `"programmatic"`60566057- `top_logprobs: optional number or null`60586059 An integer between 0 and 20 specifying the maximum number of most likely6060 tokens to return at each token position, each with an associated log6061 probability. In some cases, the number of returned tokens may be fewer than6062 requested.60636064- `top_p: optional number or null`60656066 An alternative to sampling with temperature, called nucleus sampling,6067 where the model considers the results of the tokens with top_p probability6068 mass. So 0.1 means only the tokens comprising the top 10% probability mass6069 are considered.60706071 We generally recommend altering this or `temperature` but not both.60726073- `truncation: optional "auto" or "disabled" or null`60746075 The truncation strategy to use for the model response.60766077 - `auto`: If the input to this Response exceeds6078 the model's context window size, the model will truncate the6079 response to fit the context window by dropping items from the beginning of the conversation.6080 - `disabled` (default): If the input size will exceed the context window6081 size for a model, the request will fail with a 400 error.60826083 - `"auto"`60846085 - `"disabled"`60866087- `user: optional string`60886089 This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.6090 A stable identifier for your end-users.6091 Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).60926093### Returns60946095- `Response object { id, created_at, error, 33 more }`60966097 - `id: string`60986099 Unique identifier for this Response.61006101 - `created_at: number`61026103 Unix timestamp (in seconds) of when this Response was created.61046105 - `error: ResponseError or null`61066107 An error object returned when the model fails to generate a Response.61086109 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 18 more`61106111 The error code for the response.61126113 - `"server_error"`61146115 - `"rate_limit_exceeded"`61166117 - `"invalid_prompt"`61186119 - `"data_residency_mismatch"`61206121 - `"bio_policy"`61226123 - `"misalignment_policy_violation"`61246125 - `"vector_store_timeout"`61266127 - `"invalid_image"`61286129 - `"invalid_image_format"`61306131 - `"invalid_base64_image"`61326133 - `"invalid_image_url"`61346135 - `"image_too_large"`61366137 - `"image_too_small"`61386139 - `"image_parse_error"`61406141 - `"image_content_policy_violation"`61426143 - `"invalid_image_mode"`61446145 - `"image_file_too_large"`61466147 - `"unsupported_image_media_type"`61486149 - `"empty_image_file"`61506151 - `"failed_to_download_image"`61526153 - `"image_file_not_found"`61546155 - `message: string`61566157 A human-readable description of the error.61586159 - `misalignment: optional object { detailed_explanation, error_type, steer }`61606161 - `detailed_explanation: optional string`61626163 The public explanation for this block.61646165 - `error_type: optional string or "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`61666167 An optional classification; clients must accept additional values.61686169 - `string`61706171 - `SafetyAlertErrorType = "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`61726173 An optional classification; clients must accept additional values.61746175 - `"potentially_unintended_data_transfer"`61766177 - `"potentially_unintended_data_access"`61786179 - `"potentially_unintended_destructive_activity"`61806181 - `"other"`61826183 - `steer: optional object { message }`61846185 An optional public continuation instruction.61866187 - `message: string`61886189 The public continuation instruction.61906191 - `incomplete_details: object { reason } or null`61926193 Details about why the response is incomplete.61946195 - `reason: optional "max_output_tokens" or "max_messages" or "content_filter" or "steered"`61966197 The reason why the response is incomplete. `steered` means6198 the response stopped at a safe output boundary after a6199 WebSocket `response.steer` event. The server can then create6200 a successor response automatically with the queued input.62016202 - `"max_output_tokens"`62036204 - `"max_messages"`62056206 - `"content_filter"`62076208 - `"steered"`62096210 - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more or null`62116212 A system (or developer) message inserted into the model's context.62136214 When using along with `previous_response_id`, the instructions from a previous6215 response will not be carried over to the next response. This makes it simple6216 to swap out system (or developer) messages in new responses.62176218 - `string`62196220 A text input to the model, equivalent to a text input with the6221 `developer` role.62226223 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more`62246225 A list of one or many input items to the model, containing6226 different content types.62276228 - `EasyInputMessage object { content, role, phase, type }`62296230 A message input to the model with a role indicating instruction following6231 hierarchy. Instructions given with the `developer` or `system` role take6232 precedence over instructions given with the `user` role. Messages with the6233 `assistant` role are presumed to have been generated by the model in previous6234 interactions.62356236 - `content: string or ResponseInputMessageContentList`62376238 Text, image, or audio input to the model, used to generate a response.6239 Can also contain previous assistant responses.62406241 - `TextInput = string`62426243 A text input to the model.62446245 - `ResponseInputMessageContentList = array of ResponseInputContent`62466247 A list of one or many input items to the model, containing different content6248 types.62496250 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`62516252 A text input to the model.62536254 - `text: string`62556256 The text input to the model.62576258 - `type: "input_text"`62596260 The type of the input item. Always `input_text`.62616262 - `"input_text"`62636264 - `prompt_cache_breakpoint: optional object { mode }`62656266 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.62676268 - `mode: "explicit"`62696270 The breakpoint mode. Always `explicit`.62716272 - `"explicit"`62736274 - `ResponseInputImage object { detail, type, file_id, 2 more }`62756276 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).62776278 - `detail: ImageDetail`62796280 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.62816282 - `"low"`62836284 - `"high"`62856286 - `"auto"`62876288 - `"original"`62896290 - `type: "input_image"`62916292 The type of the input item. Always `input_image`.62936294 - `"input_image"`62956296 - `file_id: optional string or null`62976298 The ID of the file to be sent to the model.62996300 - `image_url: optional string or null`63016302 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.63036304 - `prompt_cache_breakpoint: optional object { mode }`63056306 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.63076308 - `mode: "explicit"`63096310 The breakpoint mode. Always `explicit`.63116312 - `"explicit"`63136314 - `ResponseInputFile object { type, detail, file_data, 4 more }`63156316 A file input to the model.63176318 - `type: "input_file"`63196320 The type of the input item. Always `input_file`.63216322 - `"input_file"`63236324 - `detail: optional "auto" or "low" or "high"`63256326 The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.63276328 - `"auto"`63296330 - `"low"`63316332 - `"high"`63336334 - `file_data: optional string`63356336 The content of the file to be sent to the model.63376338 - `file_id: optional string or null`63396340 The ID of the file to be sent to the model.63416342 - `file_url: optional string`63436344 The URL of the file to be sent to the model.63456346 - `filename: optional string`63476348 The name of the file to be sent to the model.63496350 - `prompt_cache_breakpoint: optional object { mode }`63516352 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.63536354 - `mode: "explicit"`63556356 The breakpoint mode. Always `explicit`.63576358 - `"explicit"`63596360 - `role: "user" or "assistant" or "system" or "developer"`63616362 The role of the message input. One of `user`, `assistant`, `system`, or6363 `developer`.63646365 - `"user"`63666367 - `"assistant"`63686369 - `"system"`63706371 - `"developer"`63726373 - `phase: optional "commentary" or "final_answer" or null`63746375 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).6376 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend6377 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.63786379 - `"commentary"`63806381 - `"final_answer"`63826383 - `type: optional "message"`63846385 The type of the message input. Always `message`.63866387 - `"message"`63886389 - `Message object { content, role, status, type }`63906391 A message input to the model with a role indicating instruction following6392 hierarchy. Instructions given with the `developer` or `system` role take6393 precedence over instructions given with the `user` role.63946395 - `content: ResponseInputMessageContentList`63966397 A list of one or many input items to the model, containing different content6398 types.63996400 - `role: "user" or "system" or "developer"`64016402 The role of the message input. One of `user`, `system`, or `developer`.64036404 - `"user"`64056406 - `"system"`64076408 - `"developer"`64096410 - `status: optional "in_progress" or "completed" or "incomplete"`64116412 The status of item. One of `in_progress`, `completed`, or6413 `incomplete`. Populated when items are returned via API.64146415 - `"in_progress"`64166417 - `"completed"`64186419 - `"incomplete"`64206421 - `type: optional "message"`64226423 The type of the message input. Always set to `message`.64246425 - `"message"`64266427 - `ResponseOutputMessage object { id, content, role, 3 more }`64286429 An output message from the model.64306431 - `id: string`64326433 The unique ID of the output message.64346435 - `content: array of ResponseOutputText or ResponseOutputRefusal`64366437 The content of the output message.64386439 - `ResponseOutputText object { annotations, logprobs, text, type }`64406441 A text output from the model.64426443 - `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 }`64446445 The annotations of the text output.64466447 - `FileCitation object { file_id, filename, index, type }`64486449 A citation to a file.64506451 - `file_id: string`64526453 The ID of the file.64546455 - `filename: string`64566457 The filename of the file cited.64586459 - `index: number`64606461 The index of the file in the list of files.64626463 - `type: "file_citation"`64646465 The type of the file citation. Always `file_citation`.64666467 - `"file_citation"`64686469 - `URLCitation object { end_index, start_index, title, 2 more }`64706471 A citation for a web resource used to generate a model response.64726473 - `end_index: number`64746475 The index of the last character of the URL citation in the message.64766477 - `start_index: number`64786479 The index of the first character of the URL citation in the message.64806481 - `title: string`64826483 The title of the web resource.64846485 - `type: "url_citation"`64866487 The type of the URL citation. Always `url_citation`.64886489 - `"url_citation"`64906491 - `url: string`64926493 The URL of the web resource.64946495 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`64966497 A citation for a container file used to generate a model response.64986499 - `container_id: string`65006501 The ID of the container file.65026503 - `end_index: number`65046505 The index of the last character of the container file citation in the message.65066507 - `file_id: string`65086509 The ID of the file.65106511 - `filename: string`65126513 The filename of the container file cited.65146515 - `start_index: number`65166517 The index of the first character of the container file citation in the message.65186519 - `type: "container_file_citation"`65206521 The type of the container file citation. Always `container_file_citation`.65226523 - `"container_file_citation"`65246525 - `FilePath object { file_id, index, type }`65266527 A path to a file.65286529 - `file_id: string`65306531 The ID of the file.65326533 - `index: number`65346535 The index of the file in the list of files.65366537 - `type: "file_path"`65386539 The type of the file path. Always `file_path`.65406541 - `"file_path"`65426543 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`65446545 - `token: string`65466547 - `bytes: array of number`65486549 - `logprob: number`65506551 - `top_logprobs: array of object { token, bytes, logprob }`65526553 - `token: string`65546555 - `bytes: array of number`65566557 - `logprob: number`65586559 - `text: string`65606561 The text output from the model.65626563 - `type: "output_text"`65646565 The type of the output text. Always `output_text`.65666567 - `"output_text"`65686569 - `ResponseOutputRefusal object { refusal, type }`65706571 A refusal from the model.65726573 - `refusal: string`65746575 The refusal explanation from the model.65766577 - `type: "refusal"`65786579 The type of the refusal. Always `refusal`.65806581 - `"refusal"`65826583 - `role: "assistant"`65846585 The role of the output message. Always `assistant`.65866587 - `"assistant"`65886589 - `status: "in_progress" or "completed" or "incomplete"`65906591 The status of the message input. One of `in_progress`, `completed`, or6592 `incomplete`. Populated when input items are returned via API.65936594 - `"in_progress"`65956596 - `"completed"`65976598 - `"incomplete"`65996600 - `type: "message"`66016602 The type of the output message. Always `message`.66036604 - `"message"`66056606 - `phase: optional "commentary" or "final_answer" or null`66076608 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).6609 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend6610 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.66116612 - `"commentary"`66136614 - `"final_answer"`66156616 - `FileSearchCall object { id, queries, status, 2 more }`66176618 The results of a file search tool call. See the6619 [file search guide](/api/docs/guides/tools-file-search) for more information.66206621 - `id: string`66226623 The unique ID of the file search tool call.66246625 - `queries: array of string`66266627 The queries used to search for files.66286629 - `status: "in_progress" or "searching" or "completed" or 2 more`66306631 The status of the file search tool call. One of `in_progress`,6632 `searching`, `incomplete` or `failed`,66336634 - `"in_progress"`66356636 - `"searching"`66376638 - `"completed"`66396640 - `"incomplete"`66416642 - `"failed"`66436644 - `type: "file_search_call"`66456646 The type of the file search tool call. Always `file_search_call`.66476648 - `"file_search_call"`66496650 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`66516652 The results of the file search tool call.66536654 - `attributes: optional map[string or number or boolean] or null`66556656 Set of 16 key-value pairs that can be attached to an object. This can be6657 useful for storing additional information about the object in a structured6658 format, and querying for objects via API or the dashboard. Keys are strings6659 with a maximum length of 64 characters. Values are strings with a maximum6660 length of 512 characters, booleans, or numbers.66616662 - `string`66636664 - `number`66656666 - `boolean`66676668 - `file_id: optional string`66696670 The unique ID of the file.66716672 - `filename: optional string`66736674 The name of the file.66756676 - `score: optional number`66776678 The relevance score of the file - a value between 0 and 1.66796680 - `text: optional string`66816682 The text that was retrieved from the file.66836684 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`66856686 A tool call to a computer use tool. See the6687 [computer use guide](/api/docs/guides/tools-computer-use) for more information.66886689 - `id: string`66906691 The unique ID of the computer call.66926693 - `call_id: string`66946695 An identifier used when responding to the tool call with output.66966697 - `pending_safety_checks: array of object { id, code, message }`66986699 The pending safety checks for the computer call.67006701 - `id: string`67026703 The ID of the pending safety check.67046705 - `code: optional string or null`67066707 The type of the pending safety check.67086709 - `message: optional string or null`67106711 Details about the pending safety check.67126713 - `status: "in_progress" or "completed" or "incomplete"`67146715 The status of the item. One of `in_progress`, `completed`, or6716 `incomplete`. Populated when items are returned via API.67176718 - `"in_progress"`67196720 - `"completed"`67216722 - `"incomplete"`67236724 - `type: "computer_call"`67256726 The type of the computer call. Always `computer_call`.67276728 - `"computer_call"`67296730 - `action: optional ComputerAction`67316732 A click action.67336734 - `Click object { button, type, x, 2 more }`67356736 A click action.67376738 - `button: "left" or "right" or "wheel" or 2 more`67396740 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.67416742 - `"left"`67436744 - `"right"`67456746 - `"wheel"`67476748 - `"back"`67496750 - `"forward"`67516752 - `type: "click"`67536754 Specifies the event type. For a click action, this property is always `click`.67556756 - `"click"`67576758 - `x: number`67596760 The x-coordinate where the click occurred.67616762 - `y: number`67636764 The y-coordinate where the click occurred.67656766 - `keys: optional array of string or null`67676768 The keys being held while clicking.67696770 - `DoubleClick object { keys, type, x, y }`67716772 A double click action.67736774 - `keys: array of string or null`67756776 The keys being held while double-clicking.67776778 - `type: "double_click"`67796780 Specifies the event type. For a double click action, this property is always set to `double_click`.67816782 - `"double_click"`67836784 - `x: number`67856786 The x-coordinate where the double click occurred.67876788 - `y: number`67896790 The y-coordinate where the double click occurred.67916792 - `Drag object { path, type, keys }`67936794 A drag action.67956796 - `path: array of object { x, y }`67976798 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg67996800 ```6801 [6802 { x: 100, y: 200 },6803 { x: 200, y: 300 }6804 ]6805 ```68066807 - `x: number`68086809 The x-coordinate.68106811 - `y: number`68126813 The y-coordinate.68146815 - `type: "drag"`68166817 Specifies the event type. For a drag action, this property is always set to `drag`.68186819 - `"drag"`68206821 - `keys: optional array of string or null`68226823 The keys being held while dragging the mouse.68246825 - `Keypress object { keys, type }`68266827 A collection of keypresses the model would like to perform.68286829 - `keys: array of string`68306831 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.68326833 - `type: "keypress"`68346835 Specifies the event type. For a keypress action, this property is always set to `keypress`.68366837 - `"keypress"`68386839 - `Move object { type, x, y, keys }`68406841 A mouse move action.68426843 - `type: "move"`68446845 Specifies the event type. For a move action, this property is always set to `move`.68466847 - `"move"`68486849 - `x: number`68506851 The x-coordinate to move to.68526853 - `y: number`68546855 The y-coordinate to move to.68566857 - `keys: optional array of string or null`68586859 The keys being held while moving the mouse.68606861 - `Screenshot object { type }`68626863 A screenshot action.68646865 - `type: "screenshot"`68666867 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.68686869 - `"screenshot"`68706871 - `Scroll object { scroll_x, scroll_y, type, 3 more }`68726873 A scroll action.68746875 - `scroll_x: number`68766877 The horizontal scroll distance.68786879 - `scroll_y: number`68806881 The vertical scroll distance.68826883 - `type: "scroll"`68846885 Specifies the event type. For a scroll action, this property is always set to `scroll`.68866887 - `"scroll"`68886889 - `x: number`68906891 The x-coordinate where the scroll occurred.68926893 - `y: number`68946895 The y-coordinate where the scroll occurred.68966897 - `keys: optional array of string or null`68986899 The keys being held while scrolling.69006901 - `Type object { text, type }`69026903 An action to type in text.69046905 - `text: string`69066907 The text to type.69086909 - `type: "type"`69106911 Specifies the event type. For a type action, this property is always set to `type`.69126913 - `"type"`69146915 - `Wait object { type }`69166917 A wait action.69186919 - `type: "wait"`69206921 Specifies the event type. For a wait action, this property is always set to `wait`.69226923 - `"wait"`69246925 - `actions: optional ComputerActionList`69266927 Flattened batched actions for `computer_use`. Each action includes an6928 `type` discriminator and action-specific fields.69296930 - `Click object { button, type, x, 2 more }`69316932 A click action.69336934 - `DoubleClick object { keys, type, x, y }`69356936 A double click action.69376938 - `Drag object { path, type, keys }`69396940 A drag action.69416942 - `Keypress object { keys, type }`69436944 A collection of keypresses the model would like to perform.69456946 - `Move object { type, x, y, keys }`69476948 A mouse move action.69496950 - `Screenshot object { type }`69516952 A screenshot action.69536954 - `Scroll object { scroll_x, scroll_y, type, 3 more }`69556956 A scroll action.69576958 - `Type object { text, type }`69596960 An action to type in text.69616962 - `Wait object { type }`69636964 A wait action.69656966 - `ComputerCallOutput object { call_id, output, type, 3 more }`69676968 The output of a computer tool call.69696970 - `call_id: string`69716972 The ID of the computer tool call that produced the output.69736974 - `output: ResponseComputerToolCallOutputScreenshot`69756976 A computer screenshot image used with the computer use tool.69776978 - `type: "computer_screenshot"`69796980 Specifies the event type. For a computer screenshot, this property is6981 always set to `computer_screenshot`.69826983 - `"computer_screenshot"`69846985 - `file_id: optional string`69866987 The identifier of an uploaded file that contains the screenshot.69886989 - `image_url: optional string`69906991 The URL of the screenshot image.69926993 - `type: "computer_call_output"`69946995 The type of the computer tool call output. Always `computer_call_output`.69966997 - `"computer_call_output"`69986999 - `id: optional string or null`70007001 The ID of the computer tool call output.70027003 - `acknowledged_safety_checks: optional array of object { id, code, message } or null`70047005 The safety checks reported by the API that have been acknowledged by the developer.70067007 - `id: string`70087009 The ID of the pending safety check.70107011 - `code: optional string or null`70127013 The type of the pending safety check.70147015 - `message: optional string or null`70167017 Details about the pending safety check.70187019 - `status: optional "in_progress" or "completed" or "incomplete" or null`70207021 The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.70227023 - `"in_progress"`70247025 - `"completed"`70267027 - `"incomplete"`70287029 - `WebSearchCall object { id, action, status, type }`70307031 The results of a web search tool call. See the7032 [web search guide](/api/docs/guides/tools-web-search) for more information.70337034 - `id: string`70357036 The unique ID of the web search tool call.70377038 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`70397040 An object describing the specific action taken in this web search call.7041 Includes details on how the model used the web (search, open_page, find_in_page).70427043 - `Search object { type, queries, query, sources }`70447045 Action type "search" - Performs a web search query.70467047 - `type: "search"`70487049 The action type.70507051 - `"search"`70527053 - `queries: optional array of string`70547055 The search queries.70567057 - `query: optional string`70587059 The search query.70607061 - `sources: optional array of object { type, url }`70627063 The sources used in the search.70647065 - `type: "url"`70667067 The type of source. Always `url`.70687069 - `"url"`70707071 - `url: string`70727073 The URL of the source.70747075 - `OpenPage object { type, url }`70767077 Action type "open_page" - Opens a specific URL from search results.70787079 - `type: "open_page"`70807081 The action type.70827083 - `"open_page"`70847085 - `url: optional string or null`70867087 The URL opened by the model.70887089 - `FindInPage object { pattern, type, url }`70907091 Action type "find_in_page": Searches for a pattern within a loaded page.70927093 - `pattern: string`70947095 The pattern or text to search for within the page.70967097 - `type: "find_in_page"`70987099 The action type.71007101 - `"find_in_page"`71027103 - `url: string`71047105 The URL of the page searched for the pattern.71067107 - `status: "in_progress" or "searching" or "completed" or 2 more`71087109 The status of the web search tool call.71107111 - `"in_progress"`71127113 - `"searching"`71147115 - `"completed"`71167117 - `"failed"`71187119 - `"incomplete"`71207121 - `type: "web_search_call"`71227123 The type of the web search tool call. Always `web_search_call`.71247125 - `"web_search_call"`71267127 - `FunctionCall object { arguments, call_id, name, 6 more }`71287129 A tool call to run a function. See the7130 [function calling guide](/api/docs/guides/function-calling) for more information.71317132 - `arguments: string`71337134 A JSON string of the arguments to pass to the function.71357136 - `call_id: string`71377138 The unique ID of the function tool call generated by the model.71397140 - `name: string`71417142 The name of the function to run.71437144 - `type: "function_call"`71457146 The type of the function tool call. Always `function_call`.71477148 - `"function_call"`71497150 - `id: optional string`71517152 The unique ID of the function tool call.71537154 - `async: optional boolean`71557156 Whether the function tool call runs asynchronously.71577158 - `caller: optional object { type } or object { caller_id, type } or null`71597160 The execution context that produced this tool call.71617162 - `Direct object { type }`71637164 - `type: "direct"`71657166 - `"direct"`71677168 - `Program object { caller_id, type }`71697170 - `caller_id: string`71717172 The call ID of the program item that produced this tool call.71737174 - `type: "program"`71757176 - `"program"`71777178 - `namespace: optional string`71797180 The namespace of the function to run.71817182 - `status: optional "in_progress" or "completed" or "incomplete"`71837184 The status of the item. One of `in_progress`, `completed`, or7185 `incomplete`. Populated when items are returned via API.71867187 - `"in_progress"`71887189 - `"completed"`71907191 - `"incomplete"`71927193 - `FunctionCallOutput object { output, type, id, 5 more }`71947195 The output of a function tool call.71967197 - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`71987199 Text, image, or file output of the function tool call.72007201 - `string`72027203 A JSON string of the output of the function tool call.72047205 - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`72067207 An array of content outputs (text, image, file) for the function tool call.72087209 - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`72107211 A text input to the model.72127213 - `text: string`72147215 The text input to the model.72167217 - `type: "input_text"`72187219 The type of the input item. Always `input_text`.72207221 - `"input_text"`72227223 - `prompt_cache_breakpoint: optional object { mode } or null`72247225 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.72267227 - `mode: "explicit"`72287229 The breakpoint mode. Always `explicit`.72307231 - `"explicit"`72327233 - `ResponseInputImageContent object { type, detail, file_id, 2 more }`72347235 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)72367237 - `type: "input_image"`72387239 The type of the input item. Always `input_image`.72407241 - `"input_image"`72427243 - `detail: optional ImageDetail or null`72447245 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.72467247 - `file_id: optional string or null`72487249 The ID of the file to be sent to the model.72507251 - `image_url: optional string or null`72527253 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.72547255 - `prompt_cache_breakpoint: optional object { mode } or null`72567257 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.72587259 - `mode: "explicit"`72607261 The breakpoint mode. Always `explicit`.72627263 - `"explicit"`72647265 - `ResponseInputFileContent object { type, detail, file_data, 4 more }`72667267 A file input to the model.72687269 - `type: "input_file"`72707271 The type of the input item. Always `input_file`.72727273 - `"input_file"`72747275 - `detail: optional "auto" or "low" or "high"`72767277 The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`.72787279 - `"auto"`72807281 - `"low"`72827283 - `"high"`72847285 - `file_data: optional string or null`72867287 The base64-encoded data of the file to be sent to the model.72887289 - `file_id: optional string or null`72907291 The ID of the file to be sent to the model.72927293 - `file_url: optional string or null`72947295 The URL of the file to be sent to the model.72967297 - `filename: optional string or null`72987299 The name of the file to be sent to the model.73007301 - `prompt_cache_breakpoint: optional object { mode } or null`73027303 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.73047305 - `mode: "explicit"`73067307 The breakpoint mode. Always `explicit`.73087309 - `"explicit"`73107311 - `type: "function_call_output"`73127313 The type of the function tool call output. Always `function_call_output`.73147315 - `"function_call_output"`73167317 - `id: optional string or null`73187319 The unique ID of the function tool call output. Populated when this item is returned via API.73207321 - `call_id: optional string or null`73227323 The unique ID of the function tool call generated by the model.73247325 - `caller: optional object { type } or object { caller_id, type } or null`73267327 The execution context that produced this tool call.73287329 - `Direct object { type }`73307331 - `type: "direct"`73327333 The caller type. Always `direct`.73347335 - `"direct"`73367337 - `Program object { caller_id, type }`73387339 - `caller_id: string`73407341 The call ID of the program item that produced this tool call.73427343 - `type: "program"`73447345 The caller type. Always `program`.73467347 - `"program"`73487349 - `name: optional string or null`73507351 The name of the tool that produced the output.73527353 - `namespace: optional string or null`73547355 The namespace of the tool that produced the output.73567357 - `status: optional "in_progress" or "completed" or "incomplete" or null`73587359 The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.73607361 - `"in_progress"`73627363 - `"completed"`73647365 - `"incomplete"`73667367 - `ToolSearchCall object { arguments, type, id, 3 more }`73687369 - `arguments: unknown`73707371 The arguments supplied to the tool search call.73727373 - `type: "tool_search_call"`73747375 The item type. Always `tool_search_call`.73767377 - `"tool_search_call"`73787379 - `id: optional string or null`73807381 The unique ID of this tool search call.73827383 - `call_id: optional string or null`73847385 The unique ID of the tool search call generated by the model.73867387 - `execution: optional "server" or "client"`73887389 Whether tool search was executed by the server or by the client.73907391 - `"server"`73927393 - `"client"`73947395 - `status: optional "in_progress" or "completed" or "incomplete" or null`73967397 The status of the tool search call.73987399 - `"in_progress"`74007401 - `"completed"`74027403 - `"incomplete"`74047405 - `ToolSearchOutput object { tools, type, id, 3 more }`74067407 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`74087409 The loaded tool definitions returned by the tool search output.74107411 - `Function object { name, parameters, strict, 6 more }`74127413 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).74147415 - `name: string`74167417 The name of the function to call.74187419 - `parameters: map[unknown] or null`74207421 A JSON schema object describing the parameters of the function.74227423 - `strict: boolean or null`74247425 Whether strict parameter validation is enforced for this function tool.74267427 - `type: "function"`74287429 The type of the function tool. Always `function`.74307431 - `"function"`74327433 - `allowed_callers: optional array of "direct" or "programmatic" or null`74347435 The tool invocation context(s).74367437 - `"direct"`74387439 - `"programmatic"`74407441 - `async: optional boolean`74427443 - `defer_loading: optional boolean`74447445 Whether this function is deferred and loaded via tool search.74467447 - `description: optional string or null`74487449 A description of the function. Used by the model to determine whether or not to call the function.74507451 - `output_schema: optional map[unknown] or null`74527453 A JSON schema object describing the JSON value encoded in string outputs for this function.74547455 - `FileSearch object { type, vector_store_ids, filters, 2 more }`74567457 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).74587459 - `type: "file_search"`74607461 The type of the file search tool. Always `file_search`.74627463 - `"file_search"`74647465 - `vector_store_ids: array of string`74667467 The IDs of the vector stores to search.74687469 - `filters: optional ComparisonFilter or CompoundFilter or null`74707471 A filter to apply.74727473 - `ComparisonFilter object { key, type, value }`74747475 A filter used to compare a specified attribute key to a given value using a defined comparison operation.74767477 - `key: string`74787479 The key to compare against the value.74807481 - `type: "eq" or "ne" or "gt" or 5 more`74827483 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.74847485 - `eq`: equals7486 - `ne`: not equal7487 - `gt`: greater than7488 - `gte`: greater than or equal7489 - `lt`: less than7490 - `lte`: less than or equal7491 - `in`: in7492 - `nin`: not in74937494 - `"eq"`74957496 - `"ne"`74977498 - `"gt"`74997500 - `"gte"`75017502 - `"lt"`75037504 - `"lte"`75057506 - `"in"`75077508 - `"nin"`75097510 - `value: string or number or boolean or array of string or number`75117512 The value to compare against the attribute key; supports string, number, or boolean types.75137514 - `string`75157516 - `number`75177518 - `boolean`75197520 - `array of string or number`75217522 - `string`75237524 - `number`75257526 - `CompoundFilter object { filters, type }`75277528 Combine multiple filters using `and` or `or`.75297530 - `filters: array of ComparisonFilter or unknown`75317532 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.75337534 - `ComparisonFilter object { key, type, value }`75357536 A filter used to compare a specified attribute key to a given value using a defined comparison operation.75377538 - `unknown`75397540 - `type: "and" or "or"`75417542 Type of operation: `and` or `or`.75437544 - `"and"`75457546 - `"or"`75477548 - `max_num_results: optional number`75497550 The maximum number of results to return. This number should be between 1 and 50 inclusive.75517552 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`75537554 Ranking options for search.75557556 - `hybrid_search: optional object { embedding_weight, text_weight }`75577558 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.75597560 - `embedding_weight: number`75617562 The weight of the embedding in the reciprocal ranking fusion.75637564 - `text_weight: number`75657566 The weight of the text in the reciprocal ranking fusion.75677568 - `ranker: optional "auto" or "default-2024-11-15"`75697570 The ranker to use for the file search.75717572 - `"auto"`75737574 - `"default-2024-11-15"`75757576 - `score_threshold: optional number`75777578 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.75797580 - `Computer object { type }`75817582 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).75837584 - `type: "computer"`75857586 The type of the computer tool. Always `computer`.75877588 - `"computer"`75897590 - `ComputerUsePreview object { display_height, display_width, environment, type }`75917592 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).75937594 - `display_height: number`75957596 The height of the computer display.75977598 - `display_width: number`75997600 The width of the computer display.76017602 - `environment: "windows" or "mac" or "linux" or 2 more`76037604 The type of computer environment to control.76057606 - `"windows"`76077608 - `"mac"`76097610 - `"linux"`76117612 - `"ubuntu"`76137614 - `"browser"`76157616 - `type: "computer_use_preview"`76177618 The type of the computer use tool. Always `computer_use_preview`.76197620 - `"computer_use_preview"`76217622 - `WebSearch object { type, external_web_access, filters, 2 more }`76237624 Search the Internet for sources related to the prompt. Learn more about the7625 [web search tool](/api/docs/guides/tools-web-search).76267627 - `type: "web_search" or "web_search_2025_08_26"`76287629 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.76307631 - `"web_search"`76327633 - `"web_search_2025_08_26"`76347635 - `external_web_access: optional boolean`76367637 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.76387639 - `filters: optional object { allowed_domains } or null`76407641 Filters for the search.76427643 - `allowed_domains: optional array of string or null`76447645 Allowed domains for the search. If not provided, all domains are allowed.7646 Subdomains of the provided domains are allowed as well.76477648 Example: `["pubmed.ncbi.nlm.nih.gov"]`76497650 - `search_context_size: optional "low" or "medium" or "high"`76517652 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.76537654 - `"low"`76557656 - `"medium"`76577658 - `"high"`76597660 - `user_location: optional object { city, country, region, 2 more } or null`76617662 The approximate location of the user.76637664 - `city: optional string or null`76657666 Free text input for the city of the user, e.g. `San Francisco`.76677668 - `country: optional string or null`76697670 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.76717672 - `region: optional string or null`76737674 Free text input for the region of the user, e.g. `California`.76757676 - `timezone: optional string or null`76777678 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.76797680 - `type: optional "approximate"`76817682 The type of location approximation. Always `approximate`.76837684 - `"approximate"`76857686 - `Mcp object { server_label, type, allowed_callers, 9 more }`76877688 Give the model access to additional tools via remote Model Context Protocol7689 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).76907691 - `server_label: string`76927693 A label for this MCP server, used to identify it in tool calls.76947695 - `type: "mcp"`76967697 The type of the MCP tool. Always `mcp`.76987699 - `"mcp"`77007701 - `allowed_callers: optional array of "direct" or "programmatic" or null`77027703 The tool invocation context(s).77047705 - `"direct"`77067707 - `"programmatic"`77087709 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`77107711 List of allowed tool names or a filter object.77127713 - `McpAllowedTools = array of string`77147715 A string array of allowed tool names77167717 - `McpToolFilter object { read_only, tool_names }`77187719 A filter object to specify which tools are allowed.77207721 - `read_only: optional boolean`77227723 Indicates whether or not a tool modifies data or is read-only. If an7724 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),7725 it will match this filter.77267727 - `tool_names: optional array of string`77287729 List of allowed tool names.77307731 - `authorization: optional string`77327733 An OAuth access token that can be used with a remote MCP server, either7734 with a custom MCP server URL or a service connector. Your application7735 must handle the OAuth authorization flow and provide the token here.77367737 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`77387739 Identifier for service connectors, like those available in ChatGPT. One of7740 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more7741 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).77427743 This field is deprecated for models released after September 1, 2026.7744 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to7745 connect through a Secure MCP Tunnel.77467747 Currently supported `connector_id` values are:77487749 - Dropbox: `connector_dropbox`7750 - Gmail: `connector_gmail`7751 - Google Calendar: `connector_googlecalendar`7752 - Google Drive: `connector_googledrive`7753 - Microsoft Teams: `connector_microsoftteams`7754 - Outlook Calendar: `connector_outlookcalendar`7755 - Outlook Email: `connector_outlookemail`7756 - SharePoint: `connector_sharepoint`77577758 - `"connector_dropbox"`77597760 - `"connector_gmail"`77617762 - `"connector_googlecalendar"`77637764 - `"connector_googledrive"`77657766 - `"connector_microsoftteams"`77677768 - `"connector_outlookcalendar"`77697770 - `"connector_outlookemail"`77717772 - `"connector_sharepoint"`77737774 - `defer_loading: optional boolean`77757776 Whether this MCP tool is deferred and discovered via tool search.77777778 - `headers: optional map[string] or null`77797780 Optional HTTP headers to send to the MCP server. Use for authentication7781 or other purposes.77827783 - `require_approval: optional object { always, never } or "always" or "never" or null`77847785 Specify which of the MCP server's tools require approval.77867787 - `McpToolApprovalFilter object { always, never }`77887789 Specify which of the MCP server's tools require approval. Can be7790 `always`, `never`, or a filter object associated with tools7791 that require approval.77927793 - `always: optional object { read_only, tool_names }`77947795 A filter object to specify which tools are allowed.77967797 - `read_only: optional boolean`77987799 Indicates whether or not a tool modifies data or is read-only. If an7800 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),7801 it will match this filter.78027803 - `tool_names: optional array of string`78047805 List of allowed tool names.78067807 - `never: optional object { read_only, tool_names }`78087809 A filter object to specify which tools are allowed.78107811 - `read_only: optional boolean`78127813 Indicates whether or not a tool modifies data or is read-only. If an7814 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),7815 it will match this filter.78167817 - `tool_names: optional array of string`78187819 List of allowed tool names.78207821 - `McpToolApprovalSetting = "always" or "never"`78227823 Specify a single approval policy for all tools. One of `always` or7824 `never`. When set to `always`, all tools will require approval. When7825 set to `never`, all tools will not require approval.78267827 - `"always"`78287829 - `"never"`78307831 - `server_description: optional string`78327833 Optional description of the MCP server, used to provide more context.78347835 - `server_url: optional string`78367837 The URL for the MCP server. One of `server_url`, `connector_id`, or7838 `tunnel_id` must be provided.78397840 - `tunnel_id: optional string`78417842 The Secure MCP Tunnel ID to use instead of a direct server URL. One of7843 `server_url`, `connector_id`, or `tunnel_id` must be provided.78447845 - `CodeInterpreter object { container, type, allowed_callers }`78467847 A tool that runs Python code to help generate a response to a prompt.78487849 - `container: string or object { type, file_ids, memory_limit, network_policy }`78507851 The code interpreter container. Can be a container ID or an object that7852 specifies uploaded file IDs to make available to your code, along with an7853 optional `memory_limit` setting.78547855 - `string`78567857 The container ID.78587859 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`78607861 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.78627863 - `type: "auto"`78647865 Always `auto`.78667867 - `"auto"`78687869 - `file_ids: optional array of string`78707871 An optional list of uploaded files to make available to your code.78727873 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`78747875 The memory limit for the code interpreter container.78767877 - `"1g"`78787879 - `"4g"`78807881 - `"16g"`78827883 - `"64g"`78847885 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`78867887 Network access policy for the container.78887889 - `ContainerNetworkPolicyDisabled object { type }`78907891 - `type: "disabled"`78927893 Disable outbound network access. Always `disabled`.78947895 - `"disabled"`78967897 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`78987899 - `allowed_domains: array of string`79007901 A list of allowed domains when type is `allowlist`.79027903 - `type: "allowlist"`79047905 Allow outbound network access only to specified domains. Always `allowlist`.79067907 - `"allowlist"`79087909 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`79107911 Optional domain-scoped secrets for allowlisted domains.79127913 - `domain: string`79147915 The domain associated with the secret.79167917 - `name: string`79187919 The name of the secret to inject for the domain.79207921 - `value: string`79227923 The secret value to inject for the domain.79247925 - `type: "code_interpreter"`79267927 The type of the code interpreter tool. Always `code_interpreter`.79287929 - `"code_interpreter"`79307931 - `allowed_callers: optional array of "direct" or "programmatic" or null`79327933 The tool invocation context(s).79347935 - `"direct"`79367937 - `"programmatic"`79387939 - `ProgrammaticToolCalling object { type }`79407941 - `type: "programmatic_tool_calling"`79427943 The type of the tool. Always `programmatic_tool_calling`.79447945 - `"programmatic_tool_calling"`79467947 - `ImageGeneration object { type, action, background, 9 more }`79487949 A tool that generates images using the GPT image models.79507951 - `type: "image_generation"`79527953 The type of the image generation tool. Always `image_generation`.79547955 - `"image_generation"`79567957 - `action: optional "generate" or "edit" or "auto"`79587959 Whether to generate a new image or edit an existing image. Default: `auto`.79607961 - `"generate"`79627963 - `"edit"`79647965 - `"auto"`79667967 - `background: optional "transparent" or "opaque" or "auto"`79687969 Set the background of the generated image. One of `transparent`, `opaque`,7970 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including7971 their `2026-09-08` snapshots, support `opaque` and `transparent`7972 backgrounds. Transparent backgrounds are available for supported GPT Image7973 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in7974 preview. When using `transparent`, set the output format to `png` or `webp`.7975 Default: `auto`.79767977 - `"transparent"`79787979 - `"opaque"`79807981 - `"auto"`79827983 - `input_fidelity: optional "high" or "low" or null`79847985 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`.79867987 - `"high"`79887989 - `"low"`79907991 - `input_image_mask: optional object { file_id, image_url }`79927993 Optional mask for inpainting. Contains `image_url`7994 (string, optional) and `file_id` (string, optional).79957996 - `file_id: optional string`79977998 File ID for the mask image.79998000 - `image_url: optional string`80018002 Base64-encoded mask image.80038004 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`80058006 The image generation model to use. One of `gpt-image-1`,8007 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,8008 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,8009 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,8010 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:8011 `gpt-image-1`.80128013 - `string`80148015 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`80168017 The image generation model to use. One of `gpt-image-1`,8018 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,8019 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,8020 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,8021 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:8022 `gpt-image-1`.80238024 - `"gpt-image-1"`80258026 - `"gpt-image-1-mini"`80278028 - `"gpt-image-1.5"`80298030 - `"gpt-image-2"`80318032 - `"gpt-image-2-2026-04-21"`80338034 - `"gpt-image-2.5-sunburst"`80358036 - `"gpt-image-2.5-sunburst-2026-09-08"`80378038 - `"gpt-image-2.5-flare"`80398040 - `"gpt-image-2.5-flare-2026-09-08"`80418042 - `moderation: optional "auto" or "low"`80438044 Moderation level for the generated image. Default: `auto`.80458046 - `"auto"`80478048 - `"low"`80498050 - `output_compression: optional number`80518052 Compression level for the output image. Default: 100.80538054 - `output_format: optional "png" or "webp" or "jpeg"`80558056 The output format of the generated image. One of `png`, `webp`, or8057 `jpeg`. Default: `png`.80588059 - `"png"`80608061 - `"webp"`80628063 - `"jpeg"`80648065 - `partial_images: optional number`80668067 Number of partial images to generate in streaming mode, from 0 (default value) to 3.80688069 - `quality: optional "low" or "medium" or "high" or 3 more`80708071 The quality of the generated image. The GPT image models support `low`,8072 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,8073 including their `2026-09-08` snapshots, also support `xhigh` and `max`.8074 Default: `auto`.80758076 - `"low"`80778078 - `"medium"`80798080 - `"high"`80818082 - `"xhigh"`80838084 - `"max"`80858086 - `"auto"`80878088 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`80898090 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.80918092 - `string`80938094 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`80958096 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.80978098 - `"1024x1024"`80998100 - `"1024x1536"`81018102 - `"1536x1024"`81038104 - `"auto"`81058106 - `LocalShell object { type }`81078108 A tool that allows the model to execute shell commands in a local environment.81098110 - `type: "local_shell"`81118112 The type of the local shell tool. Always `local_shell`.81138114 - `"local_shell"`81158116 - `Shell object { type, allowed_callers, environment }`81178118 A tool that allows the model to execute shell commands.81198120 - `type: "shell"`81218122 The type of the shell tool. Always `shell`.81238124 - `"shell"`81258126 - `allowed_callers: optional array of "direct" or "programmatic" or null`81278128 The tool invocation context(s).81298130 - `"direct"`81318132 - `"programmatic"`81338134 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`81358136 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`81378138 - `type: "container_auto"`81398140 Automatically creates a container for this request81418142 - `"container_auto"`81438144 - `file_ids: optional array of string`81458146 An optional list of uploaded files to make available to your code.81478148 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`81498150 The memory limit for the container.81518152 - `"1g"`81538154 - `"4g"`81558156 - `"16g"`81578158 - `"64g"`81598160 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`81618162 Network access policy for the container.81638164 - `ContainerNetworkPolicyDisabled object { type }`81658166 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`81678168 - `skills: optional array of SkillReference or InlineSkill`81698170 An optional list of skills referenced by id or inline data.81718172 - `SkillReference object { skill_id, type, version }`81738174 - `skill_id: string`81758176 The ID of the referenced skill.81778178 - `type: "skill_reference"`81798180 References a skill created with the /v1/skills endpoint.81818182 - `"skill_reference"`81838184 - `version: optional string`81858186 Optional skill version. Use a positive integer or 'latest'. Omit for default.81878188 - `InlineSkill object { description, name, source, type }`81898190 - `description: string`81918192 The description of the skill.81938194 - `name: string`81958196 The name of the skill.81978198 - `source: InlineSkillSource`81998200 Inline skill payload82018202 - `data: string`82038204 Base64-encoded skill zip bundle.82058206 - `media_type: "application/zip"`82078208 The media type of the inline skill payload. Must be `application/zip`.82098210 - `"application/zip"`82118212 - `type: "base64"`82138214 The type of the inline skill source. Must be `base64`.82158216 - `"base64"`82178218 - `type: "inline"`82198220 Defines an inline skill for this request.82218222 - `"inline"`82238224 - `LocalEnvironment object { type, skills }`82258226 - `type: "local"`82278228 Use a local computer environment.82298230 - `"local"`82318232 - `skills: optional array of LocalSkill`82338234 An optional list of skills.82358236 - `description: string`82378238 The description of the skill.82398240 - `name: string`82418242 The name of the skill.82438244 - `path: string`82458246 The path to the directory containing the skill.82478248 - `ContainerReference object { container_id, type }`82498250 - `container_id: string`82518252 The ID of the referenced container.82538254 - `type: "container_reference"`82558256 References a container created with the /v1/containers endpoint82578258 - `"container_reference"`82598260 - `Custom object { name, type, allowed_callers, 4 more }`82618262 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)82638264 - `name: string`82658266 The name of the custom tool, used to identify it in tool calls.82678268 - `type: "custom"`82698270 The type of the custom tool. Always `custom`.82718272 - `"custom"`82738274 - `allowed_callers: optional array of "direct" or "programmatic" or null`82758276 The tool invocation context(s).82778278 - `"direct"`82798280 - `"programmatic"`82818282 - `async: optional boolean`82838284 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.82858286 - `defer_loading: optional boolean`82878288 Whether this tool should be deferred and discovered via tool search.82898290 - `description: optional string`82918292 Optional description of the custom tool, used to provide more context.82938294 - `format: optional CustomToolInputFormat`82958296 The input format for the custom tool. Default is unconstrained text.82978298 - `Text object { type }`82998300 Unconstrained free-form text.83018302 - `type: "text"`83038304 Unconstrained text format. Always `text`.83058306 - `"text"`83078308 - `Grammar object { definition, syntax, type }`83098310 A grammar defined by the user.83118312 - `definition: string`83138314 The grammar definition.83158316 - `syntax: "lark" or "regex"`83178318 The syntax of the grammar definition. One of `lark` or `regex`.83198320 - `"lark"`83218322 - `"regex"`83238324 - `type: "grammar"`83258326 Grammar format. Always `grammar`.83278328 - `"grammar"`83298330 - `Namespace object { description, name, tools, type }`83318332 Groups function/custom tools under a shared namespace.83338334 - `description: string`83358336 A description of the namespace shown to the model.83378338 - `name: string`83398340 The namespace name used in tool calls (for example, `crm`).83418342 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`83438344 The function/custom tools available inside this namespace.83458346 - `Function object { name, type, allowed_callers, 6 more }`83478348 - `name: string`83498350 - `type: "function"`83518352 - `"function"`83538354 - `allowed_callers: optional array of "direct" or "programmatic" or null`83558356 The tool invocation context(s).83578358 - `"direct"`83598360 - `"programmatic"`83618362 - `async: optional boolean`83638364 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.83658366 - `defer_loading: optional boolean`83678368 Whether this function should be deferred and discovered via tool search.83698370 - `description: optional string or null`83718372 - `output_schema: optional map[unknown] or null`83738374 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.83758376 - `parameters: optional unknown or null`83778378 - `strict: optional boolean or null`83798380 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.83818382 - `Custom object { name, type, allowed_callers, 4 more }`83838384 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)83858386 - `name: string`83878388 The name of the custom tool, used to identify it in tool calls.83898390 - `type: "custom"`83918392 The type of the custom tool. Always `custom`.83938394 - `"custom"`83958396 - `allowed_callers: optional array of "direct" or "programmatic" or null`83978398 The tool invocation context(s).83998400 - `"direct"`84018402 - `"programmatic"`84038404 - `async: optional boolean`84058406 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.84078408 - `defer_loading: optional boolean`84098410 Whether this tool should be deferred and discovered via tool search.84118412 - `description: optional string`84138414 Optional description of the custom tool, used to provide more context.84158416 - `format: optional CustomToolInputFormat`84178418 The input format for the custom tool. Default is unconstrained text.84198420 - `type: "namespace"`84218422 The type of the tool. Always `namespace`.84238424 - `"namespace"`84258426 - `ToolSearch object { type, description, execution, parameters }`84278428 Hosted or BYOT tool search configuration for deferred tools.84298430 - `type: "tool_search"`84318432 The type of the tool. Always `tool_search`.84338434 - `"tool_search"`84358436 - `description: optional string or null`84378438 Description shown to the model for a client-executed tool search tool.84398440 - `execution: optional "server" or "client"`84418442 Whether tool search is executed by the server or by the client.84438444 - `"server"`84458446 - `"client"`84478448 - `parameters: optional unknown or null`84498450 Parameter schema for a client-executed tool search tool.84518452 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`84538454 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).84558456 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`84578458 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.84598460 - `"web_search_preview"`84618462 - `"web_search_preview_2025_03_11"`84638464 - `search_content_types: optional array of "text" or "image"`84658466 - `"text"`84678468 - `"image"`84698470 - `search_context_size: optional "low" or "medium" or "high"`84718472 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.84738474 - `"low"`84758476 - `"medium"`84778478 - `"high"`84798480 - `user_location: optional object { type, city, country, 2 more } or null`84818482 The user's location.84838484 - `type: "approximate"`84858486 The type of location approximation. Always `approximate`.84878488 - `"approximate"`84898490 - `city: optional string or null`84918492 Free text input for the city of the user, e.g. `San Francisco`.84938494 - `country: optional string or null`84958496 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.84978498 - `region: optional string or null`84998500 Free text input for the region of the user, e.g. `California`.85018502 - `timezone: optional string or null`85038504 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.85058506 - `ApplyPatch object { type, allowed_callers }`85078508 Allows the assistant to create, delete, or update files using unified diffs.85098510 - `type: "apply_patch"`85118512 The type of the tool. Always `apply_patch`.85138514 - `"apply_patch"`85158516 - `allowed_callers: optional array of "direct" or "programmatic" or null`85178518 The tool invocation context(s).85198520 - `"direct"`85218522 - `"programmatic"`85238524 - `type: "tool_search_output"`85258526 The item type. Always `tool_search_output`.85278528 - `"tool_search_output"`85298530 - `id: optional string or null`85318532 The unique ID of this tool search output.85338534 - `call_id: optional string or null`85358536 The unique ID of the tool search call generated by the model.85378538 - `execution: optional "server" or "client"`85398540 Whether tool search was executed by the server or by the client.85418542 - `"server"`85438544 - `"client"`85458546 - `status: optional "in_progress" or "completed" or "incomplete" or null`85478548 The status of the tool search output.85498550 - `"in_progress"`85518552 - `"completed"`85538554 - `"incomplete"`85558556 - `AdditionalTools object { role, tools, type, id }`85578558 - `role: "developer"`85598560 The role that provided the additional tools. Only `developer` is supported.85618562 - `"developer"`85638564 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`85658566 A list of additional tools made available at this item.85678568 - `Function object { name, parameters, strict, 6 more }`85698570 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).85718572 - `name: string`85738574 The name of the function to call.85758576 - `parameters: map[unknown] or null`85778578 A JSON schema object describing the parameters of the function.85798580 - `strict: boolean or null`85818582 Whether strict parameter validation is enforced for this function tool.85838584 - `type: "function"`85858586 The type of the function tool. Always `function`.85878588 - `"function"`85898590 - `allowed_callers: optional array of "direct" or "programmatic" or null`85918592 The tool invocation context(s).85938594 - `"direct"`85958596 - `"programmatic"`85978598 - `async: optional boolean`85998600 - `defer_loading: optional boolean`86018602 Whether this function is deferred and loaded via tool search.86038604 - `description: optional string or null`86058606 A description of the function. Used by the model to determine whether or not to call the function.86078608 - `output_schema: optional map[unknown] or null`86098610 A JSON schema object describing the JSON value encoded in string outputs for this function.86118612 - `FileSearch object { type, vector_store_ids, filters, 2 more }`86138614 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).86158616 - `type: "file_search"`86178618 The type of the file search tool. Always `file_search`.86198620 - `"file_search"`86218622 - `vector_store_ids: array of string`86238624 The IDs of the vector stores to search.86258626 - `filters: optional ComparisonFilter or CompoundFilter or null`86278628 A filter to apply.86298630 - `ComparisonFilter object { key, type, value }`86318632 A filter used to compare a specified attribute key to a given value using a defined comparison operation.86338634 - `CompoundFilter object { filters, type }`86358636 Combine multiple filters using `and` or `or`.86378638 - `max_num_results: optional number`86398640 The maximum number of results to return. This number should be between 1 and 50 inclusive.86418642 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`86438644 Ranking options for search.86458646 - `hybrid_search: optional object { embedding_weight, text_weight }`86478648 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.86498650 - `embedding_weight: number`86518652 The weight of the embedding in the reciprocal ranking fusion.86538654 - `text_weight: number`86558656 The weight of the text in the reciprocal ranking fusion.86578658 - `ranker: optional "auto" or "default-2024-11-15"`86598660 The ranker to use for the file search.86618662 - `"auto"`86638664 - `"default-2024-11-15"`86658666 - `score_threshold: optional number`86678668 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.86698670 - `Computer object { type }`86718672 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).86738674 - `type: "computer"`86758676 The type of the computer tool. Always `computer`.86778678 - `"computer"`86798680 - `ComputerUsePreview object { display_height, display_width, environment, type }`86818682 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).86838684 - `display_height: number`86858686 The height of the computer display.86878688 - `display_width: number`86898690 The width of the computer display.86918692 - `environment: "windows" or "mac" or "linux" or 2 more`86938694 The type of computer environment to control.86958696 - `"windows"`86978698 - `"mac"`86998700 - `"linux"`87018702 - `"ubuntu"`87038704 - `"browser"`87058706 - `type: "computer_use_preview"`87078708 The type of the computer use tool. Always `computer_use_preview`.87098710 - `"computer_use_preview"`87118712 - `WebSearch object { type, external_web_access, filters, 2 more }`87138714 Search the Internet for sources related to the prompt. Learn more about the8715 [web search tool](/api/docs/guides/tools-web-search).87168717 - `type: "web_search" or "web_search_2025_08_26"`87188719 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.87208721 - `"web_search"`87228723 - `"web_search_2025_08_26"`87248725 - `external_web_access: optional boolean`87268727 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.87288729 - `filters: optional object { allowed_domains } or null`87308731 Filters for the search.87328733 - `allowed_domains: optional array of string or null`87348735 Allowed domains for the search. If not provided, all domains are allowed.8736 Subdomains of the provided domains are allowed as well.87378738 Example: `["pubmed.ncbi.nlm.nih.gov"]`87398740 - `search_context_size: optional "low" or "medium" or "high"`87418742 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.87438744 - `"low"`87458746 - `"medium"`87478748 - `"high"`87498750 - `user_location: optional object { city, country, region, 2 more } or null`87518752 The approximate location of the user.87538754 - `city: optional string or null`87558756 Free text input for the city of the user, e.g. `San Francisco`.87578758 - `country: optional string or null`87598760 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.87618762 - `region: optional string or null`87638764 Free text input for the region of the user, e.g. `California`.87658766 - `timezone: optional string or null`87678768 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.87698770 - `type: optional "approximate"`87718772 The type of location approximation. Always `approximate`.87738774 - `"approximate"`87758776 - `Mcp object { server_label, type, allowed_callers, 9 more }`87778778 Give the model access to additional tools via remote Model Context Protocol8779 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).87808781 - `server_label: string`87828783 A label for this MCP server, used to identify it in tool calls.87848785 - `type: "mcp"`87868787 The type of the MCP tool. Always `mcp`.87888789 - `"mcp"`87908791 - `allowed_callers: optional array of "direct" or "programmatic" or null`87928793 The tool invocation context(s).87948795 - `"direct"`87968797 - `"programmatic"`87988799 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`88008801 List of allowed tool names or a filter object.88028803 - `McpAllowedTools = array of string`88048805 A string array of allowed tool names88068807 - `McpToolFilter object { read_only, tool_names }`88088809 A filter object to specify which tools are allowed.88108811 - `read_only: optional boolean`88128813 Indicates whether or not a tool modifies data or is read-only. If an8814 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8815 it will match this filter.88168817 - `tool_names: optional array of string`88188819 List of allowed tool names.88208821 - `authorization: optional string`88228823 An OAuth access token that can be used with a remote MCP server, either8824 with a custom MCP server URL or a service connector. Your application8825 must handle the OAuth authorization flow and provide the token here.88268827 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`88288829 Identifier for service connectors, like those available in ChatGPT. One of8830 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more8831 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).88328833 This field is deprecated for models released after September 1, 2026.8834 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to8835 connect through a Secure MCP Tunnel.88368837 Currently supported `connector_id` values are:88388839 - Dropbox: `connector_dropbox`8840 - Gmail: `connector_gmail`8841 - Google Calendar: `connector_googlecalendar`8842 - Google Drive: `connector_googledrive`8843 - Microsoft Teams: `connector_microsoftteams`8844 - Outlook Calendar: `connector_outlookcalendar`8845 - Outlook Email: `connector_outlookemail`8846 - SharePoint: `connector_sharepoint`88478848 - `"connector_dropbox"`88498850 - `"connector_gmail"`88518852 - `"connector_googlecalendar"`88538854 - `"connector_googledrive"`88558856 - `"connector_microsoftteams"`88578858 - `"connector_outlookcalendar"`88598860 - `"connector_outlookemail"`88618862 - `"connector_sharepoint"`88638864 - `defer_loading: optional boolean`88658866 Whether this MCP tool is deferred and discovered via tool search.88678868 - `headers: optional map[string] or null`88698870 Optional HTTP headers to send to the MCP server. Use for authentication8871 or other purposes.88728873 - `require_approval: optional object { always, never } or "always" or "never" or null`88748875 Specify which of the MCP server's tools require approval.88768877 - `McpToolApprovalFilter object { always, never }`88788879 Specify which of the MCP server's tools require approval. Can be8880 `always`, `never`, or a filter object associated with tools8881 that require approval.88828883 - `always: optional object { read_only, tool_names }`88848885 A filter object to specify which tools are allowed.88868887 - `read_only: optional boolean`88888889 Indicates whether or not a tool modifies data or is read-only. If an8890 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8891 it will match this filter.88928893 - `tool_names: optional array of string`88948895 List of allowed tool names.88968897 - `never: optional object { read_only, tool_names }`88988899 A filter object to specify which tools are allowed.89008901 - `read_only: optional boolean`89028903 Indicates whether or not a tool modifies data or is read-only. If an8904 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8905 it will match this filter.89068907 - `tool_names: optional array of string`89088909 List of allowed tool names.89108911 - `McpToolApprovalSetting = "always" or "never"`89128913 Specify a single approval policy for all tools. One of `always` or8914 `never`. When set to `always`, all tools will require approval. When8915 set to `never`, all tools will not require approval.89168917 - `"always"`89188919 - `"never"`89208921 - `server_description: optional string`89228923 Optional description of the MCP server, used to provide more context.89248925 - `server_url: optional string`89268927 The URL for the MCP server. One of `server_url`, `connector_id`, or8928 `tunnel_id` must be provided.89298930 - `tunnel_id: optional string`89318932 The Secure MCP Tunnel ID to use instead of a direct server URL. One of8933 `server_url`, `connector_id`, or `tunnel_id` must be provided.89348935 - `CodeInterpreter object { container, type, allowed_callers }`89368937 A tool that runs Python code to help generate a response to a prompt.89388939 - `container: string or object { type, file_ids, memory_limit, network_policy }`89408941 The code interpreter container. Can be a container ID or an object that8942 specifies uploaded file IDs to make available to your code, along with an8943 optional `memory_limit` setting.89448945 - `string`89468947 The container ID.89488949 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`89508951 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.89528953 - `type: "auto"`89548955 Always `auto`.89568957 - `"auto"`89588959 - `file_ids: optional array of string`89608961 An optional list of uploaded files to make available to your code.89628963 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`89648965 The memory limit for the code interpreter container.89668967 - `"1g"`89688969 - `"4g"`89708971 - `"16g"`89728973 - `"64g"`89748975 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`89768977 Network access policy for the container.89788979 - `ContainerNetworkPolicyDisabled object { type }`89808981 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`89828983 - `type: "code_interpreter"`89848985 The type of the code interpreter tool. Always `code_interpreter`.89868987 - `"code_interpreter"`89888989 - `allowed_callers: optional array of "direct" or "programmatic" or null`89908991 The tool invocation context(s).89928993 - `"direct"`89948995 - `"programmatic"`89968997 - `ProgrammaticToolCalling object { type }`89988999 - `type: "programmatic_tool_calling"`90009001 The type of the tool. Always `programmatic_tool_calling`.90029003 - `"programmatic_tool_calling"`90049005 - `ImageGeneration object { type, action, background, 9 more }`90069007 A tool that generates images using the GPT image models.90089009 - `type: "image_generation"`90109011 The type of the image generation tool. Always `image_generation`.90129013 - `"image_generation"`90149015 - `action: optional "generate" or "edit" or "auto"`90169017 Whether to generate a new image or edit an existing image. Default: `auto`.90189019 - `"generate"`90209021 - `"edit"`90229023 - `"auto"`90249025 - `background: optional "transparent" or "opaque" or "auto"`90269027 Set the background of the generated image. One of `transparent`, `opaque`,9028 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including9029 their `2026-09-08` snapshots, support `opaque` and `transparent`9030 backgrounds. Transparent backgrounds are available for supported GPT Image9031 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in9032 preview. When using `transparent`, set the output format to `png` or `webp`.9033 Default: `auto`.90349035 - `"transparent"`90369037 - `"opaque"`90389039 - `"auto"`90409041 - `input_fidelity: optional "high" or "low" or null`90429043 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`.90449045 - `"high"`90469047 - `"low"`90489049 - `input_image_mask: optional object { file_id, image_url }`90509051 Optional mask for inpainting. Contains `image_url`9052 (string, optional) and `file_id` (string, optional).90539054 - `file_id: optional string`90559056 File ID for the mask image.90579058 - `image_url: optional string`90599060 Base64-encoded mask image.90619062 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`90639064 The image generation model to use. One of `gpt-image-1`,9065 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,9066 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,9067 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,9068 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:9069 `gpt-image-1`.90709071 - `string`90729073 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`90749075 The image generation model to use. One of `gpt-image-1`,9076 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,9077 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,9078 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,9079 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:9080 `gpt-image-1`.90819082 - `"gpt-image-1"`90839084 - `"gpt-image-1-mini"`90859086 - `"gpt-image-1.5"`90879088 - `"gpt-image-2"`90899090 - `"gpt-image-2-2026-04-21"`90919092 - `"gpt-image-2.5-sunburst"`90939094 - `"gpt-image-2.5-sunburst-2026-09-08"`90959096 - `"gpt-image-2.5-flare"`90979098 - `"gpt-image-2.5-flare-2026-09-08"`90999100 - `moderation: optional "auto" or "low"`91019102 Moderation level for the generated image. Default: `auto`.91039104 - `"auto"`91059106 - `"low"`91079108 - `output_compression: optional number`91099110 Compression level for the output image. Default: 100.91119112 - `output_format: optional "png" or "webp" or "jpeg"`91139114 The output format of the generated image. One of `png`, `webp`, or9115 `jpeg`. Default: `png`.91169117 - `"png"`91189119 - `"webp"`91209121 - `"jpeg"`91229123 - `partial_images: optional number`91249125 Number of partial images to generate in streaming mode, from 0 (default value) to 3.91269127 - `quality: optional "low" or "medium" or "high" or 3 more`91289129 The quality of the generated image. The GPT image models support `low`,9130 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,9131 including their `2026-09-08` snapshots, also support `xhigh` and `max`.9132 Default: `auto`.91339134 - `"low"`91359136 - `"medium"`91379138 - `"high"`91399140 - `"xhigh"`91419142 - `"max"`91439144 - `"auto"`91459146 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`91479148 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.91499150 - `string`91519152 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`91539154 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.91559156 - `"1024x1024"`91579158 - `"1024x1536"`91599160 - `"1536x1024"`91619162 - `"auto"`91639164 - `LocalShell object { type }`91659166 A tool that allows the model to execute shell commands in a local environment.91679168 - `type: "local_shell"`91699170 The type of the local shell tool. Always `local_shell`.91719172 - `"local_shell"`91739174 - `Shell object { type, allowed_callers, environment }`91759176 A tool that allows the model to execute shell commands.91779178 - `type: "shell"`91799180 The type of the shell tool. Always `shell`.91819182 - `"shell"`91839184 - `allowed_callers: optional array of "direct" or "programmatic" or null`91859186 The tool invocation context(s).91879188 - `"direct"`91899190 - `"programmatic"`91919192 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`91939194 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`91959196 - `LocalEnvironment object { type, skills }`91979198 - `ContainerReference object { container_id, type }`91999200 - `Custom object { name, type, allowed_callers, 4 more }`92019202 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)92039204 - `name: string`92059206 The name of the custom tool, used to identify it in tool calls.92079208 - `type: "custom"`92099210 The type of the custom tool. Always `custom`.92119212 - `"custom"`92139214 - `allowed_callers: optional array of "direct" or "programmatic" or null`92159216 The tool invocation context(s).92179218 - `"direct"`92199220 - `"programmatic"`92219222 - `async: optional boolean`92239224 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.92259226 - `defer_loading: optional boolean`92279228 Whether this tool should be deferred and discovered via tool search.92299230 - `description: optional string`92319232 Optional description of the custom tool, used to provide more context.92339234 - `format: optional CustomToolInputFormat`92359236 The input format for the custom tool. Default is unconstrained text.92379238 - `Namespace object { description, name, tools, type }`92399240 Groups function/custom tools under a shared namespace.92419242 - `description: string`92439244 A description of the namespace shown to the model.92459246 - `name: string`92479248 The namespace name used in tool calls (for example, `crm`).92499250 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`92519252 The function/custom tools available inside this namespace.92539254 - `Function object { name, type, allowed_callers, 6 more }`92559256 - `name: string`92579258 - `type: "function"`92599260 - `"function"`92619262 - `allowed_callers: optional array of "direct" or "programmatic" or null`92639264 The tool invocation context(s).92659266 - `"direct"`92679268 - `"programmatic"`92699270 - `async: optional boolean`92719272 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.92739274 - `defer_loading: optional boolean`92759276 Whether this function should be deferred and discovered via tool search.92779278 - `description: optional string or null`92799280 - `output_schema: optional map[unknown] or null`92819282 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.92839284 - `parameters: optional unknown or null`92859286 - `strict: optional boolean or null`92879288 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.92899290 - `Custom object { name, type, allowed_callers, 4 more }`92919292 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)92939294 - `name: string`92959296 The name of the custom tool, used to identify it in tool calls.92979298 - `type: "custom"`92999300 The type of the custom tool. Always `custom`.93019302 - `"custom"`93039304 - `allowed_callers: optional array of "direct" or "programmatic" or null`93059306 The tool invocation context(s).93079308 - `"direct"`93099310 - `"programmatic"`93119312 - `async: optional boolean`93139314 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.93159316 - `defer_loading: optional boolean`93179318 Whether this tool should be deferred and discovered via tool search.93199320 - `description: optional string`93219322 Optional description of the custom tool, used to provide more context.93239324 - `format: optional CustomToolInputFormat`93259326 The input format for the custom tool. Default is unconstrained text.93279328 - `type: "namespace"`93299330 The type of the tool. Always `namespace`.93319332 - `"namespace"`93339334 - `ToolSearch object { type, description, execution, parameters }`93359336 Hosted or BYOT tool search configuration for deferred tools.93379338 - `type: "tool_search"`93399340 The type of the tool. Always `tool_search`.93419342 - `"tool_search"`93439344 - `description: optional string or null`93459346 Description shown to the model for a client-executed tool search tool.93479348 - `execution: optional "server" or "client"`93499350 Whether tool search is executed by the server or by the client.93519352 - `"server"`93539354 - `"client"`93559356 - `parameters: optional unknown or null`93579358 Parameter schema for a client-executed tool search tool.93599360 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`93619362 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).93639364 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`93659366 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.93679368 - `"web_search_preview"`93699370 - `"web_search_preview_2025_03_11"`93719372 - `search_content_types: optional array of "text" or "image"`93739374 - `"text"`93759376 - `"image"`93779378 - `search_context_size: optional "low" or "medium" or "high"`93799380 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.93819382 - `"low"`93839384 - `"medium"`93859386 - `"high"`93879388 - `user_location: optional object { type, city, country, 2 more } or null`93899390 The user's location.93919392 - `type: "approximate"`93939394 The type of location approximation. Always `approximate`.93959396 - `"approximate"`93979398 - `city: optional string or null`93999400 Free text input for the city of the user, e.g. `San Francisco`.94019402 - `country: optional string or null`94039404 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.94059406 - `region: optional string or null`94079408 Free text input for the region of the user, e.g. `California`.94099410 - `timezone: optional string or null`94119412 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.94139414 - `ApplyPatch object { type, allowed_callers }`94159416 Allows the assistant to create, delete, or update files using unified diffs.94179418 - `type: "apply_patch"`94199420 The type of the tool. Always `apply_patch`.94219422 - `"apply_patch"`94239424 - `allowed_callers: optional array of "direct" or "programmatic" or null`94259426 The tool invocation context(s).94279428 - `"direct"`94299430 - `"programmatic"`94319432 - `type: "additional_tools"`94339434 The item type. Always `additional_tools`.94359436 - `"additional_tools"`94379438 - `id: optional string or null`94399440 The unique ID of this additional tools item.94419442 - `ConfigurationUpdate object { type, id, reasoning }`94439444 An update to the conversation's response configuration. The configuration9445 remains in effect for subsequent responses until it is replaced by another9446 configuration update.94479448 - `type: "configuration_update"`94499450 The item type. Always `configuration_update`.94519452 - `"configuration_update"`94539454 - `id: optional string or null`94559456 The unique ID of the configuration update item.94579458 - `reasoning: optional object { effort }`94599460 Updates to reasoning configuration. Only effort is supported.94619462 - `effort: optional ReasoningEffort or null`94639464 The reasoning effort to use for subsequent responses until another9465 configuration update replaces it.94669467 - `"none"`94689469 - `"minimal"`94709471 - `"low"`94729473 - `"medium"`94749475 - `"high"`94769477 - `"xhigh"`94789479 - `"max"`94809481 - `Reasoning object { id, summary, type, 3 more }`94829483 A description of the chain of thought used by a reasoning model while generating9484 a response. Be sure to include these items in your `input` to the Responses API9485 for subsequent turns of a conversation if you are manually9486 [managing context](/api/docs/guides/conversation-state).94879488 - `id: string`94899490 The unique identifier of the reasoning content.94919492 - `summary: array of SummaryTextContent`94939494 Reasoning summary content.94959496 - `text: string`94979498 A summary of the reasoning output from the model so far.94999500 - `type: "summary_text"`95019502 The type of the object. Always `summary_text`.95039504 - `"summary_text"`95059506 - `type: "reasoning"`95079508 The type of the object. Always `reasoning`.95099510 - `"reasoning"`95119512 - `content: optional array of object { text, type }`95139514 Reasoning text content.95159516 - `text: string`95179518 The reasoning text from the model.95199520 - `type: "reasoning_text"`95219522 The type of the reasoning text. Always `reasoning_text`.95239524 - `"reasoning_text"`95259526 - `encrypted_content: optional string or null`95279528 The encrypted content of the reasoning item. This is populated by default9529 for reasoning items returned by `POST /v1/responses` and WebSocket9530 `response.create` requests.95319532 When streaming, use the completed reasoning item and its9533 `encrypted_content` from the `response.output_item.done` event in9534 subsequent requests. The `encrypted_content` in9535 `response.output_item.added` may be incomplete. This is especially9536 important when `store` is `false` or when using Zero Data Retention.95379538 - `status: optional "in_progress" or "completed" or "incomplete"`95399540 The status of the item. One of `in_progress`, `completed`, or9541 `incomplete`. Populated when items are returned via API.95429543 - `"in_progress"`95449545 - `"completed"`95469547 - `"incomplete"`95489549 - `Compaction object { encrypted_content, type, id }`95509551 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).95529553 - `encrypted_content: string`95549555 The encrypted content of the compaction summary.95569557 - `type: "compaction"`95589559 The type of the item. Always `compaction`.95609561 - `"compaction"`95629563 - `id: optional string or null`95649565 The ID of the compaction item.95669567 - `ImageGenerationCall object { id, result, status, 7 more }`95689569 An image generation request made by the model.95709571 - `id: string`95729573 The unique ID of the image generation call.95749575 - `result: string or null`95769577 The generated image encoded in base64.95789579 - `status: "in_progress" or "completed" or "generating" or "failed"`95809581 The status of the image generation call.95829583 - `"in_progress"`95849585 - `"completed"`95869587 - `"generating"`95889589 - `"failed"`95909591 - `type: "image_generation_call"`95929593 The type of the image generation call. Always `image_generation_call`.95949595 - `"image_generation_call"`95969597 - `action: optional "generate" or "edit" or "auto" or null`95989599 The action used for image generation.96009601 - `"generate"`96029603 - `"edit"`96049605 - `"auto"`96069607 - `background: optional "transparent" or "opaque" or "auto" or null`96089609 The background setting used for generation.96109611 - `"transparent"`96129613 - `"opaque"`96149615 - `"auto"`96169617 - `output_format: optional "png" or "webp" or "jpeg" or null`96189619 The output format used for generation.96209621 - `"png"`96229623 - `"webp"`96249625 - `"jpeg"`96269627 - `quality: optional "low" or "medium" or "high" or 3 more or null`96289629 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.96309631 - `"low"`96329633 - `"medium"`96349635 - `"high"`96369637 - `"xhigh"`96389639 - `"max"`96409641 - `"auto"`96429643 - `revised_prompt: optional string or null`96449645 The prompt that was used after any model prompt rewriting.96469647 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`96489649 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.96509651 - `string`96529653 - `"1024x1024" or "1024x1536" or "1536x1024"`96549655 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.96569657 - `"1024x1024"`96589659 - `"1024x1536"`96609661 - `"1536x1024"`96629663 - `CodeInterpreterCall object { id, code, container_id, 3 more }`96649665 A tool call to run code.96669667 - `id: string`96689669 The unique ID of the code interpreter tool call.96709671 - `code: string or null`96729673 The code to run, or null if not available.96749675 - `container_id: string`96769677 The ID of the container used to run the code.96789679 - `outputs: array of object { logs, type } or object { type, url } or null`96809681 The outputs generated by the code interpreter, such as logs or images.9682 Can be null if no outputs are available.96839684 - `Logs object { logs, type }`96859686 The logs output from the code interpreter.96879688 - `logs: string`96899690 The logs output from the code interpreter.96919692 - `type: "logs"`96939694 The type of the output. Always `logs`.96959696 - `"logs"`96979698 - `Image object { type, url }`96999700 The image output from the code interpreter.97019702 - `type: "image"`97039704 The type of the output. Always `image`.97059706 - `"image"`97079708 - `url: string`97099710 The URL of the image output from the code interpreter.97119712 - `status: "in_progress" or "completed" or "incomplete" or 2 more`97139714 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.97159716 - `"in_progress"`97179718 - `"completed"`97199720 - `"incomplete"`97219722 - `"interpreting"`97239724 - `"failed"`97259726 - `type: "code_interpreter_call"`97279728 The type of the code interpreter tool call. Always `code_interpreter_call`.97299730 - `"code_interpreter_call"`97319732 - `LocalShellCall object { id, action, call_id, 2 more }`97339734 A tool call to run a command on the local shell.97359736 - `id: string`97379738 The unique ID of the local shell call.97399740 - `action: object { command, env, type, 3 more }`97419742 Execute a shell command on the server.97439744 - `command: array of string`97459746 The command to run.97479748 - `env: map[string]`97499750 Environment variables to set for the command.97519752 - `type: "exec"`97539754 The type of the local shell action. Always `exec`.97559756 - `"exec"`97579758 - `timeout_ms: optional number or null`97599760 Optional timeout in milliseconds for the command.97619762 - `user: optional string or null`97639764 Optional user to run the command as.97659766 - `working_directory: optional string or null`97679768 Optional working directory to run the command in.97699770 - `call_id: string`97719772 The unique ID of the local shell tool call generated by the model.97739774 - `status: "in_progress" or "completed" or "incomplete"`97759776 The status of the local shell call.97779778 - `"in_progress"`97799780 - `"completed"`97819782 - `"incomplete"`97839784 - `type: "local_shell_call"`97859786 The type of the local shell call. Always `local_shell_call`.97879788 - `"local_shell_call"`97899790 - `LocalShellCallOutput object { id, output, type, status }`97919792 The output of a local shell tool call.97939794 - `id: string`97959796 The unique ID of the local shell tool call generated by the model.97979798 - `output: string`97999800 A JSON string of the output of the local shell tool call.98019802 - `type: "local_shell_call_output"`98039804 The type of the local shell tool call output. Always `local_shell_call_output`.98059806 - `"local_shell_call_output"`98079808 - `status: optional "in_progress" or "completed" or "incomplete" or null`98099810 The status of the item. One of `in_progress`, `completed`, or `incomplete`.98119812 - `"in_progress"`98139814 - `"completed"`98159816 - `"incomplete"`98179818 - `ShellCall object { action, call_id, type, 4 more }`98199820 A tool representing a request to execute one or more shell commands.98219822 - `action: object { commands, max_output_length, timeout_ms }`98239824 The shell commands and limits that describe how to run the tool call.98259826 - `commands: array of string`98279828 Ordered shell commands for the execution environment to run.98299830 - `max_output_length: optional number or null`98319832 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.98339834 - `timeout_ms: optional number or null`98359836 Maximum wall-clock time in milliseconds to allow the shell commands to run.98379838 - `call_id: string`98399840 The unique ID of the shell tool call generated by the model.98419842 - `type: "shell_call"`98439844 The type of the item. Always `shell_call`.98459846 - `"shell_call"`98479848 - `id: optional string or null`98499850 The unique ID of the shell tool call. Populated when this item is returned via API.98519852 - `caller: optional object { type } or object { caller_id, type } or null`98539854 The execution context that produced this tool call.98559856 - `Direct object { type }`98579858 - `type: "direct"`98599860 The caller type. Always `direct`.98619862 - `"direct"`98639864 - `Program object { caller_id, type }`98659866 - `caller_id: string`98679868 The call ID of the program item that produced this tool call.98699870 - `type: "program"`98719872 The caller type. Always `program`.98739874 - `"program"`98759876 - `environment: optional LocalEnvironment or ContainerReference or null`98779878 The environment to execute the shell commands in.98799880 - `LocalEnvironment object { type, skills }`98819882 - `ContainerReference object { container_id, type }`98839884 - `status: optional "in_progress" or "completed" or "incomplete" or null`98859886 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.98879888 - `"in_progress"`98899890 - `"completed"`98919892 - `"incomplete"`98939894 - `ShellCallOutput object { call_id, output, type, 4 more }`98959896 The streamed output items emitted by a shell tool call.98979898 - `call_id: string`98999900 The unique ID of the shell tool call generated by the model.99019902 - `output: array of ResponseFunctionShellCallOutputContent`99039904 Captured chunks of stdout and stderr output, along with their associated outcomes.99059906 - `outcome: object { type } or object { exit_code, type }`99079908 The exit or timeout outcome associated with this shell call.99099910 - `Timeout object { type }`99119912 Indicates that the shell call exceeded its configured time limit.99139914 - `type: "timeout"`99159916 The outcome type. Always `timeout`.99179918 - `"timeout"`99199920 - `Exit object { exit_code, type }`99219922 Indicates that the shell commands finished and returned an exit code.99239924 - `exit_code: number`99259926 The exit code returned by the shell process.99279928 - `type: "exit"`99299930 The outcome type. Always `exit`.99319932 - `"exit"`99339934 - `stderr: string`99359936 Captured stderr output for the shell call.99379938 - `stdout: string`99399940 Captured stdout output for the shell call.99419942 - `type: "shell_call_output"`99439944 The type of the item. Always `shell_call_output`.99459946 - `"shell_call_output"`99479948 - `id: optional string or null`99499950 The unique ID of the shell tool call output. Populated when this item is returned via API.99519952 - `caller: optional object { type } or object { caller_id, type } or null`99539954 The execution context that produced this tool call.99559956 - `Direct object { type }`99579958 - `type: "direct"`99599960 The caller type. Always `direct`.99619962 - `"direct"`99639964 - `Program object { caller_id, type }`99659966 - `caller_id: string`99679968 The call ID of the program item that produced this tool call.99699970 - `type: "program"`99719972 The caller type. Always `program`.99739974 - `"program"`99759976 - `max_output_length: optional number or null`99779978 The maximum number of UTF-8 characters captured for this shell call's combined output.99799980 - `status: optional "in_progress" or "completed" or "incomplete" or null`99819982 The status of the shell call output.99839984 - `"in_progress"`99859986 - `"completed"`99879988 - `"incomplete"`99899990 - `ApplyPatchCall object { call_id, operation, status, 3 more }`99919992 A tool call representing a request to create, delete, or update files using diff patches.99939994 - `call_id: string`99959996 The unique ID of the apply patch tool call generated by the model.99979998 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`999910000 The specific create, delete, or update instruction for the apply_patch tool call.1000110002 - `CreateFile object { diff, path, type }`1000310004 Instruction for creating a new file via the apply_patch tool.1000510006 - `diff: string`1000710008 Unified diff content to apply when creating the file.1000910010 - `path: string`1001110012 Path of the file to create relative to the workspace root.1001310014 - `type: "create_file"`1001510016 The operation type. Always `create_file`.1001710018 - `"create_file"`1001910020 - `DeleteFile object { path, type }`1002110022 Instruction for deleting an existing file via the apply_patch tool.1002310024 - `path: string`1002510026 Path of the file to delete relative to the workspace root.1002710028 - `type: "delete_file"`1002910030 The operation type. Always `delete_file`.1003110032 - `"delete_file"`1003310034 - `UpdateFile object { diff, path, type }`1003510036 Instruction for updating an existing file via the apply_patch tool.1003710038 - `diff: string`1003910040 Unified diff content to apply to the existing file.1004110042 - `path: string`1004310044 Path of the file to update relative to the workspace root.1004510046 - `type: "update_file"`1004710048 The operation type. Always `update_file`.1004910050 - `"update_file"`1005110052 - `status: "in_progress" or "completed"`1005310054 The status of the apply patch tool call. One of `in_progress` or `completed`.1005510056 - `"in_progress"`1005710058 - `"completed"`1005910060 - `type: "apply_patch_call"`1006110062 The type of the item. Always `apply_patch_call`.1006310064 - `"apply_patch_call"`1006510066 - `id: optional string or null`1006710068 The unique ID of the apply patch tool call. Populated when this item is returned via API.1006910070 - `caller: optional object { type } or object { caller_id, type } or null`1007110072 The execution context that produced this tool call.1007310074 - `Direct object { type }`1007510076 - `type: "direct"`1007710078 The caller type. Always `direct`.1007910080 - `"direct"`1008110082 - `Program object { caller_id, type }`1008310084 - `caller_id: string`1008510086 The call ID of the program item that produced this tool call.1008710088 - `type: "program"`1008910090 The caller type. Always `program`.1009110092 - `"program"`1009310094 - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`1009510096 The streamed output emitted by an apply patch tool call.1009710098 - `call_id: string`1009910100 The unique ID of the apply patch tool call generated by the model.1010110102 - `status: "completed" or "failed"`1010310104 The status of the apply patch tool call output. One of `completed` or `failed`.1010510106 - `"completed"`1010710108 - `"failed"`1010910110 - `type: "apply_patch_call_output"`1011110112 The type of the item. Always `apply_patch_call_output`.1011310114 - `"apply_patch_call_output"`1011510116 - `id: optional string or null`1011710118 The unique ID of the apply patch tool call output. Populated when this item is returned via API.1011910120 - `caller: optional object { type } or object { caller_id, type } or null`1012110122 The execution context that produced this tool call.1012310124 - `Direct object { type }`1012510126 - `type: "direct"`1012710128 The caller type. Always `direct`.1012910130 - `"direct"`1013110132 - `Program object { caller_id, type }`1013310134 - `caller_id: string`1013510136 The call ID of the program item that produced this tool call.1013710138 - `type: "program"`1013910140 The caller type. Always `program`.1014110142 - `"program"`1014310144 - `output: optional string or null`1014510146 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).1014710148 - `McpListTools object { id, server_label, tools, 2 more }`1014910150 A list of tools available on an MCP server.1015110152 - `id: string`1015310154 The unique ID of the list.1015510156 - `server_label: string`1015710158 The label of the MCP server.1015910160 - `tools: array of object { input_schema, name, annotations, description }`1016110162 The tools available on the server.1016310164 - `input_schema: unknown`1016510166 The JSON schema describing the tool's input.1016710168 - `name: string`1016910170 The name of the tool.1017110172 - `annotations: optional unknown or null`1017310174 Additional annotations about the tool.1017510176 - `description: optional string or null`1017710178 The description of the tool.1017910180 - `type: "mcp_list_tools"`1018110182 The type of the item. Always `mcp_list_tools`.1018310184 - `"mcp_list_tools"`1018510186 - `error: optional string or null`1018710188 Error message if the server could not list tools.1018910190 - `McpApprovalRequest object { id, arguments, name, 2 more }`1019110192 A request for human approval of a tool invocation.1019310194 - `id: string`1019510196 The unique ID of the approval request.1019710198 - `arguments: string`1019910200 A JSON string of arguments for the tool.1020110202 - `name: string`1020310204 The name of the tool to run.1020510206 - `server_label: string`1020710208 The label of the MCP server making the request.1020910210 - `type: "mcp_approval_request"`1021110212 The type of the item. Always `mcp_approval_request`.1021310214 - `"mcp_approval_request"`1021510216 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`1021710218 A response to an MCP approval request.1021910220 - `approval_request_id: string`1022110222 The ID of the approval request being answered.1022310224 - `approve: boolean`1022510226 Whether the request was approved.1022710228 - `type: "mcp_approval_response"`1022910230 The type of the item. Always `mcp_approval_response`.1023110232 - `"mcp_approval_response"`1023310234 - `id: optional string or null`1023510236 The unique ID of the approval response1023710238 - `reason: optional string or null`1023910240 Optional reason for the decision.1024110242 - `McpCall object { id, arguments, name, 6 more }`1024310244 An invocation of a tool on an MCP server.1024510246 - `id: string`1024710248 The unique ID of the tool call.1024910250 - `arguments: string`1025110252 A JSON string of the arguments passed to the tool.1025310254 - `name: string`1025510256 The name of the tool that was run.1025710258 - `server_label: string`1025910260 The label of the MCP server running the tool.1026110262 - `type: "mcp_call"`1026310264 The type of the item. Always `mcp_call`.1026510266 - `"mcp_call"`1026710268 - `approval_request_id: optional string or null`1026910270 Unique identifier for the MCP tool call approval request.10271 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.1027210273 - `error: optional McpToolCallError or null`1027410275 The error from the tool call, if any.1027610277 - `McpProtocolError object { code, message, type }`1027810279 - `code: number`1028010281 - `message: string`1028210283 - `type: "mcp_protocol_error"`1028410285 - `"mcp_protocol_error"`1028610287 - `McpToolExecutionError object { content, type }`1028810289 - `content: unknown`1029010291 - `type: "mcp_tool_execution_error"`1029210293 - `"mcp_tool_execution_error"`1029410295 - `HTTPError object { code, message, type }`1029610297 - `code: number`1029810299 - `message: string`1030010301 - `type: "http_error"`1030210303 - `"http_error"`1030410305 - `output: optional string or null`1030610307 The output from the tool call.1030810309 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`1031010311 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.1031210313 - `"in_progress"`1031410315 - `"completed"`1031610317 - `"incomplete"`1031810319 - `"calling"`1032010321 - `"failed"`1032210323 - `CustomToolCallOutput object { call_id, output, type, 2 more }`1032410325 The output of a custom tool call from your code, being sent back to the model.1032610327 - `call_id: string`1032810329 The call ID, used to map this custom tool call output to a custom tool call.1033010331 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`1033210333 The output from the custom tool call generated by your code.10334 Can be a string or an list of output content.1033510336 - `StringOutput = string`1033710338 A string of the output of the custom tool call.1033910340 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`1034110342 Text, image, or file output of the custom tool call.1034310344 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1034510346 A text input to the model.1034710348 - `ResponseInputImage object { detail, type, file_id, 2 more }`1034910350 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1035110352 - `ResponseInputFile object { type, detail, file_data, 4 more }`1035310354 A file input to the model.1035510356 - `type: "custom_tool_call_output"`1035710358 The type of the custom tool call output. Always `custom_tool_call_output`.1035910360 - `"custom_tool_call_output"`1036110362 - `id: optional string`1036310364 The unique ID of the custom tool call output in the OpenAI platform.1036510366 - `caller: optional object { type } or object { caller_id, type } or null`1036710368 The execution context that produced this tool call.1036910370 - `Direct object { type }`1037110372 - `type: "direct"`1037310374 The caller type. Always `direct`.1037510376 - `"direct"`1037710378 - `Program object { caller_id, type }`1037910380 - `caller_id: string`1038110382 The call ID of the program item that produced this tool call.1038310384 - `type: "program"`1038510386 The caller type. Always `program`.1038710388 - `"program"`1038910390 - `CustomToolCall object { call_id, input, name, 5 more }`1039110392 A call to a custom tool created by the model.1039310394 - `call_id: string`1039510396 An identifier used to map this custom tool call to a tool call output.1039710398 - `input: string`1039910400 The input for the custom tool call generated by the model.1040110402 - `name: string`1040310404 The name of the custom tool being called.1040510406 - `type: "custom_tool_call"`1040710408 The type of the custom tool call. Always `custom_tool_call`.1040910410 - `"custom_tool_call"`1041110412 - `id: optional string`1041310414 The unique ID of the custom tool call in the OpenAI platform.1041510416 - `async: optional boolean`1041710418 Whether the custom tool call runs asynchronously.1041910420 - `caller: optional object { type } or object { caller_id, type } or null`1042110422 The execution context that produced this tool call.1042310424 - `Direct object { type }`1042510426 - `type: "direct"`1042710428 - `"direct"`1042910430 - `Program object { caller_id, type }`1043110432 - `caller_id: string`1043310434 The call ID of the program item that produced this tool call.1043510436 - `type: "program"`1043710438 - `"program"`1043910440 - `namespace: optional string`1044110442 The namespace of the custom tool being called.1044310444 - `CompactionTrigger object { type, id }`1044510446 Compacts the current context. Must be the final input item.1044710448 - `type: "compaction_trigger"`1044910450 The type of the item. Always `compaction_trigger`.1045110452 - `"compaction_trigger"`1045310454 - `id: optional string or null`1045510456 The unique ID of this compaction trigger.1045710458 - `ItemReference object { id, type }`1045910460 An internal identifier for an item to reference.1046110462 - `id: string`1046310464 The ID of the item to reference.1046510466 - `type: optional "item_reference" or null`1046710468 The type of item to reference. Always `item_reference`.1046910470 - `"item_reference"`1047110472 - `Program object { id, call_id, code, 2 more }`1047310474 - `id: string`1047510476 The unique ID of this program item.1047710478 - `call_id: string`1047910480 The stable call ID of the program item.1048110482 - `code: string`1048310484 The JavaScript source executed by programmatic tool calling.1048510486 - `fingerprint: string`1048710488 Opaque program replay fingerprint that must be round-tripped.1048910490 - `type: "program"`1049110492 The item type. Always `program`.1049310494 - `"program"`1049510496 - `ProgramOutput object { id, call_id, result, 2 more }`1049710498 - `id: string`1049910500 The unique ID of this program output item.1050110502 - `call_id: string`1050310504 The call ID of the program item.1050510506 - `result: string`1050710508 The result produced by the program item.1050910510 - `status: "completed" or "incomplete"`1051110512 The terminal status of the program output.1051310514 - `"completed"`1051510516 - `"incomplete"`1051710518 - `type: "program_output"`1051910520 The item type. Always `program_output`.1052110522 - `"program_output"`1052310524 - `metadata: Metadata or null`1052510526 Set of 16 key-value pairs that can be attached to an object. This can be10527 useful for storing additional information about the object in a structured10528 format, and querying for objects via API or the dashboard.1052910530 Keys are strings with a maximum length of 64 characters. Values are strings10531 with a maximum length of 512 characters.1053210533 - `model: ResponsesModel`1053410535 Model ID used to generate the response, like `gpt-6-astra`. OpenAI10536 offers a wide range of models with different capabilities, performance10537 characteristics, and price points. Refer to the [model guide](/api/docs/models)10538 to browse and compare available models.1053910540 - `string`1054110542 - `"gpt-6-astra" or "gpt-5.6-sol" or "gpt-5.6-terra" or 82 more`1054310544 - `"gpt-6-astra"`1054510546 - `"gpt-5.6-sol"`1054710548 - `"gpt-5.6-terra"`1054910550 - `"gpt-5.6-luna"`1055110552 - `"gpt-5.5"`1055310554 - `"gpt-5.5-2026-04-23"`1055510556 - `"gpt-5.4"`1055710558 - `"gpt-5.4-mini"`1055910560 - `"gpt-5.4-nano"`1056110562 - `"gpt-5.4-mini-2026-03-17"`1056310564 - `"gpt-5.4-nano-2026-03-17"`1056510566 - `"gpt-5.3-chat-latest"`1056710568 - `"gpt-5.2"`1056910570 - `"gpt-5.2-2025-12-11"`1057110572 - `"gpt-5.2-chat-latest"`1057310574 - `"gpt-5.2-pro"`1057510576 - `"gpt-5.2-pro-2025-12-11"`1057710578 - `"gpt-5.1"`1057910580 - `"gpt-5.1-2025-11-13"`1058110582 - `"gpt-5.1-codex"`1058310584 - `"gpt-5.1-chat-latest"`1058510586 - `"gpt-5"`1058710588 - `"gpt-5-mini"`1058910590 - `"gpt-5-nano"`1059110592 - `"gpt-5-2025-08-07"`1059310594 - `"gpt-5-mini-2025-08-07"`1059510596 - `"gpt-5-nano-2025-08-07"`1059710598 - `"gpt-5-chat-latest"`1059910600 - `"gpt-4.1"`1060110602 - `"gpt-4.1-mini"`1060310604 - `"gpt-4.1-nano"`1060510606 - `"gpt-4.1-2025-04-14"`1060710608 - `"gpt-4.1-mini-2025-04-14"`1060910610 - `"gpt-4.1-nano-2025-04-14"`1061110612 - `"o4-mini"`1061310614 - `"o4-mini-2025-04-16"`1061510616 - `"o3"`1061710618 - `"o3-2025-04-16"`1061910620 - `"o3-mini"`1062110622 - `"o3-mini-2025-01-31"`1062310624 - `"o1"`1062510626 - `"o1-2024-12-17"`1062710628 - `"o1-preview"`1062910630 - `"o1-preview-2024-09-12"`1063110632 - `"o1-mini"`1063310634 - `"o1-mini-2024-09-12"`1063510636 - `"gpt-4o"`1063710638 - `"gpt-4o-2024-11-20"`1063910640 - `"gpt-4o-2024-08-06"`1064110642 - `"gpt-4o-2024-05-13"`1064310644 - `"gpt-audio-mini"`1064510646 - `"gpt-audio-mini-2025-12-15"`1064710648 - `"gpt-4o-audio-preview"`1064910650 - `"gpt-4o-audio-preview-2024-10-01"`1065110652 - `"gpt-4o-audio-preview-2024-12-17"`1065310654 - `"gpt-4o-audio-preview-2025-06-03"`1065510656 - `"gpt-4o-mini-audio-preview"`1065710658 - `"gpt-4o-mini-audio-preview-2024-12-17"`1065910660 - `"gpt-4o-search-preview"`1066110662 - `"gpt-4o-mini-search-preview"`1066310664 - `"gpt-4o-search-preview-2025-03-11"`1066510666 - `"gpt-4o-mini-search-preview-2025-03-11"`1066710668 - `"chatgpt-4o-latest"`1066910670 - `"codex-mini-latest"`1067110672 - `"gpt-4o-mini"`1067310674 - `"gpt-4o-mini-2024-07-18"`1067510676 - `"gpt-4-turbo"`1067710678 - `"gpt-4-turbo-2024-04-09"`1067910680 - `"gpt-4-0125-preview"`1068110682 - `"gpt-4-turbo-preview"`1068310684 - `"gpt-4-1106-preview"`1068510686 - `"gpt-4-vision-preview"`1068710688 - `"gpt-4"`1068910690 - `"gpt-4-0314"`1069110692 - `"gpt-4-0613"`1069310694 - `"gpt-4-32k"`1069510696 - `"gpt-4-32k-0314"`1069710698 - `"gpt-4-32k-0613"`1069910700 - `"gpt-3.5-turbo"`1070110702 - `"gpt-3.5-turbo-16k"`1070310704 - `"gpt-3.5-turbo-0301"`1070510706 - `"gpt-3.5-turbo-0613"`1070710708 - `"gpt-3.5-turbo-1106"`1070910710 - `"gpt-3.5-turbo-0125"`1071110712 - `"gpt-3.5-turbo-16k-0613"`1071310714 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 16 more`1071510716 - `"o1-pro"`1071710718 - `"o1-pro-2025-03-19"`1071910720 - `"o3-pro"`1072110722 - `"o3-pro-2025-06-10"`1072310724 - `"o3-deep-research"`1072510726 - `"o3-deep-research-2025-06-26"`1072710728 - `"o4-mini-deep-research"`1072910730 - `"o4-mini-deep-research-2025-06-26"`1073110732 - `"computer-use-preview"`1073310734 - `"computer-use-preview-2025-03-11"`1073510736 - `"gpt-5.5-pro"`1073710738 - `"gpt-5.5-pro-2026-04-23"`1073910740 - `"gpt-5-codex"`1074110742 - `"gpt-5-pro"`1074310744 - `"gpt-5-pro-2025-10-06"`1074510746 - `"gpt-5.1-codex-max"`1074710748 - `"gpt-daybreak-blue-latest"`1074910750 - `"gpt-daybreak-red-latest"`1075110752 - `"gpt-5.6-cyber"`1075310754 - `object: "response"`1075510756 The object type of this resource - always set to `response`.1075710758 - `"response"`1075910760 - `output: array of ResponseOutputItem`1076110762 An array of content items generated by the model.1076310764 - The length and order of items in the `output` array is dependent10765 on the model's response.10766 - Rather than accessing the first item in the `output` array and10767 assuming it's an `assistant` message with the content generated by10768 the model, you might consider using the `output_text` property where10769 supported in SDKs.1077010771 - `ResponseOutputMessage object { id, content, role, 3 more }`1077210773 An output message from the model.1077410775 - `FileSearchCall object { id, queries, status, 2 more }`1077610777 The results of a file search tool call. See the10778 [file search guide](/api/docs/guides/tools-file-search) for more information.1077910780 - `id: string`1078110782 The unique ID of the file search tool call.1078310784 - `queries: array of string`1078510786 The queries used to search for files.1078710788 - `status: "in_progress" or "searching" or "completed" or 2 more`1078910790 The status of the file search tool call. One of `in_progress`,10791 `searching`, `incomplete` or `failed`,1079210793 - `"in_progress"`1079410795 - `"searching"`1079610797 - `"completed"`1079810799 - `"incomplete"`1080010801 - `"failed"`1080210803 - `type: "file_search_call"`1080410805 The type of the file search tool call. Always `file_search_call`.1080610807 - `"file_search_call"`1080810809 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`1081010811 The results of the file search tool call.1081210813 - `attributes: optional map[string or number or boolean] or null`1081410815 Set of 16 key-value pairs that can be attached to an object. This can be10816 useful for storing additional information about the object in a structured10817 format, and querying for objects via API or the dashboard. Keys are strings10818 with a maximum length of 64 characters. Values are strings with a maximum10819 length of 512 characters, booleans, or numbers.1082010821 - `string`1082210823 - `number`1082410825 - `boolean`1082610827 - `file_id: optional string`1082810829 The unique ID of the file.1083010831 - `filename: optional string`1083210833 The name of the file.1083410835 - `score: optional number`1083610837 The relevance score of the file - a value between 0 and 1.1083810839 - `text: optional string`1084010841 The text that was retrieved from the file.1084210843 - `FunctionCall object { arguments, call_id, name, 6 more }`1084410845 A tool call to run a function. See the10846 [function calling guide](/api/docs/guides/function-calling) for more information.1084710848 - `arguments: string`1084910850 A JSON string of the arguments to pass to the function.1085110852 - `call_id: string`1085310854 The unique ID of the function tool call generated by the model.1085510856 - `name: string`1085710858 The name of the function to run.1085910860 - `type: "function_call"`1086110862 The type of the function tool call. Always `function_call`.1086310864 - `"function_call"`1086510866 - `id: optional string`1086710868 The unique ID of the function tool call.1086910870 - `async: optional boolean`1087110872 Whether the function tool call runs asynchronously.1087310874 - `caller: optional object { type } or object { caller_id, type } or null`1087510876 The execution context that produced this tool call.1087710878 - `Direct object { type }`1087910880 - `type: "direct"`1088110882 - `"direct"`1088310884 - `Program object { caller_id, type }`1088510886 - `caller_id: string`1088710888 The call ID of the program item that produced this tool call.1088910890 - `type: "program"`1089110892 - `"program"`1089310894 - `namespace: optional string`1089510896 The namespace of the function to run.1089710898 - `status: optional "in_progress" or "completed" or "incomplete"`1089910900 The status of the item. One of `in_progress`, `completed`, or10901 `incomplete`. Populated when items are returned via API.1090210903 - `"in_progress"`1090410905 - `"completed"`1090610907 - `"incomplete"`1090810909 - `FunctionCallOutput object { id, output, status, 6 more }`1091010911 - `id: string`1091210913 The unique ID of the function call tool output.1091410915 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`1091610917 The output from the function call generated by your code.10918 Can be a string or an list of output content.1091910920 - `StringOutput = string`1092110922 A string of the output of the function call.1092310924 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`1092510926 Text, image, or file output of the function call.1092710928 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1092910930 A text input to the model.1093110932 - `ResponseInputImage object { detail, type, file_id, 2 more }`1093310934 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1093510936 - `ResponseInputFile object { type, detail, file_data, 4 more }`1093710938 A file input to the model.1093910940 - `status: "in_progress" or "completed" or "incomplete"`1094110942 The status of the item. One of `in_progress`, `completed`, or10943 `incomplete`. Populated when items are returned via API.1094410945 - `"in_progress"`1094610947 - `"completed"`1094810949 - `"incomplete"`1095010951 - `type: "function_call_output"`1095210953 The type of the function tool call output. Always `function_call_output`.1095410955 - `"function_call_output"`1095610957 - `call_id: optional string`1095810959 The unique ID of the function tool call generated by the model.1096010961 - `caller: optional object { type } or object { caller_id, type } or null`1096210963 The execution context that produced this tool call.1096410965 - `Direct object { type }`1096610967 - `type: "direct"`1096810969 The caller type. Always `direct`.1097010971 - `"direct"`1097210973 - `Program object { caller_id, type }`1097410975 - `caller_id: string`1097610977 The call ID of the program item that produced this tool call.1097810979 - `type: "program"`1098010981 The caller type. Always `program`.1098210983 - `"program"`1098410985 - `created_by: optional string`1098610987 The identifier of the actor that created the item.1098810989 - `name: optional string`1099010991 The name of the tool that produced the output.1099210993 - `namespace: optional string`1099410995 The namespace of the tool that produced the output.1099610997 - `WebSearchCall object { id, action, status, type }`1099810999 The results of a web search tool call. See the11000 [web search guide](/api/docs/guides/tools-web-search) for more information.1100111002 - `id: string`1100311004 The unique ID of the web search tool call.1100511006 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`1100711008 An object describing the specific action taken in this web search call.11009 Includes details on how the model used the web (search, open_page, find_in_page).1101011011 - `Search object { type, queries, query, sources }`1101211013 Action type "search" - Performs a web search query.1101411015 - `type: "search"`1101611017 The action type.1101811019 - `"search"`1102011021 - `queries: optional array of string`1102211023 The search queries.1102411025 - `query: optional string`1102611027 The search query.1102811029 - `sources: optional array of object { type, url }`1103011031 The sources used in the search.1103211033 - `type: "url"`1103411035 The type of source. Always `url`.1103611037 - `"url"`1103811039 - `url: string`1104011041 The URL of the source.1104211043 - `OpenPage object { type, url }`1104411045 Action type "open_page" - Opens a specific URL from search results.1104611047 - `type: "open_page"`1104811049 The action type.1105011051 - `"open_page"`1105211053 - `url: optional string or null`1105411055 The URL opened by the model.1105611057 - `FindInPage object { pattern, type, url }`1105811059 Action type "find_in_page": Searches for a pattern within a loaded page.1106011061 - `pattern: string`1106211063 The pattern or text to search for within the page.1106411065 - `type: "find_in_page"`1106611067 The action type.1106811069 - `"find_in_page"`1107011071 - `url: string`1107211073 The URL of the page searched for the pattern.1107411075 - `status: "in_progress" or "searching" or "completed" or 2 more`1107611077 The status of the web search tool call.1107811079 - `"in_progress"`1108011081 - `"searching"`1108211083 - `"completed"`1108411085 - `"failed"`1108611087 - `"incomplete"`1108811089 - `type: "web_search_call"`1109011091 The type of the web search tool call. Always `web_search_call`.1109211093 - `"web_search_call"`1109411095 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`1109611097 A tool call to a computer use tool. See the11098 [computer use guide](/api/docs/guides/tools-computer-use) for more information.1109911100 - `id: string`1110111102 The unique ID of the computer call.1110311104 - `call_id: string`1110511106 An identifier used when responding to the tool call with output.1110711108 - `pending_safety_checks: array of object { id, code, message }`1110911110 The pending safety checks for the computer call.1111111112 - `id: string`1111311114 The ID of the pending safety check.1111511116 - `code: optional string or null`1111711118 The type of the pending safety check.1111911120 - `message: optional string or null`1112111122 Details about the pending safety check.1112311124 - `status: "in_progress" or "completed" or "incomplete"`1112511126 The status of the item. One of `in_progress`, `completed`, or11127 `incomplete`. Populated when items are returned via API.1112811129 - `"in_progress"`1113011131 - `"completed"`1113211133 - `"incomplete"`1113411135 - `type: "computer_call"`1113611137 The type of the computer call. Always `computer_call`.1113811139 - `"computer_call"`1114011141 - `action: optional ComputerAction`1114211143 A click action.1114411145 - `actions: optional ComputerActionList`1114611147 Flattened batched actions for `computer_use`. Each action includes an11148 `type` discriminator and action-specific fields.1114911150 - `ComputerCallOutput object { id, call_id, output, 4 more }`1115111152 - `id: string`1115311154 The unique ID of the computer call tool output.1115511156 - `call_id: string`1115711158 The ID of the computer tool call that produced the output.1115911160 - `output: ResponseComputerToolCallOutputScreenshot`1116111162 A computer screenshot image used with the computer use tool.1116311164 - `status: "completed" or "incomplete" or "failed" or "in_progress"`1116511166 The status of the message input. One of `in_progress`, `completed`, or11167 `incomplete`. Populated when input items are returned via API.1116811169 - `"completed"`1117011171 - `"incomplete"`1117211173 - `"failed"`1117411175 - `"in_progress"`1117611177 - `type: "computer_call_output"`1117811179 The type of the computer tool call output. Always `computer_call_output`.1118011181 - `"computer_call_output"`1118211183 - `acknowledged_safety_checks: optional array of object { id, code, message }`1118411185 The safety checks reported by the API that have been acknowledged by the11186 developer.1118711188 - `id: string`1118911190 The ID of the pending safety check.1119111192 - `code: optional string or null`1119311194 The type of the pending safety check.1119511196 - `message: optional string or null`1119711198 Details about the pending safety check.1119911200 - `created_by: optional string`1120111202 The identifier of the actor that created the item.1120311204 - `Reasoning object { id, summary, type, 3 more }`1120511206 A description of the chain of thought used by a reasoning model while generating11207 a response. Be sure to include these items in your `input` to the Responses API11208 for subsequent turns of a conversation if you are manually11209 [managing context](/api/docs/guides/conversation-state).1121011211 - `id: string`1121211213 The unique identifier of the reasoning content.1121411215 - `summary: array of SummaryTextContent`1121611217 Reasoning summary content.1121811219 - `text: string`1122011221 A summary of the reasoning output from the model so far.1122211223 - `type: "summary_text"`1122411225 The type of the object. Always `summary_text`.1122611227 - `type: "reasoning"`1122811229 The type of the object. Always `reasoning`.1123011231 - `"reasoning"`1123211233 - `content: optional array of object { text, type }`1123411235 Reasoning text content.1123611237 - `text: string`1123811239 The reasoning text from the model.1124011241 - `type: "reasoning_text"`1124211243 The type of the reasoning text. Always `reasoning_text`.1124411245 - `"reasoning_text"`1124611247 - `encrypted_content: optional string or null`1124811249 The encrypted content of the reasoning item. This is populated by default11250 for reasoning items returned by `POST /v1/responses` and WebSocket11251 `response.create` requests.1125211253 When streaming, use the completed reasoning item and its11254 `encrypted_content` from the `response.output_item.done` event in11255 subsequent requests. The `encrypted_content` in11256 `response.output_item.added` may be incomplete. This is especially11257 important when `store` is `false` or when using Zero Data Retention.1125811259 - `status: optional "in_progress" or "completed" or "incomplete"`1126011261 The status of the item. One of `in_progress`, `completed`, or11262 `incomplete`. Populated when items are returned via API.1126311264 - `"in_progress"`1126511266 - `"completed"`1126711268 - `"incomplete"`1126911270 - `Program object { id, call_id, code, 2 more }`1127111272 - `id: string`1127311274 The unique ID of the program item.1127511276 - `call_id: string`1127711278 The stable call ID of the program item.1127911280 - `code: string`1128111282 The JavaScript source executed by programmatic tool calling.1128311284 - `fingerprint: string`1128511286 Opaque program replay fingerprint that must be round-tripped.1128711288 - `type: "program"`1128911290 The type of the item. Always `program`.1129111292 - `"program"`1129311294 - `ProgramOutput object { id, call_id, result, 2 more }`1129511296 - `id: string`1129711298 The unique ID of the program output item.1129911300 - `call_id: string`1130111302 The call ID of the program item.1130311304 - `result: string`1130511306 The result produced by the program item.1130711308 - `status: "completed" or "incomplete"`1130911310 The terminal status of the program output item.1131111312 - `"completed"`1131311314 - `"incomplete"`1131511316 - `type: "program_output"`1131711318 The type of the item. Always `program_output`.1131911320 - `"program_output"`1132111322 - `ToolSearchCall object { id, arguments, call_id, 4 more }`1132311324 - `id: string`1132511326 The unique ID of the tool search call item.1132711328 - `arguments: unknown`1132911330 Arguments used for the tool search call.1133111332 - `call_id: string or null`1133311334 The unique ID of the tool search call generated by the model.1133511336 - `execution: "server" or "client"`1133711338 Whether tool search was executed by the server or by the client.1133911340 - `"server"`1134111342 - `"client"`1134311344 - `status: "in_progress" or "completed" or "incomplete"`1134511346 The status of the tool search call item that was recorded.1134711348 - `"in_progress"`1134911350 - `"completed"`1135111352 - `"incomplete"`1135311354 - `type: "tool_search_call"`1135511356 The type of the item. Always `tool_search_call`.1135711358 - `"tool_search_call"`1135911360 - `created_by: optional string`1136111362 The identifier of the actor that created the item.1136311364 - `ToolSearchOutput object { id, call_id, execution, 4 more }`1136511366 - `id: string`1136711368 The unique ID of the tool search output item.1136911370 - `call_id: string or null`1137111372 The unique ID of the tool search call generated by the model.1137311374 - `execution: "server" or "client"`1137511376 Whether tool search was executed by the server or by the client.1137711378 - `"server"`1137911380 - `"client"`1138111382 - `status: "in_progress" or "completed" or "incomplete"`1138311384 The status of the tool search output item that was recorded.1138511386 - `"in_progress"`1138711388 - `"completed"`1138911390 - `"incomplete"`1139111392 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`1139311394 The loaded tool definitions returned by tool search.1139511396 - `Function object { name, parameters, strict, 6 more }`1139711398 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).1139911400 - `name: string`1140111402 The name of the function to call.1140311404 - `parameters: map[unknown] or null`1140511406 A JSON schema object describing the parameters of the function.1140711408 - `strict: boolean or null`1140911410 Whether strict parameter validation is enforced for this function tool.1141111412 - `type: "function"`1141311414 The type of the function tool. Always `function`.1141511416 - `"function"`1141711418 - `allowed_callers: optional array of "direct" or "programmatic" or null`1141911420 The tool invocation context(s).1142111422 - `"direct"`1142311424 - `"programmatic"`1142511426 - `async: optional boolean`1142711428 - `defer_loading: optional boolean`1142911430 Whether this function is deferred and loaded via tool search.1143111432 - `description: optional string or null`1143311434 A description of the function. Used by the model to determine whether or not to call the function.1143511436 - `output_schema: optional map[unknown] or null`1143711438 A JSON schema object describing the JSON value encoded in string outputs for this function.1143911440 - `FileSearch object { type, vector_store_ids, filters, 2 more }`1144111442 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).1144311444 - `type: "file_search"`1144511446 The type of the file search tool. Always `file_search`.1144711448 - `"file_search"`1144911450 - `vector_store_ids: array of string`1145111452 The IDs of the vector stores to search.1145311454 - `filters: optional ComparisonFilter or CompoundFilter or null`1145511456 A filter to apply.1145711458 - `ComparisonFilter object { key, type, value }`1145911460 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1146111462 - `CompoundFilter object { filters, type }`1146311464 Combine multiple filters using `and` or `or`.1146511466 - `max_num_results: optional number`1146711468 The maximum number of results to return. This number should be between 1 and 50 inclusive.1146911470 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`1147111472 Ranking options for search.1147311474 - `hybrid_search: optional object { embedding_weight, text_weight }`1147511476 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.1147711478 - `embedding_weight: number`1147911480 The weight of the embedding in the reciprocal ranking fusion.1148111482 - `text_weight: number`1148311484 The weight of the text in the reciprocal ranking fusion.1148511486 - `ranker: optional "auto" or "default-2024-11-15"`1148711488 The ranker to use for the file search.1148911490 - `"auto"`1149111492 - `"default-2024-11-15"`1149311494 - `score_threshold: optional number`1149511496 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.1149711498 - `Computer object { type }`1149911500 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).1150111502 - `type: "computer"`1150311504 The type of the computer tool. Always `computer`.1150511506 - `"computer"`1150711508 - `ComputerUsePreview object { display_height, display_width, environment, type }`1150911510 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).1151111512 - `display_height: number`1151311514 The height of the computer display.1151511516 - `display_width: number`1151711518 The width of the computer display.1151911520 - `environment: "windows" or "mac" or "linux" or 2 more`1152111522 The type of computer environment to control.1152311524 - `"windows"`1152511526 - `"mac"`1152711528 - `"linux"`1152911530 - `"ubuntu"`1153111532 - `"browser"`1153311534 - `type: "computer_use_preview"`1153511536 The type of the computer use tool. Always `computer_use_preview`.1153711538 - `"computer_use_preview"`1153911540 - `WebSearch object { type, external_web_access, filters, 2 more }`1154111542 Search the Internet for sources related to the prompt. Learn more about the11543 [web search tool](/api/docs/guides/tools-web-search).1154411545 - `type: "web_search" or "web_search_2025_08_26"`1154611547 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.1154811549 - `"web_search"`1155011551 - `"web_search_2025_08_26"`1155211553 - `external_web_access: optional boolean`1155411555 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.1155611557 - `filters: optional object { allowed_domains } or null`1155811559 Filters for the search.1156011561 - `allowed_domains: optional array of string or null`1156211563 Allowed domains for the search. If not provided, all domains are allowed.11564 Subdomains of the provided domains are allowed as well.1156511566 Example: `["pubmed.ncbi.nlm.nih.gov"]`1156711568 - `search_context_size: optional "low" or "medium" or "high"`1156911570 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.1157111572 - `"low"`1157311574 - `"medium"`1157511576 - `"high"`1157711578 - `user_location: optional object { city, country, region, 2 more } or null`1157911580 The approximate location of the user.1158111582 - `city: optional string or null`1158311584 Free text input for the city of the user, e.g. `San Francisco`.1158511586 - `country: optional string or null`1158711588 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.1158911590 - `region: optional string or null`1159111592 Free text input for the region of the user, e.g. `California`.1159311594 - `timezone: optional string or null`1159511596 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1159711598 - `type: optional "approximate"`1159911600 The type of location approximation. Always `approximate`.1160111602 - `"approximate"`1160311604 - `Mcp object { server_label, type, allowed_callers, 9 more }`1160511606 Give the model access to additional tools via remote Model Context Protocol11607 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1160811609 - `server_label: string`1161011611 A label for this MCP server, used to identify it in tool calls.1161211613 - `type: "mcp"`1161411615 The type of the MCP tool. Always `mcp`.1161611617 - `"mcp"`1161811619 - `allowed_callers: optional array of "direct" or "programmatic" or null`1162011621 The tool invocation context(s).1162211623 - `"direct"`1162411625 - `"programmatic"`1162611627 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`1162811629 List of allowed tool names or a filter object.1163011631 - `McpAllowedTools = array of string`1163211633 A string array of allowed tool names1163411635 - `McpToolFilter object { read_only, tool_names }`1163611637 A filter object to specify which tools are allowed.1163811639 - `read_only: optional boolean`1164011641 Indicates whether or not a tool modifies data or is read-only. If an11642 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),11643 it will match this filter.1164411645 - `tool_names: optional array of string`1164611647 List of allowed tool names.1164811649 - `authorization: optional string`1165011651 An OAuth access token that can be used with a remote MCP server, either11652 with a custom MCP server URL or a service connector. Your application11653 must handle the OAuth authorization flow and provide the token here.1165411655 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1165611657 Identifier for service connectors, like those available in ChatGPT. One of11658 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more11659 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1166011661 This field is deprecated for models released after September 1, 2026.11662 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to11663 connect through a Secure MCP Tunnel.1166411665 Currently supported `connector_id` values are:1166611667 - Dropbox: `connector_dropbox`11668 - Gmail: `connector_gmail`11669 - Google Calendar: `connector_googlecalendar`11670 - Google Drive: `connector_googledrive`11671 - Microsoft Teams: `connector_microsoftteams`11672 - Outlook Calendar: `connector_outlookcalendar`11673 - Outlook Email: `connector_outlookemail`11674 - SharePoint: `connector_sharepoint`1167511676 - `"connector_dropbox"`1167711678 - `"connector_gmail"`1167911680 - `"connector_googlecalendar"`1168111682 - `"connector_googledrive"`1168311684 - `"connector_microsoftteams"`1168511686 - `"connector_outlookcalendar"`1168711688 - `"connector_outlookemail"`1168911690 - `"connector_sharepoint"`1169111692 - `defer_loading: optional boolean`1169311694 Whether this MCP tool is deferred and discovered via tool search.1169511696 - `headers: optional map[string] or null`1169711698 Optional HTTP headers to send to the MCP server. Use for authentication11699 or other purposes.1170011701 - `require_approval: optional object { always, never } or "always" or "never" or null`1170211703 Specify which of the MCP server's tools require approval.1170411705 - `McpToolApprovalFilter object { always, never }`1170611707 Specify which of the MCP server's tools require approval. Can be11708 `always`, `never`, or a filter object associated with tools11709 that require approval.1171011711 - `always: optional object { read_only, tool_names }`1171211713 A filter object to specify which tools are allowed.1171411715 - `read_only: optional boolean`1171611717 Indicates whether or not a tool modifies data or is read-only. If an11718 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),11719 it will match this filter.1172011721 - `tool_names: optional array of string`1172211723 List of allowed tool names.1172411725 - `never: optional object { read_only, tool_names }`1172611727 A filter object to specify which tools are allowed.1172811729 - `read_only: optional boolean`1173011731 Indicates whether or not a tool modifies data or is read-only. If an11732 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),11733 it will match this filter.1173411735 - `tool_names: optional array of string`1173611737 List of allowed tool names.1173811739 - `McpToolApprovalSetting = "always" or "never"`1174011741 Specify a single approval policy for all tools. One of `always` or11742 `never`. When set to `always`, all tools will require approval. When11743 set to `never`, all tools will not require approval.1174411745 - `"always"`1174611747 - `"never"`1174811749 - `server_description: optional string`1175011751 Optional description of the MCP server, used to provide more context.1175211753 - `server_url: optional string`1175411755 The URL for the MCP server. One of `server_url`, `connector_id`, or11756 `tunnel_id` must be provided.1175711758 - `tunnel_id: optional string`1175911760 The Secure MCP Tunnel ID to use instead of a direct server URL. One of11761 `server_url`, `connector_id`, or `tunnel_id` must be provided.1176211763 - `CodeInterpreter object { container, type, allowed_callers }`1176411765 A tool that runs Python code to help generate a response to a prompt.1176611767 - `container: string or object { type, file_ids, memory_limit, network_policy }`1176811769 The code interpreter container. Can be a container ID or an object that11770 specifies uploaded file IDs to make available to your code, along with an11771 optional `memory_limit` setting.1177211773 - `string`1177411775 The container ID.1177611777 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`1177811779 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1178011781 - `type: "auto"`1178211783 Always `auto`.1178411785 - `"auto"`1178611787 - `file_ids: optional array of string`1178811789 An optional list of uploaded files to make available to your code.1179011791 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`1179211793 The memory limit for the code interpreter container.1179411795 - `"1g"`1179611797 - `"4g"`1179811799 - `"16g"`1180011801 - `"64g"`1180211803 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`1180411805 Network access policy for the container.1180611807 - `ContainerNetworkPolicyDisabled object { type }`1180811809 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`1181011811 - `type: "code_interpreter"`1181211813 The type of the code interpreter tool. Always `code_interpreter`.1181411815 - `"code_interpreter"`1181611817 - `allowed_callers: optional array of "direct" or "programmatic" or null`1181811819 The tool invocation context(s).1182011821 - `"direct"`1182211823 - `"programmatic"`1182411825 - `ProgrammaticToolCalling object { type }`1182611827 - `type: "programmatic_tool_calling"`1182811829 The type of the tool. Always `programmatic_tool_calling`.1183011831 - `"programmatic_tool_calling"`1183211833 - `ImageGeneration object { type, action, background, 9 more }`1183411835 A tool that generates images using the GPT image models.1183611837 - `type: "image_generation"`1183811839 The type of the image generation tool. Always `image_generation`.1184011841 - `"image_generation"`1184211843 - `action: optional "generate" or "edit" or "auto"`1184411845 Whether to generate a new image or edit an existing image. Default: `auto`.1184611847 - `"generate"`1184811849 - `"edit"`1185011851 - `"auto"`1185211853 - `background: optional "transparent" or "opaque" or "auto"`1185411855 Set the background of the generated image. One of `transparent`, `opaque`,11856 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including11857 their `2026-09-08` snapshots, support `opaque` and `transparent`11858 backgrounds. Transparent backgrounds are available for supported GPT Image11859 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in11860 preview. When using `transparent`, set the output format to `png` or `webp`.11861 Default: `auto`.1186211863 - `"transparent"`1186411865 - `"opaque"`1186611867 - `"auto"`1186811869 - `input_fidelity: optional "high" or "low" or null`1187011871 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`.1187211873 - `"high"`1187411875 - `"low"`1187611877 - `input_image_mask: optional object { file_id, image_url }`1187811879 Optional mask for inpainting. Contains `image_url`11880 (string, optional) and `file_id` (string, optional).1188111882 - `file_id: optional string`1188311884 File ID for the mask image.1188511886 - `image_url: optional string`1188711888 Base64-encoded mask image.1188911890 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`1189111892 The image generation model to use. One of `gpt-image-1`,11893 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,11894 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,11895 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,11896 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:11897 `gpt-image-1`.1189811899 - `string`1190011901 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`1190211903 The image generation model to use. One of `gpt-image-1`,11904 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,11905 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,11906 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,11907 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:11908 `gpt-image-1`.1190911910 - `"gpt-image-1"`1191111912 - `"gpt-image-1-mini"`1191311914 - `"gpt-image-1.5"`1191511916 - `"gpt-image-2"`1191711918 - `"gpt-image-2-2026-04-21"`1191911920 - `"gpt-image-2.5-sunburst"`1192111922 - `"gpt-image-2.5-sunburst-2026-09-08"`1192311924 - `"gpt-image-2.5-flare"`1192511926 - `"gpt-image-2.5-flare-2026-09-08"`1192711928 - `moderation: optional "auto" or "low"`1192911930 Moderation level for the generated image. Default: `auto`.1193111932 - `"auto"`1193311934 - `"low"`1193511936 - `output_compression: optional number`1193711938 Compression level for the output image. Default: 100.1193911940 - `output_format: optional "png" or "webp" or "jpeg"`1194111942 The output format of the generated image. One of `png`, `webp`, or11943 `jpeg`. Default: `png`.1194411945 - `"png"`1194611947 - `"webp"`1194811949 - `"jpeg"`1195011951 - `partial_images: optional number`1195211953 Number of partial images to generate in streaming mode, from 0 (default value) to 3.1195411955 - `quality: optional "low" or "medium" or "high" or 3 more`1195611957 The quality of the generated image. The GPT image models support `low`,11958 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,11959 including their `2026-09-08` snapshots, also support `xhigh` and `max`.11960 Default: `auto`.1196111962 - `"low"`1196311964 - `"medium"`1196511966 - `"high"`1196711968 - `"xhigh"`1196911970 - `"max"`1197111972 - `"auto"`1197311974 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`1197511976 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.1197711978 - `string`1197911980 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`1198111982 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.1198311984 - `"1024x1024"`1198511986 - `"1024x1536"`1198711988 - `"1536x1024"`1198911990 - `"auto"`1199111992 - `LocalShell object { type }`1199311994 A tool that allows the model to execute shell commands in a local environment.1199511996 - `type: "local_shell"`1199711998 The type of the local shell tool. Always `local_shell`.1199912000 - `"local_shell"`1200112002 - `Shell object { type, allowed_callers, environment }`1200312004 A tool that allows the model to execute shell commands.1200512006 - `type: "shell"`1200712008 The type of the shell tool. Always `shell`.1200912010 - `"shell"`1201112012 - `allowed_callers: optional array of "direct" or "programmatic" or null`1201312014 The tool invocation context(s).1201512016 - `"direct"`1201712018 - `"programmatic"`1201912020 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`1202112022 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`1202312024 - `LocalEnvironment object { type, skills }`1202512026 - `ContainerReference object { container_id, type }`1202712028 - `Custom object { name, type, allowed_callers, 4 more }`1202912030 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)1203112032 - `name: string`1203312034 The name of the custom tool, used to identify it in tool calls.1203512036 - `type: "custom"`1203712038 The type of the custom tool. Always `custom`.1203912040 - `"custom"`1204112042 - `allowed_callers: optional array of "direct" or "programmatic" or null`1204312044 The tool invocation context(s).1204512046 - `"direct"`1204712048 - `"programmatic"`1204912050 - `async: optional boolean`1205112052 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1205312054 - `defer_loading: optional boolean`1205512056 Whether this tool should be deferred and discovered via tool search.1205712058 - `description: optional string`1205912060 Optional description of the custom tool, used to provide more context.1206112062 - `format: optional CustomToolInputFormat`1206312064 The input format for the custom tool. Default is unconstrained text.1206512066 - `Namespace object { description, name, tools, type }`1206712068 Groups function/custom tools under a shared namespace.1206912070 - `description: string`1207112072 A description of the namespace shown to the model.1207312074 - `name: string`1207512076 The namespace name used in tool calls (for example, `crm`).1207712078 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`1207912080 The function/custom tools available inside this namespace.1208112082 - `Function object { name, type, allowed_callers, 6 more }`1208312084 - `name: string`1208512086 - `type: "function"`1208712088 - `"function"`1208912090 - `allowed_callers: optional array of "direct" or "programmatic" or null`1209112092 The tool invocation context(s).1209312094 - `"direct"`1209512096 - `"programmatic"`1209712098 - `async: optional boolean`1209912100 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1210112102 - `defer_loading: optional boolean`1210312104 Whether this function should be deferred and discovered via tool search.1210512106 - `description: optional string or null`1210712108 - `output_schema: optional map[unknown] or null`1210912110 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.1211112112 - `parameters: optional unknown or null`1211312114 - `strict: optional boolean or null`1211512116 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.1211712118 - `Custom object { name, type, allowed_callers, 4 more }`1211912120 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)1212112122 - `name: string`1212312124 The name of the custom tool, used to identify it in tool calls.1212512126 - `type: "custom"`1212712128 The type of the custom tool. Always `custom`.1212912130 - `"custom"`1213112132 - `allowed_callers: optional array of "direct" or "programmatic" or null`1213312134 The tool invocation context(s).1213512136 - `"direct"`1213712138 - `"programmatic"`1213912140 - `async: optional boolean`1214112142 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1214312144 - `defer_loading: optional boolean`1214512146 Whether this tool should be deferred and discovered via tool search.1214712148 - `description: optional string`1214912150 Optional description of the custom tool, used to provide more context.1215112152 - `format: optional CustomToolInputFormat`1215312154 The input format for the custom tool. Default is unconstrained text.1215512156 - `type: "namespace"`1215712158 The type of the tool. Always `namespace`.1215912160 - `"namespace"`1216112162 - `ToolSearch object { type, description, execution, parameters }`1216312164 Hosted or BYOT tool search configuration for deferred tools.1216512166 - `type: "tool_search"`1216712168 The type of the tool. Always `tool_search`.1216912170 - `"tool_search"`1217112172 - `description: optional string or null`1217312174 Description shown to the model for a client-executed tool search tool.1217512176 - `execution: optional "server" or "client"`1217712178 Whether tool search is executed by the server or by the client.1217912180 - `"server"`1218112182 - `"client"`1218312184 - `parameters: optional unknown or null`1218512186 Parameter schema for a client-executed tool search tool.1218712188 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`1218912190 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).1219112192 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`1219312194 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.1219512196 - `"web_search_preview"`1219712198 - `"web_search_preview_2025_03_11"`1219912200 - `search_content_types: optional array of "text" or "image"`1220112202 - `"text"`1220312204 - `"image"`1220512206 - `search_context_size: optional "low" or "medium" or "high"`1220712208 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.1220912210 - `"low"`1221112212 - `"medium"`1221312214 - `"high"`1221512216 - `user_location: optional object { type, city, country, 2 more } or null`1221712218 The user's location.1221912220 - `type: "approximate"`1222112222 The type of location approximation. Always `approximate`.1222312224 - `"approximate"`1222512226 - `city: optional string or null`1222712228 Free text input for the city of the user, e.g. `San Francisco`.1222912230 - `country: optional string or null`1223112232 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.1223312234 - `region: optional string or null`1223512236 Free text input for the region of the user, e.g. `California`.1223712238 - `timezone: optional string or null`1223912240 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1224112242 - `ApplyPatch object { type, allowed_callers }`1224312244 Allows the assistant to create, delete, or update files using unified diffs.1224512246 - `type: "apply_patch"`1224712248 The type of the tool. Always `apply_patch`.1224912250 - `"apply_patch"`1225112252 - `allowed_callers: optional array of "direct" or "programmatic" or null`1225312254 The tool invocation context(s).1225512256 - `"direct"`1225712258 - `"programmatic"`1225912260 - `type: "tool_search_output"`1226112262 The type of the item. Always `tool_search_output`.1226312264 - `"tool_search_output"`1226512266 - `created_by: optional string`1226712268 The identifier of the actor that created the item.1226912270 - `AdditionalTools object { id, role, tools, type }`1227112272 - `id: string`1227312274 The unique ID of the additional tools item.1227512276 - `role: "unknown" or "user" or "assistant" or 5 more`1227712278 The role that provided the additional tools.1227912280 - `"unknown"`1228112282 - `"user"`1228312284 - `"assistant"`1228512286 - `"system"`1228712288 - `"critic"`1228912290 - `"discriminator"`1229112292 - `"developer"`1229312294 - `"tool"`1229512296 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`1229712298 The additional tool definitions made available at this item.1229912300 - `Function object { name, parameters, strict, 6 more }`1230112302 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).1230312304 - `name: string`1230512306 The name of the function to call.1230712308 - `parameters: map[unknown] or null`1230912310 A JSON schema object describing the parameters of the function.1231112312 - `strict: boolean or null`1231312314 Whether strict parameter validation is enforced for this function tool.1231512316 - `type: "function"`1231712318 The type of the function tool. Always `function`.1231912320 - `"function"`1232112322 - `allowed_callers: optional array of "direct" or "programmatic" or null`1232312324 The tool invocation context(s).1232512326 - `"direct"`1232712328 - `"programmatic"`1232912330 - `async: optional boolean`1233112332 - `defer_loading: optional boolean`1233312334 Whether this function is deferred and loaded via tool search.1233512336 - `description: optional string or null`1233712338 A description of the function. Used by the model to determine whether or not to call the function.1233912340 - `output_schema: optional map[unknown] or null`1234112342 A JSON schema object describing the JSON value encoded in string outputs for this function.1234312344 - `FileSearch object { type, vector_store_ids, filters, 2 more }`1234512346 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).1234712348 - `type: "file_search"`1234912350 The type of the file search tool. Always `file_search`.1235112352 - `"file_search"`1235312354 - `vector_store_ids: array of string`1235512356 The IDs of the vector stores to search.1235712358 - `filters: optional ComparisonFilter or CompoundFilter or null`1235912360 A filter to apply.1236112362 - `ComparisonFilter object { key, type, value }`1236312364 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1236512366 - `CompoundFilter object { filters, type }`1236712368 Combine multiple filters using `and` or `or`.1236912370 - `max_num_results: optional number`1237112372 The maximum number of results to return. This number should be between 1 and 50 inclusive.1237312374 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`1237512376 Ranking options for search.1237712378 - `hybrid_search: optional object { embedding_weight, text_weight }`1237912380 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.1238112382 - `embedding_weight: number`1238312384 The weight of the embedding in the reciprocal ranking fusion.1238512386 - `text_weight: number`1238712388 The weight of the text in the reciprocal ranking fusion.1238912390 - `ranker: optional "auto" or "default-2024-11-15"`1239112392 The ranker to use for the file search.1239312394 - `"auto"`1239512396 - `"default-2024-11-15"`1239712398 - `score_threshold: optional number`1239912400 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.1240112402 - `Computer object { type }`1240312404 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).1240512406 - `type: "computer"`1240712408 The type of the computer tool. Always `computer`.1240912410 - `"computer"`1241112412 - `ComputerUsePreview object { display_height, display_width, environment, type }`1241312414 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).1241512416 - `display_height: number`1241712418 The height of the computer display.1241912420 - `display_width: number`1242112422 The width of the computer display.1242312424 - `environment: "windows" or "mac" or "linux" or 2 more`1242512426 The type of computer environment to control.1242712428 - `"windows"`1242912430 - `"mac"`1243112432 - `"linux"`1243312434 - `"ubuntu"`1243512436 - `"browser"`1243712438 - `type: "computer_use_preview"`1243912440 The type of the computer use tool. Always `computer_use_preview`.1244112442 - `"computer_use_preview"`1244312444 - `WebSearch object { type, external_web_access, filters, 2 more }`1244512446 Search the Internet for sources related to the prompt. Learn more about the12447 [web search tool](/api/docs/guides/tools-web-search).1244812449 - `type: "web_search" or "web_search_2025_08_26"`1245012451 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.1245212453 - `"web_search"`1245412455 - `"web_search_2025_08_26"`1245612457 - `external_web_access: optional boolean`1245812459 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.1246012461 - `filters: optional object { allowed_domains } or null`1246212463 Filters for the search.1246412465 - `allowed_domains: optional array of string or null`1246612467 Allowed domains for the search. If not provided, all domains are allowed.12468 Subdomains of the provided domains are allowed as well.1246912470 Example: `["pubmed.ncbi.nlm.nih.gov"]`1247112472 - `search_context_size: optional "low" or "medium" or "high"`1247312474 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.1247512476 - `"low"`1247712478 - `"medium"`1247912480 - `"high"`1248112482 - `user_location: optional object { city, country, region, 2 more } or null`1248312484 The approximate location of the user.1248512486 - `city: optional string or null`1248712488 Free text input for the city of the user, e.g. `San Francisco`.1248912490 - `country: optional string or null`1249112492 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.1249312494 - `region: optional string or null`1249512496 Free text input for the region of the user, e.g. `California`.1249712498 - `timezone: optional string or null`1249912500 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1250112502 - `type: optional "approximate"`1250312504 The type of location approximation. Always `approximate`.1250512506 - `"approximate"`1250712508 - `Mcp object { server_label, type, allowed_callers, 9 more }`1250912510 Give the model access to additional tools via remote Model Context Protocol12511 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1251212513 - `server_label: string`1251412515 A label for this MCP server, used to identify it in tool calls.1251612517 - `type: "mcp"`1251812519 The type of the MCP tool. Always `mcp`.1252012521 - `"mcp"`1252212523 - `allowed_callers: optional array of "direct" or "programmatic" or null`1252412525 The tool invocation context(s).1252612527 - `"direct"`1252812529 - `"programmatic"`1253012531 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`1253212533 List of allowed tool names or a filter object.1253412535 - `McpAllowedTools = array of string`1253612537 A string array of allowed tool names1253812539 - `McpToolFilter object { read_only, tool_names }`1254012541 A filter object to specify which tools are allowed.1254212543 - `read_only: optional boolean`1254412545 Indicates whether or not a tool modifies data or is read-only. If an12546 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),12547 it will match this filter.1254812549 - `tool_names: optional array of string`1255012551 List of allowed tool names.1255212553 - `authorization: optional string`1255412555 An OAuth access token that can be used with a remote MCP server, either12556 with a custom MCP server URL or a service connector. Your application12557 must handle the OAuth authorization flow and provide the token here.1255812559 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1256012561 Identifier for service connectors, like those available in ChatGPT. One of12562 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more12563 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1256412565 This field is deprecated for models released after September 1, 2026.12566 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to12567 connect through a Secure MCP Tunnel.1256812569 Currently supported `connector_id` values are:1257012571 - Dropbox: `connector_dropbox`12572 - Gmail: `connector_gmail`12573 - Google Calendar: `connector_googlecalendar`12574 - Google Drive: `connector_googledrive`12575 - Microsoft Teams: `connector_microsoftteams`12576 - Outlook Calendar: `connector_outlookcalendar`12577 - Outlook Email: `connector_outlookemail`12578 - SharePoint: `connector_sharepoint`1257912580 - `"connector_dropbox"`1258112582 - `"connector_gmail"`1258312584 - `"connector_googlecalendar"`1258512586 - `"connector_googledrive"`1258712588 - `"connector_microsoftteams"`1258912590 - `"connector_outlookcalendar"`1259112592 - `"connector_outlookemail"`1259312594 - `"connector_sharepoint"`1259512596 - `defer_loading: optional boolean`1259712598 Whether this MCP tool is deferred and discovered via tool search.1259912600 - `headers: optional map[string] or null`1260112602 Optional HTTP headers to send to the MCP server. Use for authentication12603 or other purposes.1260412605 - `require_approval: optional object { always, never } or "always" or "never" or null`1260612607 Specify which of the MCP server's tools require approval.1260812609 - `McpToolApprovalFilter object { always, never }`1261012611 Specify which of the MCP server's tools require approval. Can be12612 `always`, `never`, or a filter object associated with tools12613 that require approval.1261412615 - `always: optional object { read_only, tool_names }`1261612617 A filter object to specify which tools are allowed.1261812619 - `read_only: optional boolean`1262012621 Indicates whether or not a tool modifies data or is read-only. If an12622 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),12623 it will match this filter.1262412625 - `tool_names: optional array of string`1262612627 List of allowed tool names.1262812629 - `never: optional object { read_only, tool_names }`1263012631 A filter object to specify which tools are allowed.1263212633 - `read_only: optional boolean`1263412635 Indicates whether or not a tool modifies data or is read-only. If an12636 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),12637 it will match this filter.1263812639 - `tool_names: optional array of string`1264012641 List of allowed tool names.1264212643 - `McpToolApprovalSetting = "always" or "never"`1264412645 Specify a single approval policy for all tools. One of `always` or12646 `never`. When set to `always`, all tools will require approval. When12647 set to `never`, all tools will not require approval.1264812649 - `"always"`1265012651 - `"never"`1265212653 - `server_description: optional string`1265412655 Optional description of the MCP server, used to provide more context.1265612657 - `server_url: optional string`1265812659 The URL for the MCP server. One of `server_url`, `connector_id`, or12660 `tunnel_id` must be provided.1266112662 - `tunnel_id: optional string`1266312664 The Secure MCP Tunnel ID to use instead of a direct server URL. One of12665 `server_url`, `connector_id`, or `tunnel_id` must be provided.1266612667 - `CodeInterpreter object { container, type, allowed_callers }`1266812669 A tool that runs Python code to help generate a response to a prompt.1267012671 - `container: string or object { type, file_ids, memory_limit, network_policy }`1267212673 The code interpreter container. Can be a container ID or an object that12674 specifies uploaded file IDs to make available to your code, along with an12675 optional `memory_limit` setting.1267612677 - `string`1267812679 The container ID.1268012681 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`1268212683 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1268412685 - `type: "auto"`1268612687 Always `auto`.1268812689 - `"auto"`1269012691 - `file_ids: optional array of string`1269212693 An optional list of uploaded files to make available to your code.1269412695 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`1269612697 The memory limit for the code interpreter container.1269812699 - `"1g"`1270012701 - `"4g"`1270212703 - `"16g"`1270412705 - `"64g"`1270612707 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`1270812709 Network access policy for the container.1271012711 - `ContainerNetworkPolicyDisabled object { type }`1271212713 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`1271412715 - `type: "code_interpreter"`1271612717 The type of the code interpreter tool. Always `code_interpreter`.1271812719 - `"code_interpreter"`1272012721 - `allowed_callers: optional array of "direct" or "programmatic" or null`1272212723 The tool invocation context(s).1272412725 - `"direct"`1272612727 - `"programmatic"`1272812729 - `ProgrammaticToolCalling object { type }`1273012731 - `type: "programmatic_tool_calling"`1273212733 The type of the tool. Always `programmatic_tool_calling`.1273412735 - `"programmatic_tool_calling"`1273612737 - `ImageGeneration object { type, action, background, 9 more }`1273812739 A tool that generates images using the GPT image models.1274012741 - `type: "image_generation"`1274212743 The type of the image generation tool. Always `image_generation`.1274412745 - `"image_generation"`1274612747 - `action: optional "generate" or "edit" or "auto"`1274812749 Whether to generate a new image or edit an existing image. Default: `auto`.1275012751 - `"generate"`1275212753 - `"edit"`1275412755 - `"auto"`1275612757 - `background: optional "transparent" or "opaque" or "auto"`1275812759 Set the background of the generated image. One of `transparent`, `opaque`,12760 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including12761 their `2026-09-08` snapshots, support `opaque` and `transparent`12762 backgrounds. Transparent backgrounds are available for supported GPT Image12763 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in12764 preview. When using `transparent`, set the output format to `png` or `webp`.12765 Default: `auto`.1276612767 - `"transparent"`1276812769 - `"opaque"`1277012771 - `"auto"`1277212773 - `input_fidelity: optional "high" or "low" or null`1277412775 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`.1277612777 - `"high"`1277812779 - `"low"`1278012781 - `input_image_mask: optional object { file_id, image_url }`1278212783 Optional mask for inpainting. Contains `image_url`12784 (string, optional) and `file_id` (string, optional).1278512786 - `file_id: optional string`1278712788 File ID for the mask image.1278912790 - `image_url: optional string`1279112792 Base64-encoded mask image.1279312794 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`1279512796 The image generation model to use. One of `gpt-image-1`,12797 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,12798 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,12799 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,12800 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:12801 `gpt-image-1`.1280212803 - `string`1280412805 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`1280612807 The image generation model to use. One of `gpt-image-1`,12808 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,12809 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,12810 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,12811 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:12812 `gpt-image-1`.1281312814 - `"gpt-image-1"`1281512816 - `"gpt-image-1-mini"`1281712818 - `"gpt-image-1.5"`1281912820 - `"gpt-image-2"`1282112822 - `"gpt-image-2-2026-04-21"`1282312824 - `"gpt-image-2.5-sunburst"`1282512826 - `"gpt-image-2.5-sunburst-2026-09-08"`1282712828 - `"gpt-image-2.5-flare"`1282912830 - `"gpt-image-2.5-flare-2026-09-08"`1283112832 - `moderation: optional "auto" or "low"`1283312834 Moderation level for the generated image. Default: `auto`.1283512836 - `"auto"`1283712838 - `"low"`1283912840 - `output_compression: optional number`1284112842 Compression level for the output image. Default: 100.1284312844 - `output_format: optional "png" or "webp" or "jpeg"`1284512846 The output format of the generated image. One of `png`, `webp`, or12847 `jpeg`. Default: `png`.1284812849 - `"png"`1285012851 - `"webp"`1285212853 - `"jpeg"`1285412855 - `partial_images: optional number`1285612857 Number of partial images to generate in streaming mode, from 0 (default value) to 3.1285812859 - `quality: optional "low" or "medium" or "high" or 3 more`1286012861 The quality of the generated image. The GPT image models support `low`,12862 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,12863 including their `2026-09-08` snapshots, also support `xhigh` and `max`.12864 Default: `auto`.1286512866 - `"low"`1286712868 - `"medium"`1286912870 - `"high"`1287112872 - `"xhigh"`1287312874 - `"max"`1287512876 - `"auto"`1287712878 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`1287912880 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.1288112882 - `string`1288312884 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`1288512886 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.1288712888 - `"1024x1024"`1288912890 - `"1024x1536"`1289112892 - `"1536x1024"`1289312894 - `"auto"`1289512896 - `LocalShell object { type }`1289712898 A tool that allows the model to execute shell commands in a local environment.1289912900 - `type: "local_shell"`1290112902 The type of the local shell tool. Always `local_shell`.1290312904 - `"local_shell"`1290512906 - `Shell object { type, allowed_callers, environment }`1290712908 A tool that allows the model to execute shell commands.1290912910 - `type: "shell"`1291112912 The type of the shell tool. Always `shell`.1291312914 - `"shell"`1291512916 - `allowed_callers: optional array of "direct" or "programmatic" or null`1291712918 The tool invocation context(s).1291912920 - `"direct"`1292112922 - `"programmatic"`1292312924 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`1292512926 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`1292712928 - `LocalEnvironment object { type, skills }`1292912930 - `ContainerReference object { container_id, type }`1293112932 - `Custom object { name, type, allowed_callers, 4 more }`1293312934 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)1293512936 - `name: string`1293712938 The name of the custom tool, used to identify it in tool calls.1293912940 - `type: "custom"`1294112942 The type of the custom tool. Always `custom`.1294312944 - `"custom"`1294512946 - `allowed_callers: optional array of "direct" or "programmatic" or null`1294712948 The tool invocation context(s).1294912950 - `"direct"`1295112952 - `"programmatic"`1295312954 - `async: optional boolean`1295512956 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1295712958 - `defer_loading: optional boolean`1295912960 Whether this tool should be deferred and discovered via tool search.1296112962 - `description: optional string`1296312964 Optional description of the custom tool, used to provide more context.1296512966 - `format: optional CustomToolInputFormat`1296712968 The input format for the custom tool. Default is unconstrained text.1296912970 - `Namespace object { description, name, tools, type }`1297112972 Groups function/custom tools under a shared namespace.1297312974 - `description: string`1297512976 A description of the namespace shown to the model.1297712978 - `name: string`1297912980 The namespace name used in tool calls (for example, `crm`).1298112982 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`1298312984 The function/custom tools available inside this namespace.1298512986 - `Function object { name, type, allowed_callers, 6 more }`1298712988 - `name: string`1298912990 - `type: "function"`1299112992 - `"function"`1299312994 - `allowed_callers: optional array of "direct" or "programmatic" or null`1299512996 The tool invocation context(s).1299712998 - `"direct"`1299913000 - `"programmatic"`1300113002 - `async: optional boolean`1300313004 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1300513006 - `defer_loading: optional boolean`1300713008 Whether this function should be deferred and discovered via tool search.1300913010 - `description: optional string or null`1301113012 - `output_schema: optional map[unknown] or null`1301313014 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.1301513016 - `parameters: optional unknown or null`1301713018 - `strict: optional boolean or null`1301913020 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.1302113022 - `Custom object { name, type, allowed_callers, 4 more }`1302313024 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)1302513026 - `name: string`1302713028 The name of the custom tool, used to identify it in tool calls.1302913030 - `type: "custom"`1303113032 The type of the custom tool. Always `custom`.1303313034 - `"custom"`1303513036 - `allowed_callers: optional array of "direct" or "programmatic" or null`1303713038 The tool invocation context(s).1303913040 - `"direct"`1304113042 - `"programmatic"`1304313044 - `async: optional boolean`1304513046 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1304713048 - `defer_loading: optional boolean`1304913050 Whether this tool should be deferred and discovered via tool search.1305113052 - `description: optional string`1305313054 Optional description of the custom tool, used to provide more context.1305513056 - `format: optional CustomToolInputFormat`1305713058 The input format for the custom tool. Default is unconstrained text.1305913060 - `type: "namespace"`1306113062 The type of the tool. Always `namespace`.1306313064 - `"namespace"`1306513066 - `ToolSearch object { type, description, execution, parameters }`1306713068 Hosted or BYOT tool search configuration for deferred tools.1306913070 - `type: "tool_search"`1307113072 The type of the tool. Always `tool_search`.1307313074 - `"tool_search"`1307513076 - `description: optional string or null`1307713078 Description shown to the model for a client-executed tool search tool.1307913080 - `execution: optional "server" or "client"`1308113082 Whether tool search is executed by the server or by the client.1308313084 - `"server"`1308513086 - `"client"`1308713088 - `parameters: optional unknown or null`1308913090 Parameter schema for a client-executed tool search tool.1309113092 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`1309313094 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).1309513096 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`1309713098 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.1309913100 - `"web_search_preview"`1310113102 - `"web_search_preview_2025_03_11"`1310313104 - `search_content_types: optional array of "text" or "image"`1310513106 - `"text"`1310713108 - `"image"`1310913110 - `search_context_size: optional "low" or "medium" or "high"`1311113112 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.1311313114 - `"low"`1311513116 - `"medium"`1311713118 - `"high"`1311913120 - `user_location: optional object { type, city, country, 2 more } or null`1312113122 The user's location.1312313124 - `type: "approximate"`1312513126 The type of location approximation. Always `approximate`.1312713128 - `"approximate"`1312913130 - `city: optional string or null`1313113132 Free text input for the city of the user, e.g. `San Francisco`.1313313134 - `country: optional string or null`1313513136 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.1313713138 - `region: optional string or null`1313913140 Free text input for the region of the user, e.g. `California`.1314113142 - `timezone: optional string or null`1314313144 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1314513146 - `ApplyPatch object { type, allowed_callers }`1314713148 Allows the assistant to create, delete, or update files using unified diffs.1314913150 - `type: "apply_patch"`1315113152 The type of the tool. Always `apply_patch`.1315313154 - `"apply_patch"`1315513156 - `allowed_callers: optional array of "direct" or "programmatic" or null`1315713158 The tool invocation context(s).1315913160 - `"direct"`1316113162 - `"programmatic"`1316313164 - `type: "additional_tools"`1316513166 The type of the item. Always `additional_tools`.1316713168 - `"additional_tools"`1316913170 - `Compaction object { id, encrypted_content, type, created_by }`1317113172 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).1317313174 - `id: string`1317513176 The unique ID of the compaction item.1317713178 - `encrypted_content: string`1317913180 The encrypted content that was produced by compaction.1318113182 - `type: "compaction"`1318313184 The type of the item. Always `compaction`.1318513186 - `"compaction"`1318713188 - `created_by: optional string`1318913190 The identifier of the actor that created the item.1319113192 - `ImageGenerationCall object { id, result, status, 7 more }`1319313194 An image generation request made by the model.1319513196 - `id: string`1319713198 The unique ID of the image generation call.1319913200 - `result: string or null`1320113202 The generated image encoded in base64.1320313204 - `status: "in_progress" or "completed" or "generating" or "failed"`1320513206 The status of the image generation call.1320713208 - `"in_progress"`1320913210 - `"completed"`1321113212 - `"generating"`1321313214 - `"failed"`1321513216 - `type: "image_generation_call"`1321713218 The type of the image generation call. Always `image_generation_call`.1321913220 - `"image_generation_call"`1322113222 - `action: optional "generate" or "edit" or "auto" or null`1322313224 The action used for image generation.1322513226 - `"generate"`1322713228 - `"edit"`1322913230 - `"auto"`1323113232 - `background: optional "transparent" or "opaque" or "auto" or null`1323313234 The background setting used for generation.1323513236 - `"transparent"`1323713238 - `"opaque"`1323913240 - `"auto"`1324113242 - `output_format: optional "png" or "webp" or "jpeg" or null`1324313244 The output format used for generation.1324513246 - `"png"`1324713248 - `"webp"`1324913250 - `"jpeg"`1325113252 - `quality: optional "low" or "medium" or "high" or 3 more or null`1325313254 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.1325513256 - `"low"`1325713258 - `"medium"`1325913260 - `"high"`1326113262 - `"xhigh"`1326313264 - `"max"`1326513266 - `"auto"`1326713268 - `revised_prompt: optional string or null`1326913270 The prompt that was used after any model prompt rewriting.1327113272 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`1327313274 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.1327513276 - `string`1327713278 - `"1024x1024" or "1024x1536" or "1536x1024"`1327913280 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.1328113282 - `"1024x1024"`1328313284 - `"1024x1536"`1328513286 - `"1536x1024"`1328713288 - `CodeInterpreterCall object { id, code, container_id, 3 more }`1328913290 A tool call to run code.1329113292 - `id: string`1329313294 The unique ID of the code interpreter tool call.1329513296 - `code: string or null`1329713298 The code to run, or null if not available.1329913300 - `container_id: string`1330113302 The ID of the container used to run the code.1330313304 - `outputs: array of object { logs, type } or object { type, url } or null`1330513306 The outputs generated by the code interpreter, such as logs or images.13307 Can be null if no outputs are available.1330813309 - `Logs object { logs, type }`1331013311 The logs output from the code interpreter.1331213313 - `logs: string`1331413315 The logs output from the code interpreter.1331613317 - `type: "logs"`1331813319 The type of the output. Always `logs`.1332013321 - `"logs"`1332213323 - `Image object { type, url }`1332413325 The image output from the code interpreter.1332613327 - `type: "image"`1332813329 The type of the output. Always `image`.1333013331 - `"image"`1333213333 - `url: string`1333413335 The URL of the image output from the code interpreter.1333613337 - `status: "in_progress" or "completed" or "incomplete" or 2 more`1333813339 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.1334013341 - `"in_progress"`1334213343 - `"completed"`1334413345 - `"incomplete"`1334613347 - `"interpreting"`1334813349 - `"failed"`1335013351 - `type: "code_interpreter_call"`1335213353 The type of the code interpreter tool call. Always `code_interpreter_call`.1335413355 - `"code_interpreter_call"`1335613357 - `LocalShellCall object { id, action, call_id, 2 more }`1335813359 A tool call to run a command on the local shell.1336013361 - `id: string`1336213363 The unique ID of the local shell call.1336413365 - `action: object { command, env, type, 3 more }`1336613367 Execute a shell command on the server.1336813369 - `command: array of string`1337013371 The command to run.1337213373 - `env: map[string]`1337413375 Environment variables to set for the command.1337613377 - `type: "exec"`1337813379 The type of the local shell action. Always `exec`.1338013381 - `"exec"`1338213383 - `timeout_ms: optional number or null`1338413385 Optional timeout in milliseconds for the command.1338613387 - `user: optional string or null`1338813389 Optional user to run the command as.1339013391 - `working_directory: optional string or null`1339213393 Optional working directory to run the command in.1339413395 - `call_id: string`1339613397 The unique ID of the local shell tool call generated by the model.1339813399 - `status: "in_progress" or "completed" or "incomplete"`1340013401 The status of the local shell call.1340213403 - `"in_progress"`1340413405 - `"completed"`1340613407 - `"incomplete"`1340813409 - `type: "local_shell_call"`1341013411 The type of the local shell call. Always `local_shell_call`.1341213413 - `"local_shell_call"`1341413415 - `LocalShellCallOutput object { id, output, type, status }`1341613417 The output of a local shell tool call.1341813419 - `id: string`1342013421 The unique ID of the local shell tool call generated by the model.1342213423 - `output: string`1342413425 A JSON string of the output of the local shell tool call.1342613427 - `type: "local_shell_call_output"`1342813429 The type of the local shell tool call output. Always `local_shell_call_output`.1343013431 - `"local_shell_call_output"`1343213433 - `status: optional "in_progress" or "completed" or "incomplete" or null`1343413435 The status of the item. One of `in_progress`, `completed`, or `incomplete`.1343613437 - `"in_progress"`1343813439 - `"completed"`1344013441 - `"incomplete"`1344213443 - `ShellCall object { id, action, call_id, 5 more }`1344413445 A tool call that executes one or more shell commands in a managed environment.1344613447 - `id: string`1344813449 The unique ID of the shell tool call. Populated when this item is returned via API.1345013451 - `action: object { commands, max_output_length, timeout_ms }`1345213453 The shell commands and limits that describe how to run the tool call.1345413455 - `commands: array of string`1345613457 - `max_output_length: number or null`1345813459 Optional maximum number of characters to return from each command.1346013461 - `timeout_ms: number or null`1346213463 Optional timeout in milliseconds for the commands.1346413465 - `call_id: string`1346613467 The unique ID of the shell tool call generated by the model.1346813469 - `environment: ResponseLocalEnvironment or ResponseContainerReference or null`1347013471 Represents the use of a local environment to perform shell actions.1347213473 - `ResponseLocalEnvironment object { type }`1347413475 Represents the use of a local environment to perform shell actions.1347613477 - `type: "local"`1347813479 The environment type. Always `local`.1348013481 - `"local"`1348213483 - `ResponseContainerReference object { container_id, type }`1348413485 Represents a container created with /v1/containers.1348613487 - `container_id: string`1348813489 - `type: "container_reference"`1349013491 The environment type. Always `container_reference`.1349213493 - `"container_reference"`1349413495 - `status: "in_progress" or "completed" or "incomplete"`1349613497 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.1349813499 - `"in_progress"`1350013501 - `"completed"`1350213503 - `"incomplete"`1350413505 - `type: "shell_call"`1350613507 The type of the item. Always `shell_call`.1350813509 - `"shell_call"`1351013511 - `caller: optional object { type } or object { caller_id, type } or null`1351213513 The execution context that produced this tool call.1351413515 - `Direct object { type }`1351613517 - `type: "direct"`1351813519 - `"direct"`1352013521 - `Program object { caller_id, type }`1352213523 - `caller_id: string`1352413525 The call ID of the program item that produced this tool call.1352613527 - `type: "program"`1352813529 - `"program"`1353013531 - `created_by: optional string`1353213533 The ID of the entity that created this tool call.1353413535 - `ShellCallOutput object { id, call_id, max_output_length, 5 more }`1353613537 The output of a shell tool call that was emitted.1353813539 - `id: string`1354013541 The unique ID of the shell call output. Populated when this item is returned via API.1354213543 - `call_id: string`1354413545 The unique ID of the shell tool call generated by the model.1354613547 - `max_output_length: number or null`1354813549 The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.1355013551 - `output: array of object { outcome, stderr, stdout, created_by }`1355213553 An array of shell call output contents1355413555 - `outcome: object { type } or object { exit_code, type }`1355613557 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.1355813559 - `Timeout object { type }`1356013561 Indicates that the shell call exceeded its configured time limit.1356213563 - `type: "timeout"`1356413565 The outcome type. Always `timeout`.1356613567 - `"timeout"`1356813569 - `Exit object { exit_code, type }`1357013571 Indicates that the shell commands finished and returned an exit code.1357213573 - `exit_code: number`1357413575 Exit code from the shell process.1357613577 - `type: "exit"`1357813579 The outcome type. Always `exit`.1358013581 - `"exit"`1358213583 - `stderr: string`1358413585 The standard error output that was captured.1358613587 - `stdout: string`1358813589 The standard output that was captured.1359013591 - `created_by: optional string`1359213593 The identifier of the actor that created the item.1359413595 - `status: "in_progress" or "completed" or "incomplete"`1359613597 The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.1359813599 - `"in_progress"`1360013601 - `"completed"`1360213603 - `"incomplete"`1360413605 - `type: "shell_call_output"`1360613607 The type of the shell call output. Always `shell_call_output`.1360813609 - `"shell_call_output"`1361013611 - `caller: optional object { type } or object { caller_id, type } or null`1361213613 The execution context that produced this tool call.1361413615 - `Direct object { type }`1361613617 - `type: "direct"`1361813619 - `"direct"`1362013621 - `Program object { caller_id, type }`1362213623 - `caller_id: string`1362413625 The call ID of the program item that produced this tool call.1362613627 - `type: "program"`1362813629 - `"program"`1363013631 - `created_by: optional string`1363213633 The identifier of the actor that created the item.1363413635 - `ApplyPatchCall object { id, call_id, operation, 4 more }`1363613637 A tool call that applies file diffs by creating, deleting, or updating files.1363813639 - `id: string`1364013641 The unique ID of the apply patch tool call. Populated when this item is returned via API.1364213643 - `call_id: string`1364413645 The unique ID of the apply patch tool call generated by the model.1364613647 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`1364813649 One of the create_file, delete_file, or update_file operations applied via apply_patch.1365013651 - `CreateFile object { diff, path, type }`1365213653 Instruction describing how to create a file via the apply_patch tool.1365413655 - `diff: string`1365613657 Diff to apply.1365813659 - `path: string`1366013661 Path of the file to create.1366213663 - `type: "create_file"`1366413665 Create a new file with the provided diff.1366613667 - `"create_file"`1366813669 - `DeleteFile object { path, type }`1367013671 Instruction describing how to delete a file via the apply_patch tool.1367213673 - `path: string`1367413675 Path of the file to delete.1367613677 - `type: "delete_file"`1367813679 Delete the specified file.1368013681 - `"delete_file"`1368213683 - `UpdateFile object { diff, path, type }`1368413685 Instruction describing how to update a file via the apply_patch tool.1368613687 - `diff: string`1368813689 Diff to apply.1369013691 - `path: string`1369213693 Path of the file to update.1369413695 - `type: "update_file"`1369613697 Update an existing file with the provided diff.1369813699 - `"update_file"`1370013701 - `status: "in_progress" or "completed"`1370213703 The status of the apply patch tool call. One of `in_progress` or `completed`.1370413705 - `"in_progress"`1370613707 - `"completed"`1370813709 - `type: "apply_patch_call"`1371013711 The type of the item. Always `apply_patch_call`.1371213713 - `"apply_patch_call"`1371413715 - `caller: optional object { type } or object { caller_id, type } or null`1371613717 The execution context that produced this tool call.1371813719 - `Direct object { type }`1372013721 - `type: "direct"`1372213723 - `"direct"`1372413725 - `Program object { caller_id, type }`1372613727 - `caller_id: string`1372813729 The call ID of the program item that produced this tool call.1373013731 - `type: "program"`1373213733 - `"program"`1373413735 - `created_by: optional string`1373613737 The ID of the entity that created this tool call.1373813739 - `ApplyPatchCallOutput object { id, call_id, status, 4 more }`1374013741 The output emitted by an apply patch tool call.1374213743 - `id: string`1374413745 The unique ID of the apply patch tool call output. Populated when this item is returned via API.1374613747 - `call_id: string`1374813749 The unique ID of the apply patch tool call generated by the model.1375013751 - `status: "completed" or "failed"`1375213753 The status of the apply patch tool call output. One of `completed` or `failed`.1375413755 - `"completed"`1375613757 - `"failed"`1375813759 - `type: "apply_patch_call_output"`1376013761 The type of the item. Always `apply_patch_call_output`.1376213763 - `"apply_patch_call_output"`1376413765 - `caller: optional object { type } or object { caller_id, type } or null`1376613767 The execution context that produced this tool call.1376813769 - `Direct object { type }`1377013771 - `type: "direct"`1377213773 - `"direct"`1377413775 - `Program object { caller_id, type }`1377613777 - `caller_id: string`1377813779 The call ID of the program item that produced this tool call.1378013781 - `type: "program"`1378213783 - `"program"`1378413785 - `created_by: optional string`1378613787 The ID of the entity that created this tool call output.1378813789 - `output: optional string or null`1379013791 Optional textual output returned by the apply patch tool.1379213793 - `McpCall object { id, arguments, name, 6 more }`1379413795 An invocation of a tool on an MCP server.1379613797 - `id: string`1379813799 The unique ID of the tool call.1380013801 - `arguments: string`1380213803 A JSON string of the arguments passed to the tool.1380413805 - `name: string`1380613807 The name of the tool that was run.1380813809 - `server_label: string`1381013811 The label of the MCP server running the tool.1381213813 - `type: "mcp_call"`1381413815 The type of the item. Always `mcp_call`.1381613817 - `"mcp_call"`1381813819 - `approval_request_id: optional string or null`1382013821 Unique identifier for the MCP tool call approval request.13822 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.1382313824 - `error: optional McpToolCallError or null`1382513826 The error from the tool call, if any.1382713828 - `output: optional string or null`1382913830 The output from the tool call.1383113832 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`1383313834 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.1383513836 - `"in_progress"`1383713838 - `"completed"`1383913840 - `"incomplete"`1384113842 - `"calling"`1384313844 - `"failed"`1384513846 - `McpListTools object { id, server_label, tools, 2 more }`1384713848 A list of tools available on an MCP server.1384913850 - `id: string`1385113852 The unique ID of the list.1385313854 - `server_label: string`1385513856 The label of the MCP server.1385713858 - `tools: array of object { input_schema, name, annotations, description }`1385913860 The tools available on the server.1386113862 - `input_schema: unknown`1386313864 The JSON schema describing the tool's input.1386513866 - `name: string`1386713868 The name of the tool.1386913870 - `annotations: optional unknown or null`1387113872 Additional annotations about the tool.1387313874 - `description: optional string or null`1387513876 The description of the tool.1387713878 - `type: "mcp_list_tools"`1387913880 The type of the item. Always `mcp_list_tools`.1388113882 - `"mcp_list_tools"`1388313884 - `error: optional string or null`1388513886 Error message if the server could not list tools.1388713888 - `McpApprovalRequest object { id, arguments, name, 2 more }`1388913890 A request for human approval of a tool invocation.1389113892 - `id: string`1389313894 The unique ID of the approval request.1389513896 - `arguments: string`1389713898 A JSON string of arguments for the tool.1389913900 - `name: string`1390113902 The name of the tool to run.1390313904 - `server_label: string`1390513906 The label of the MCP server making the request.1390713908 - `type: "mcp_approval_request"`1390913910 The type of the item. Always `mcp_approval_request`.1391113912 - `"mcp_approval_request"`1391313914 - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`1391513916 A response to an MCP approval request.1391713918 - `id: string`1391913920 The unique ID of the approval response1392113922 - `approval_request_id: string`1392313924 The ID of the approval request being answered.1392513926 - `approve: boolean`1392713928 Whether the request was approved.1392913930 - `type: "mcp_approval_response"`1393113932 The type of the item. Always `mcp_approval_response`.1393313934 - `"mcp_approval_response"`1393513936 - `reason: optional string or null`1393713938 Optional reason for the decision.1393913940 - `CustomToolCall object { call_id, input, name, 5 more }`1394113942 A call to a custom tool created by the model.1394313944 - `call_id: string`1394513946 An identifier used to map this custom tool call to a tool call output.1394713948 - `input: string`1394913950 The input for the custom tool call generated by the model.1395113952 - `name: string`1395313954 The name of the custom tool being called.1395513956 - `type: "custom_tool_call"`1395713958 The type of the custom tool call. Always `custom_tool_call`.1395913960 - `"custom_tool_call"`1396113962 - `id: optional string`1396313964 The unique ID of the custom tool call in the OpenAI platform.1396513966 - `async: optional boolean`1396713968 Whether the custom tool call runs asynchronously.1396913970 - `caller: optional object { type } or object { caller_id, type } or null`1397113972 The execution context that produced this tool call.1397313974 - `Direct object { type }`1397513976 - `type: "direct"`1397713978 - `"direct"`1397913980 - `Program object { caller_id, type }`1398113982 - `caller_id: string`1398313984 The call ID of the program item that produced this tool call.1398513986 - `type: "program"`1398713988 - `"program"`1398913990 - `namespace: optional string`1399113992 The namespace of the custom tool being called.1399313994 - `CustomToolCallOutput object { id, call_id, output, 4 more }`1399513996 - `id: string`1399713998 The unique ID of the custom tool call output item.1399914000 - `call_id: string`1400114002 The call ID, used to map this custom tool call output to a custom tool call.1400314004 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`1400514006 The output from the custom tool call generated by your code.14007 Can be a string or an list of output content.1400814009 - `StringOutput = string`1401014011 A string of the output of the custom tool call.1401214013 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`1401414015 Text, image, or file output of the custom tool call.1401614017 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1401814019 A text input to the model.1402014021 - `ResponseInputImage object { detail, type, file_id, 2 more }`1402214023 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1402414025 - `ResponseInputFile object { type, detail, file_data, 4 more }`1402614027 A file input to the model.1402814029 - `status: "in_progress" or "completed" or "incomplete"`1403014031 The status of the item. One of `in_progress`, `completed`, or14032 `incomplete`. Populated when items are returned via API.1403314034 - `"in_progress"`1403514036 - `"completed"`1403714038 - `"incomplete"`1403914040 - `type: "custom_tool_call_output"`1404114042 The type of the custom tool call output. Always `custom_tool_call_output`.1404314044 - `"custom_tool_call_output"`1404514046 - `caller: optional object { type } or object { caller_id, type } or null`1404714048 The execution context that produced this tool call.1404914050 - `Direct object { type }`1405114052 - `type: "direct"`1405314054 The caller type. Always `direct`.1405514056 - `"direct"`1405714058 - `Program object { caller_id, type }`1405914060 - `caller_id: string`1406114062 The call ID of the program item that produced this tool call.1406314064 - `type: "program"`1406514066 The caller type. Always `program`.1406714068 - `"program"`1406914070 - `created_by: optional string`1407114072 The identifier of the actor that created the item.1407314074 - `parallel_tool_calls: boolean`1407514076 Whether to allow the model to run tool calls in parallel.1407714078 - `temperature: number or null`1407914080 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.14081 We generally recommend altering this or `top_p` but not both.1408214083 - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 6 more`1408414085 How the model should select which tool (or tools) to use when generating14086 a response. See the `tools` parameter to see how to specify which tools14087 the model can call.1408814089 - `ToolChoiceOptions = "none" or "auto" or "required"`1409014091 Controls which (if any) tool is called by the model.1409214093 `none` means the model will not call any tool and instead generates a message.1409414095 `auto` means the model can pick between generating a message or calling one or14096 more tools.1409714098 `required` means the model must call one or more tools.1409914100 - `"none"`1410114102 - `"auto"`1410314104 - `"required"`1410514106 - `ToolChoiceAllowed object { mode, tools, type }`1410714108 Constrains the tools available to the model to a pre-defined set.1410914110 - `mode: "auto" or "required"`1411114112 Constrains the tools available to the model to a pre-defined set.1411314114 `auto` allows the model to pick from among the allowed tools and generate a14115 message.1411614117 `required` requires the model to call one or more of the allowed tools.1411814119 - `"auto"`1412014121 - `"required"`1412214123 - `tools: array of map[unknown]`1412414125 A list of tool definitions that the model should be allowed to call.1412614127 For the Responses API, the list of tool definitions might look like:1412814129 ```json14130 [14131 { "type": "function", "name": "get_weather" },14132 { "type": "mcp", "server_label": "deepwiki" },14133 { "type": "image_generation" }14134 ]14135 ```1413614137 - `type: "allowed_tools"`1413814139 Allowed tool configuration type. Always `allowed_tools`.1414014141 - `"allowed_tools"`1414214143 - `ToolChoiceTypes object { type }`1414414145 Indicates that the model should use a built-in tool to generate a response.14146 [Learn more about built-in tools](/api/docs/guides/tools).1414714148 - `type: "file_search" or "web_search_preview" or "computer" or 5 more`1414914150 The type of hosted tool the model should to use. Learn more about14151 [built-in tools](/api/docs/guides/tools).1415214153 Allowed values are:1415414155 - `file_search`14156 - `web_search_preview`14157 - `computer`14158 - `computer_use_preview`14159 - `computer_use`14160 - `code_interpreter`14161 - `image_generation`1416214163 - `"file_search"`1416414165 - `"web_search_preview"`1416614167 - `"computer"`1416814169 - `"computer_use_preview"`1417014171 - `"computer_use"`1417214173 - `"web_search_preview_2025_03_11"`1417414175 - `"image_generation"`1417614177 - `"code_interpreter"`1417814179 - `ToolChoiceFunction object { name, type }`1418014181 Use this option to force the model to call a specific function.1418214183 - `name: string`1418414185 The name of the function to call.1418614187 - `type: "function"`1418814189 For function calling, the type is always `function`.1419014191 - `"function"`1419214193 - `ToolChoiceMcp object { server_label, type, name }`1419414195 Use this option to force the model to call a specific tool on a remote MCP server.1419614197 - `server_label: string`1419814199 The label of the MCP server to use.1420014201 - `type: "mcp"`1420214203 For MCP tools, the type is always `mcp`.1420414205 - `"mcp"`1420614207 - `name: optional string or null`1420814209 The name of the tool to call on the server.1421014211 - `ToolChoiceCustom object { name, type }`1421214213 Use this option to force the model to call a specific custom tool.1421414215 - `name: string`1421614217 The name of the custom tool to call.1421814219 - `type: "custom"`1422014221 For custom tool calling, the type is always `custom`.1422214223 - `"custom"`1422414225 - `SpecificProgrammaticToolCallingParam object { type }`1422614227 - `type: "programmatic_tool_calling"`1422814229 The tool to call. Always `programmatic_tool_calling`.1423014231 - `"programmatic_tool_calling"`1423214233 - `ToolChoiceApplyPatch object { type }`1423414235 Forces the model to call the apply_patch tool when executing a tool call.1423614237 - `type: "apply_patch"`1423814239 The tool to call. Always `apply_patch`.1424014241 - `"apply_patch"`1424214243 - `ToolChoiceShell object { type }`1424414245 Forces the model to call the shell tool when a tool call is required.1424614247 - `type: "shell"`1424814249 The tool to call. Always `shell`.1425014251 - `"shell"`1425214253 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`1425414255 An array of tools the model may call while generating a response. You14256 can specify which tool to use by setting the `tool_choice` parameter.1425714258 We support the following categories of tools:1425914260 - **Built-in tools**: Tools that are provided by OpenAI that extend the14261 model's capabilities, like [web search](/api/docs/guides/tools-web-search)14262 or [file search](/api/docs/guides/tools-file-search). Learn more about14263 [built-in tools](/api/docs/guides/tools).14264 - **MCP Tools**: Integrations with third-party systems via custom MCP servers14265 or predefined connectors such as Google Drive and SharePoint. Learn more about14266 [MCP Tools](/api/docs/guides/tools-connectors-mcp).14267 - **Function calls (custom tools)**: Functions that are defined by you,14268 enabling the model to call your own code with strongly typed arguments14269 and outputs. Learn more about14270 [function calling](/api/docs/guides/function-calling). You can also use14271 custom tools to call your own code.1427214273 - `Function object { name, parameters, strict, 6 more }`1427414275 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).1427614277 - `name: string`1427814279 The name of the function to call.1428014281 - `parameters: map[unknown] or null`1428214283 A JSON schema object describing the parameters of the function.1428414285 - `strict: boolean or null`1428614287 Whether strict parameter validation is enforced for this function tool.1428814289 - `type: "function"`1429014291 The type of the function tool. Always `function`.1429214293 - `"function"`1429414295 - `allowed_callers: optional array of "direct" or "programmatic" or null`1429614297 The tool invocation context(s).1429814299 - `"direct"`1430014301 - `"programmatic"`1430214303 - `async: optional boolean`1430414305 - `defer_loading: optional boolean`1430614307 Whether this function is deferred and loaded via tool search.1430814309 - `description: optional string or null`1431014311 A description of the function. Used by the model to determine whether or not to call the function.1431214313 - `output_schema: optional map[unknown] or null`1431414315 A JSON schema object describing the JSON value encoded in string outputs for this function.1431614317 - `FileSearch object { type, vector_store_ids, filters, 2 more }`1431814319 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).1432014321 - `type: "file_search"`1432214323 The type of the file search tool. Always `file_search`.1432414325 - `"file_search"`1432614327 - `vector_store_ids: array of string`1432814329 The IDs of the vector stores to search.1433014331 - `filters: optional ComparisonFilter or CompoundFilter or null`1433214333 A filter to apply.1433414335 - `ComparisonFilter object { key, type, value }`1433614337 A filter used to compare a specified attribute key to a given value using a defined comparison operation.1433814339 - `CompoundFilter object { filters, type }`1434014341 Combine multiple filters using `and` or `or`.1434214343 - `max_num_results: optional number`1434414345 The maximum number of results to return. This number should be between 1 and 50 inclusive.1434614347 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`1434814349 Ranking options for search.1435014351 - `hybrid_search: optional object { embedding_weight, text_weight }`1435214353 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.1435414355 - `embedding_weight: number`1435614357 The weight of the embedding in the reciprocal ranking fusion.1435814359 - `text_weight: number`1436014361 The weight of the text in the reciprocal ranking fusion.1436214363 - `ranker: optional "auto" or "default-2024-11-15"`1436414365 The ranker to use for the file search.1436614367 - `"auto"`1436814369 - `"default-2024-11-15"`1437014371 - `score_threshold: optional number`1437214373 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.1437414375 - `Computer object { type }`1437614377 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).1437814379 - `type: "computer"`1438014381 The type of the computer tool. Always `computer`.1438214383 - `"computer"`1438414385 - `ComputerUsePreview object { display_height, display_width, environment, type }`1438614387 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).1438814389 - `display_height: number`1439014391 The height of the computer display.1439214393 - `display_width: number`1439414395 The width of the computer display.1439614397 - `environment: "windows" or "mac" or "linux" or 2 more`1439814399 The type of computer environment to control.1440014401 - `"windows"`1440214403 - `"mac"`1440414405 - `"linux"`1440614407 - `"ubuntu"`1440814409 - `"browser"`1441014411 - `type: "computer_use_preview"`1441214413 The type of the computer use tool. Always `computer_use_preview`.1441414415 - `"computer_use_preview"`1441614417 - `WebSearch object { type, external_web_access, filters, 2 more }`1441814419 Search the Internet for sources related to the prompt. Learn more about the14420 [web search tool](/api/docs/guides/tools-web-search).1442114422 - `type: "web_search" or "web_search_2025_08_26"`1442314424 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.1442514426 - `"web_search"`1442714428 - `"web_search_2025_08_26"`1442914430 - `external_web_access: optional boolean`1443114432 Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.1443314434 - `filters: optional object { allowed_domains } or null`1443514436 Filters for the search.1443714438 - `allowed_domains: optional array of string or null`1443914440 Allowed domains for the search. If not provided, all domains are allowed.14441 Subdomains of the provided domains are allowed as well.1444214443 Example: `["pubmed.ncbi.nlm.nih.gov"]`1444414445 - `search_context_size: optional "low" or "medium" or "high"`1444614447 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.1444814449 - `"low"`1445014451 - `"medium"`1445214453 - `"high"`1445414455 - `user_location: optional object { city, country, region, 2 more } or null`1445614457 The approximate location of the user.1445814459 - `city: optional string or null`1446014461 Free text input for the city of the user, e.g. `San Francisco`.1446214463 - `country: optional string or null`1446414465 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.1446614467 - `region: optional string or null`1446814469 Free text input for the region of the user, e.g. `California`.1447014471 - `timezone: optional string or null`1447214473 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1447414475 - `type: optional "approximate"`1447614477 The type of location approximation. Always `approximate`.1447814479 - `"approximate"`1448014481 - `Mcp object { server_label, type, allowed_callers, 9 more }`1448214483 Give the model access to additional tools via remote Model Context Protocol14484 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1448514486 - `server_label: string`1448714488 A label for this MCP server, used to identify it in tool calls.1448914490 - `type: "mcp"`1449114492 The type of the MCP tool. Always `mcp`.1449314494 - `"mcp"`1449514496 - `allowed_callers: optional array of "direct" or "programmatic" or null`1449714498 The tool invocation context(s).1449914500 - `"direct"`1450114502 - `"programmatic"`1450314504 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`1450514506 List of allowed tool names or a filter object.1450714508 - `McpAllowedTools = array of string`1450914510 A string array of allowed tool names1451114512 - `McpToolFilter object { read_only, tool_names }`1451314514 A filter object to specify which tools are allowed.1451514516 - `read_only: optional boolean`1451714518 Indicates whether or not a tool modifies data or is read-only. If an14519 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),14520 it will match this filter.1452114522 - `tool_names: optional array of string`1452314524 List of allowed tool names.1452514526 - `authorization: optional string`1452714528 An OAuth access token that can be used with a remote MCP server, either14529 with a custom MCP server URL or a service connector. Your application14530 must handle the OAuth authorization flow and provide the token here.1453114532 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1453314534 Identifier for service connectors, like those available in ChatGPT. One of14535 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more14536 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1453714538 This field is deprecated for models released after September 1, 2026.14539 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to14540 connect through a Secure MCP Tunnel.1454114542 Currently supported `connector_id` values are:1454314544 - Dropbox: `connector_dropbox`14545 - Gmail: `connector_gmail`14546 - Google Calendar: `connector_googlecalendar`14547 - Google Drive: `connector_googledrive`14548 - Microsoft Teams: `connector_microsoftteams`14549 - Outlook Calendar: `connector_outlookcalendar`14550 - Outlook Email: `connector_outlookemail`14551 - SharePoint: `connector_sharepoint`1455214553 - `"connector_dropbox"`1455414555 - `"connector_gmail"`1455614557 - `"connector_googlecalendar"`1455814559 - `"connector_googledrive"`1456014561 - `"connector_microsoftteams"`1456214563 - `"connector_outlookcalendar"`1456414565 - `"connector_outlookemail"`1456614567 - `"connector_sharepoint"`1456814569 - `defer_loading: optional boolean`1457014571 Whether this MCP tool is deferred and discovered via tool search.1457214573 - `headers: optional map[string] or null`1457414575 Optional HTTP headers to send to the MCP server. Use for authentication14576 or other purposes.1457714578 - `require_approval: optional object { always, never } or "always" or "never" or null`1457914580 Specify which of the MCP server's tools require approval.1458114582 - `McpToolApprovalFilter object { always, never }`1458314584 Specify which of the MCP server's tools require approval. Can be14585 `always`, `never`, or a filter object associated with tools14586 that require approval.1458714588 - `always: optional object { read_only, tool_names }`1458914590 A filter object to specify which tools are allowed.1459114592 - `read_only: optional boolean`1459314594 Indicates whether or not a tool modifies data or is read-only. If an14595 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),14596 it will match this filter.1459714598 - `tool_names: optional array of string`1459914600 List of allowed tool names.1460114602 - `never: optional object { read_only, tool_names }`1460314604 A filter object to specify which tools are allowed.1460514606 - `read_only: optional boolean`1460714608 Indicates whether or not a tool modifies data or is read-only. If an14609 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),14610 it will match this filter.1461114612 - `tool_names: optional array of string`1461314614 List of allowed tool names.1461514616 - `McpToolApprovalSetting = "always" or "never"`1461714618 Specify a single approval policy for all tools. One of `always` or14619 `never`. When set to `always`, all tools will require approval. When14620 set to `never`, all tools will not require approval.1462114622 - `"always"`1462314624 - `"never"`1462514626 - `server_description: optional string`1462714628 Optional description of the MCP server, used to provide more context.1462914630 - `server_url: optional string`1463114632 The URL for the MCP server. One of `server_url`, `connector_id`, or14633 `tunnel_id` must be provided.1463414635 - `tunnel_id: optional string`1463614637 The Secure MCP Tunnel ID to use instead of a direct server URL. One of14638 `server_url`, `connector_id`, or `tunnel_id` must be provided.1463914640 - `CodeInterpreter object { container, type, allowed_callers }`1464114642 A tool that runs Python code to help generate a response to a prompt.1464314644 - `container: string or object { type, file_ids, memory_limit, network_policy }`1464514646 The code interpreter container. Can be a container ID or an object that14647 specifies uploaded file IDs to make available to your code, along with an14648 optional `memory_limit` setting.1464914650 - `string`1465114652 The container ID.1465314654 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`1465514656 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.1465714658 - `type: "auto"`1465914660 Always `auto`.1466114662 - `"auto"`1466314664 - `file_ids: optional array of string`1466514666 An optional list of uploaded files to make available to your code.1466714668 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`1466914670 The memory limit for the code interpreter container.1467114672 - `"1g"`1467314674 - `"4g"`1467514676 - `"16g"`1467714678 - `"64g"`1467914680 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`1468114682 Network access policy for the container.1468314684 - `ContainerNetworkPolicyDisabled object { type }`1468514686 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`1468714688 - `type: "code_interpreter"`1468914690 The type of the code interpreter tool. Always `code_interpreter`.1469114692 - `"code_interpreter"`1469314694 - `allowed_callers: optional array of "direct" or "programmatic" or null`1469514696 The tool invocation context(s).1469714698 - `"direct"`1469914700 - `"programmatic"`1470114702 - `ProgrammaticToolCalling object { type }`1470314704 - `type: "programmatic_tool_calling"`1470514706 The type of the tool. Always `programmatic_tool_calling`.1470714708 - `"programmatic_tool_calling"`1470914710 - `ImageGeneration object { type, action, background, 9 more }`1471114712 A tool that generates images using the GPT image models.1471314714 - `type: "image_generation"`1471514716 The type of the image generation tool. Always `image_generation`.1471714718 - `"image_generation"`1471914720 - `action: optional "generate" or "edit" or "auto"`1472114722 Whether to generate a new image or edit an existing image. Default: `auto`.1472314724 - `"generate"`1472514726 - `"edit"`1472714728 - `"auto"`1472914730 - `background: optional "transparent" or "opaque" or "auto"`1473114732 Set the background of the generated image. One of `transparent`, `opaque`,14733 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including14734 their `2026-09-08` snapshots, support `opaque` and `transparent`14735 backgrounds. Transparent backgrounds are available for supported GPT Image14736 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in14737 preview. When using `transparent`, set the output format to `png` or `webp`.14738 Default: `auto`.1473914740 - `"transparent"`1474114742 - `"opaque"`1474314744 - `"auto"`1474514746 - `input_fidelity: optional "high" or "low" or null`1474714748 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`.1474914750 - `"high"`1475114752 - `"low"`1475314754 - `input_image_mask: optional object { file_id, image_url }`1475514756 Optional mask for inpainting. Contains `image_url`14757 (string, optional) and `file_id` (string, optional).1475814759 - `file_id: optional string`1476014761 File ID for the mask image.1476214763 - `image_url: optional string`1476414765 Base64-encoded mask image.1476614767 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`1476814769 The image generation model to use. One of `gpt-image-1`,14770 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,14771 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,14772 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,14773 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:14774 `gpt-image-1`.1477514776 - `string`1477714778 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`1477914780 The image generation model to use. One of `gpt-image-1`,14781 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,14782 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,14783 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,14784 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:14785 `gpt-image-1`.1478614787 - `"gpt-image-1"`1478814789 - `"gpt-image-1-mini"`1479014791 - `"gpt-image-1.5"`1479214793 - `"gpt-image-2"`1479414795 - `"gpt-image-2-2026-04-21"`1479614797 - `"gpt-image-2.5-sunburst"`1479814799 - `"gpt-image-2.5-sunburst-2026-09-08"`1480014801 - `"gpt-image-2.5-flare"`1480214803 - `"gpt-image-2.5-flare-2026-09-08"`1480414805 - `moderation: optional "auto" or "low"`1480614807 Moderation level for the generated image. Default: `auto`.1480814809 - `"auto"`1481014811 - `"low"`1481214813 - `output_compression: optional number`1481414815 Compression level for the output image. Default: 100.1481614817 - `output_format: optional "png" or "webp" or "jpeg"`1481814819 The output format of the generated image. One of `png`, `webp`, or14820 `jpeg`. Default: `png`.1482114822 - `"png"`1482314824 - `"webp"`1482514826 - `"jpeg"`1482714828 - `partial_images: optional number`1482914830 Number of partial images to generate in streaming mode, from 0 (default value) to 3.1483114832 - `quality: optional "low" or "medium" or "high" or 3 more`1483314834 The quality of the generated image. The GPT image models support `low`,14835 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,14836 including their `2026-09-08` snapshots, also support `xhigh` and `max`.14837 Default: `auto`.1483814839 - `"low"`1484014841 - `"medium"`1484214843 - `"high"`1484414845 - `"xhigh"`1484614847 - `"max"`1484814849 - `"auto"`1485014851 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`1485214853 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.1485414855 - `string`1485614857 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`1485814859 The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.1486014861 - `"1024x1024"`1486214863 - `"1024x1536"`1486414865 - `"1536x1024"`1486614867 - `"auto"`1486814869 - `LocalShell object { type }`1487014871 A tool that allows the model to execute shell commands in a local environment.1487214873 - `type: "local_shell"`1487414875 The type of the local shell tool. Always `local_shell`.1487614877 - `"local_shell"`1487814879 - `Shell object { type, allowed_callers, environment }`1488014881 A tool that allows the model to execute shell commands.1488214883 - `type: "shell"`1488414885 The type of the shell tool. Always `shell`.1488614887 - `"shell"`1488814889 - `allowed_callers: optional array of "direct" or "programmatic" or null`1489014891 The tool invocation context(s).1489214893 - `"direct"`1489414895 - `"programmatic"`1489614897 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`1489814899 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`1490014901 - `LocalEnvironment object { type, skills }`1490214903 - `ContainerReference object { container_id, type }`1490414905 - `Custom object { name, type, allowed_callers, 4 more }`1490614907 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)1490814909 - `name: string`1491014911 The name of the custom tool, used to identify it in tool calls.1491214913 - `type: "custom"`1491414915 The type of the custom tool. Always `custom`.1491614917 - `"custom"`1491814919 - `allowed_callers: optional array of "direct" or "programmatic" or null`1492014921 The tool invocation context(s).1492214923 - `"direct"`1492414925 - `"programmatic"`1492614927 - `async: optional boolean`1492814929 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1493014931 - `defer_loading: optional boolean`1493214933 Whether this tool should be deferred and discovered via tool search.1493414935 - `description: optional string`1493614937 Optional description of the custom tool, used to provide more context.1493814939 - `format: optional CustomToolInputFormat`1494014941 The input format for the custom tool. Default is unconstrained text.1494214943 - `Namespace object { description, name, tools, type }`1494414945 Groups function/custom tools under a shared namespace.1494614947 - `description: string`1494814949 A description of the namespace shown to the model.1495014951 - `name: string`1495214953 The namespace name used in tool calls (for example, `crm`).1495414955 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`1495614957 The function/custom tools available inside this namespace.1495814959 - `Function object { name, type, allowed_callers, 6 more }`1496014961 - `name: string`1496214963 - `type: "function"`1496414965 - `"function"`1496614967 - `allowed_callers: optional array of "direct" or "programmatic" or null`1496814969 The tool invocation context(s).1497014971 - `"direct"`1497214973 - `"programmatic"`1497414975 - `async: optional boolean`1497614977 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1497814979 - `defer_loading: optional boolean`1498014981 Whether this function should be deferred and discovered via tool search.1498214983 - `description: optional string or null`1498414985 - `output_schema: optional map[unknown] or null`1498614987 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.1498814989 - `parameters: optional unknown or null`1499014991 - `strict: optional boolean or null`1499214993 Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.1499414995 - `Custom object { name, type, allowed_callers, 4 more }`1499614997 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)1499814999 - `name: string`1500015001 The name of the custom tool, used to identify it in tool calls.1500215003 - `type: "custom"`1500415005 The type of the custom tool. Always `custom`.1500615007 - `"custom"`1500815009 - `allowed_callers: optional array of "direct" or "programmatic" or null`1501015011 The tool invocation context(s).1501215013 - `"direct"`1501415015 - `"programmatic"`1501615017 - `async: optional boolean`1501815019 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.1502015021 - `defer_loading: optional boolean`1502215023 Whether this tool should be deferred and discovered via tool search.1502415025 - `description: optional string`1502615027 Optional description of the custom tool, used to provide more context.1502815029 - `format: optional CustomToolInputFormat`1503015031 The input format for the custom tool. Default is unconstrained text.1503215033 - `type: "namespace"`1503415035 The type of the tool. Always `namespace`.1503615037 - `"namespace"`1503815039 - `ToolSearch object { type, description, execution, parameters }`1504015041 Hosted or BYOT tool search configuration for deferred tools.1504215043 - `type: "tool_search"`1504415045 The type of the tool. Always `tool_search`.1504615047 - `"tool_search"`1504815049 - `description: optional string or null`1505015051 Description shown to the model for a client-executed tool search tool.1505215053 - `execution: optional "server" or "client"`1505415055 Whether tool search is executed by the server or by the client.1505615057 - `"server"`1505815059 - `"client"`1506015061 - `parameters: optional unknown or null`1506215063 Parameter schema for a client-executed tool search tool.1506415065 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`1506615067 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).1506815069 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`1507015071 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.1507215073 - `"web_search_preview"`1507415075 - `"web_search_preview_2025_03_11"`1507615077 - `search_content_types: optional array of "text" or "image"`1507815079 - `"text"`1508015081 - `"image"`1508215083 - `search_context_size: optional "low" or "medium" or "high"`1508415085 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.1508615087 - `"low"`1508815089 - `"medium"`1509015091 - `"high"`1509215093 - `user_location: optional object { type, city, country, 2 more } or null`1509415095 The user's location.1509615097 - `type: "approximate"`1509815099 The type of location approximation. Always `approximate`.1510015101 - `"approximate"`1510215103 - `city: optional string or null`1510415105 Free text input for the city of the user, e.g. `San Francisco`.1510615107 - `country: optional string or null`1510815109 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.1511015111 - `region: optional string or null`1511215113 Free text input for the region of the user, e.g. `California`.1511415115 - `timezone: optional string or null`1511615117 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.1511815119 - `ApplyPatch object { type, allowed_callers }`1512015121 Allows the assistant to create, delete, or update files using unified diffs.1512215123 - `type: "apply_patch"`1512415125 The type of the tool. Always `apply_patch`.1512615127 - `"apply_patch"`1512815129 - `allowed_callers: optional array of "direct" or "programmatic" or null`1513015131 The tool invocation context(s).1513215133 - `"direct"`1513415135 - `"programmatic"`1513615137 - `top_p: number or null`1513815139 An alternative to sampling with temperature, called nucleus sampling,15140 where the model considers the results of the tokens with top_p probability15141 mass. So 0.1 means only the tokens comprising the top 10% probability mass15142 are considered.1514315144 We generally recommend altering this or `temperature` but not both.1514515146 - `background: optional boolean or null`1514715148 Whether to run the model response in the background.15149 [Learn more](/api/docs/guides/background).1515015151 - `completed_at: optional number or null`1515215153 Unix timestamp (in seconds) of when this Response was completed.15154 Only present when the status is `completed`.1515515156 - `conversation: optional object { id } or null`1515715158 The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.1515915160 - `id: string`1516115162 The unique ID of the conversation that this response was associated with.1516315164 - `max_output_tokens: optional number or null`1516515166 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).1516715168 - `max_tool_calls: optional number or null`1516915170 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.1517115172 - `moderation: optional object { input, output } or null`1517315174 Moderation results for the response input and output, if moderated completions were requested.1517515176 - `input: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }`1517715178 Moderation for the response input.1517915180 - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }`1518115182 A moderation result produced for the response input or output.1518315184 - `categories: map[boolean]`1518515186 A dictionary of moderation categories to booleans, True if the input is flagged under this category.1518715188 - `category_applied_input_types: map[array of "text" or "image"]`1518915190 Which modalities of input are reflected by the score for each category.1519115192 - `"text"`1519315194 - `"image"`1519515196 - `category_scores: map[number]`1519715198 A dictionary of moderation categories to scores.1519915200 - `flagged: boolean`1520115202 A boolean indicating whether the content was flagged by any category.1520315204 - `model: string`1520515206 The moderation model that produced this result.1520715208 - `type: "moderation_result"`1520915210 The object type, which was always `moderation_result` for successful moderation results.1521115212 - `"moderation_result"`1521315214 - `Error object { code, message, type }`1521515216 An error produced while attempting moderation for the response input or output.1521715218 - `code: string`1521915220 The error code.1522115222 - `message: string`1522315224 The error message.1522515226 - `type: "error"`1522715228 The object type, which was always `error` for moderation failures.1522915230 - `"error"`1523115232 - `output: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }`1523315234 Moderation for the response output.1523515236 - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }`1523715238 A moderation result produced for the response input or output.1523915240 - `categories: map[boolean]`1524115242 A dictionary of moderation categories to booleans, True if the input is flagged under this category.1524315244 - `category_applied_input_types: map[array of "text" or "image"]`1524515246 Which modalities of input are reflected by the score for each category.1524715248 - `"text"`1524915250 - `"image"`1525115252 - `category_scores: map[number]`1525315254 A dictionary of moderation categories to scores.1525515256 - `flagged: boolean`1525715258 A boolean indicating whether the content was flagged by any category.1525915260 - `model: string`1526115262 The moderation model that produced this result.1526315264 - `type: "moderation_result"`1526515266 The object type, which was always `moderation_result` for successful moderation results.1526715268 - `"moderation_result"`1526915270 - `Error object { code, message, type }`1527115272 An error produced while attempting moderation for the response input or output.1527315274 - `code: string`1527515276 The error code.1527715278 - `message: string`1527915280 The error message.1528115282 - `type: "error"`1528315284 The object type, which was always `error` for moderation failures.1528515286 - `"error"`1528715288 - `output_text: optional string or null`1528915290 SDK-only convenience property that contains the aggregated text output15291 from all `output_text` items in the `output` array, if any are present.15292 Supported in the Python and JavaScript SDKs.1529315294 - `previous_response_id: optional string or null`1529515296 The unique ID of the previous response to the model. Use this to15297 create multi-turn conversations. Learn more about15298 [conversation state](/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.1529915300 - `prompt: optional ResponsePrompt or null`1530115302 Reference to a prompt template and its variables.15303 [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).1530415305 - `id: string`1530615307 The unique identifier of the prompt template to use.1530815309 - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`1531015311 Optional map of values to substitute in for variables in your15312 prompt. The substitution values can either be strings, or other15313 Response input types like images or files.1531415315 - `string`1531615317 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1531815319 A text input to the model.1532015321 - `ResponseInputImage object { detail, type, file_id, 2 more }`1532215323 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1532415325 - `ResponseInputFile object { type, detail, file_data, 4 more }`1532615327 A file input to the model.1532815329 - `version: optional string or null`1533015331 Optional version of the prompt template.1533215333 - `prompt_cache_diagnostics: optional object { cache_missed_tokens, reason, type, comparison_reusable_tokens } or object { type } or object { type } or object { type }`1533415335 Prompt cache diagnostics requested for this response.1533615337 - `CacheMiss object { cache_missed_tokens, reason, type, comparison_reusable_tokens }`1533815339 - `cache_missed_tokens: number`1534015341 The estimated number of input tokens affected after the first detected divergence.1534215343 - `reason: "model_changed" or "prompt_cache_key_changed" or "tools_changed" or 6 more`1534415345 The reason prompt cache reuse did not occur.1534615347 - `"model_changed"`1534815349 - `"prompt_cache_key_changed"`1535015351 - `"tools_changed"`1535215353 - `"text_format_changed"`1535415355 - `"reasoning_effort_changed"`1535615357 - `"verbosity_changed"`1535815359 - `"context_compacted"`1536015361 - `"input_changed"`1536215363 - `"service_tier_changed"`1536415365 - `type: "cache_miss"`1536615367 - `"cache_miss"`1536815369 - `comparison_reusable_tokens: optional number`1537015371 The raw token count of the reusable prefix in the compared response.1537215373 - `CacheHit object { type }`1537415375 - `type: "cache_hit"`1537615377 - `"cache_hit"`1537815379 - `ComparisonResponseNotFound object { type }`1538015381 - `type: "comparison_response_not_found"`1538215383 - `"comparison_response_not_found"`1538415385 - `Unavailable object { type }`1538615387 - `type: "unavailable"`1538815389 - `"unavailable"`1539015391 - `prompt_cache_key: optional string or null`1539215393 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/api/docs/guides/prompt-caching).1539415395 - `prompt_cache_options: optional object { mode, ttl, comparison_response_id }`1539615397 The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.1539815399 - `mode: "implicit" or "explicit"`1540015401 Whether implicit prompt-cache breakpoints were enabled.1540215403 - `"implicit"`1540415405 - `"explicit"`1540615407 - `ttl: "30m"`1540815409 The minimum lifetime applied to each cache breakpoint.1541015411 - `"30m"`1541215413 - `comparison_response_id: optional string or null`1541415415 The response ID supplied as the prompt cache diagnostics comparison.1541615417 - `prompt_cache_retention: optional "in_memory" or "24h" or null`1541815419 Deprecated. Use `prompt_cache_options.ttl` instead.1542015421 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](/api/docs/guides/prompt-caching#prompt-cache-retention).15422 This field expresses a maximum retention policy, while15423 `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two15424 fields are independent and do not interact.15425 For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.1542615427 For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:1542815429 - Organizations without ZDR enabled default to `24h`.15430 - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.1543115432 - `"in_memory"`1543315434 - `"24h"`1543515436 - `reasoning: optional Reasoning or null`1543715438 Configuration options for15439 [reasoning models](/api/docs/guides/reasoning).1544015441 - `context: optional "auto" or "current_turn" or "all_turns" or null`1544215443 Controls which reasoning items are rendered back to the model on later turns.15444 If omitted or set to `auto`, the model determines the context mode. The15445 `gpt-5.6` model family defaults to `all_turns`; earlier models default to15446 `current_turn`.1544715448 When returned on a response, this is the effective reasoning context mode15449 used for the response.1545015451 - `"auto"`1545215453 - `"current_turn"`1545415455 - `"all_turns"`1545615457 - `effort: optional ReasoningEffort or null`1545815459 Constrains effort on reasoning for reasoning models. Currently supported15460 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.15461 Reducing reasoning effort can result in faster responses and fewer tokens15462 used on reasoning in a response. Not all reasoning models support every15463 value. See the15464 [reasoning guide](/api/docs/guides/reasoning)15465 for model-specific support.1546615467 - `generate_summary: optional "auto" or "concise" or "detailed" or null`1546815469 **Deprecated:** use `summary` instead.1547015471 A summary of the reasoning performed by the model. This can be15472 useful for debugging and understanding the model's reasoning process.15473 One of `auto`, `concise`, or `detailed`.1547415475 - `"auto"`1547615477 - `"concise"`1547815479 - `"detailed"`1548015481 - `mode: optional string or "standard" or "pro"`1548215483 Controls the reasoning execution mode for the request.1548415485 When returned on a response, this is the effective execution mode.1548615487 - `string`1548815489 - `"standard" or "pro"`1549015491 Controls the reasoning execution mode for the request.1549215493 When returned on a response, this is the effective execution mode.1549415495 - `"standard"`1549615497 - `"pro"`1549815499 - `summary: optional "auto" or "concise" or "detailed" or null`1550015501 A summary of the reasoning performed by the model. This can be15502 useful for debugging and understanding the model's reasoning process.15503 One of `auto`, `concise`, or `detailed`.1550415505 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.1550615507 - `"auto"`1550815509 - `"concise"`1551015511 - `"detailed"`1551215513 - `safety_identifier: optional string or null`1551415515 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.15516 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](/api/docs/guides/safety-best-practices#implement-safety-identifiers).1551715518 - `service_tier: optional ServiceTier or null`1551915520 Specifies the processing type used for serving the request.1552115522 - 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'.15523 - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.15524 - If set to '[flex](/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier.15525 - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.15526 - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`.15527 - When not set, the default behavior is 'auto'.1552815529 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.1553015531 - `"auto"`1553215533 - `"default"`1553415535 - `"flex"`1553615537 - `"scale"`1553815539 - `"priority"`1554015541 - `"fast"`1554215543 - `"ultrafast"`1554415545 - `status: optional ResponseStatus`1554615547 The status of the response generation. One of `completed`, `failed`,15548 `in_progress`, `cancelled`, `queued`, or `incomplete`.1554915550 - `"completed"`1555115552 - `"failed"`1555315554 - `"in_progress"`1555515556 - `"cancelled"`1555715558 - `"queued"`1555915560 - `"incomplete"`1556115562 - `text: optional ResponseTextConfig`1556315564 Configuration options for a text response from the model. Can be plain15565 text or structured JSON data. Learn more:1556615567 - [Text inputs and outputs](/api/docs/guides/text)15568 - [Structured Outputs](/api/docs/guides/structured-outputs)1556915570 - `format: optional ResponseFormatTextConfig`1557115572 An object specifying the format that the model must output.1557315574 Configuring `{ "type": "json_schema" }` enables Structured Outputs,15575 which ensures the model will match your supplied JSON schema. Learn more in the15576 [Structured Outputs guide](/api/docs/guides/structured-outputs).1557715578 The default format is `{ "type": "text" }` with no additional options.1557915580 **Not recommended for gpt-4o and newer models:**1558115582 Setting to `{ "type": "json_object" }` enables the older JSON mode, which15583 ensures the message the model generates is valid JSON. Using `json_schema`15584 is preferred for models that support it.1558515586 - `ResponseFormatText object { type }`1558715588 Default response format. Used to generate text responses.1558915590 - `type: "text"`1559115592 The type of response format being defined. Always `text`.1559315594 - `"text"`1559515596 - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`1559715598 JSON Schema response format. Used to generate structured JSON responses.15599 Learn more about [Structured Outputs](/api/docs/guides/structured-outputs).1560015601 - `name: string`1560215603 The name of the response format. Must be a-z, A-Z, 0-9, or contain15604 underscores and dashes, with a maximum length of 64.1560515606 - `schema: map[unknown]`1560715608 The schema for the response format, described as a JSON Schema object.15609 Learn how to build JSON schemas [here](https://json-schema.org/).1561015611 - `type: "json_schema"`1561215613 The type of response format being defined. Always `json_schema`.1561415615 - `"json_schema"`1561615617 - `description: optional string`1561815619 A description of what the response format is for, used by the model to15620 determine how to respond in the format.1562115622 - `strict: optional boolean or null`1562315624 Whether to enable strict schema adherence when generating the output.15625 If set to true, the model will always follow the exact schema defined15626 in the `schema` field. Only a subset of JSON Schema is supported when15627 `strict` is `true`. To learn more, read the [Structured Outputs15628 guide](/api/docs/guides/structured-outputs).1562915630 - `ResponseFormatJSONObject object { type }`1563115632 JSON object response format. An older method of generating JSON responses.15633 Using `json_schema` is recommended for models that support it. Note that the15634 model will not generate JSON without a system or user message instructing it15635 to do so.1563615637 - `type: "json_object"`1563815639 The type of response format being defined. Always `json_object`.1564015641 - `"json_object"`1564215643 - `verbosity: optional "low" or "medium" or "high" or null`1564415645 Constrains the verbosity of the model's response. Lower values will result in15646 more concise responses, while higher values will result in more verbose responses.15647 Currently supported values are `low`, `medium`, and `high`. The default is15648 `medium`.1564915650 - `"low"`1565115652 - `"medium"`1565315654 - `"high"`1565515656 - `top_logprobs: optional number or null`1565715658 An integer between 0 and 20 specifying the maximum number of most likely15659 tokens to return at each token position, each with an associated log15660 probability. In some cases, the number of returned tokens may be fewer than15661 requested.1566215663 - `truncation: optional "auto" or "disabled" or null`1566415665 The truncation strategy to use for the model response.1566615667 - `auto`: If the input to this Response exceeds15668 the model's context window size, the model will truncate the15669 response to fit the context window by dropping items from the beginning of the conversation.15670 - `disabled` (default): If the input size will exceed the context window15671 size for a model, the request will fail with a 400 error.1567215673 - `"auto"`1567415675 - `"disabled"`1567615677 - `usage: optional ResponseUsage`1567815679 Represents token usage details including input tokens, output tokens,15680 a breakdown of output tokens, and the total tokens used.1568115682 - `input_tokens: number`1568315684 The number of input tokens.1568515686 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`1568715688 A detailed breakdown of the input tokens.1568915690 - `cache_write_tokens: number`1569115692 The number of input tokens that were written to the cache.1569315694 - `cached_tokens: number`1569515696 The number of tokens that were retrieved from the cache.15697 [More on prompt caching](/api/docs/guides/prompt-caching).1569815699 - `output_tokens: number`1570015701 The number of output tokens.1570215703 - `output_tokens_details: object { reasoning_tokens }`1570415705 A detailed breakdown of the output tokens.1570615707 - `reasoning_tokens: number`1570815709 The number of reasoning tokens.1571015711 - `total_tokens: number`1571215713 The total number of tokens used.1571415715 - `user: optional string`1571615717 This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.15718 A stable identifier for your end-users.15719 Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).1572015721### Example1572215723```http15724curl https://api.openai.com/v1/responses \15725 -H 'Content-Type: application/json' \15726 -H "Authorization: Bearer $OPENAI_API_KEY" \15727 -d '{15728 "context_management": [15729 {15730 "type": "type"15731 }15732 ],15733 "model": "gpt-6-astra",15734 "prompt_cache_key": "prompt-cache-key-1234",15735 "safety_identifier": "safety-identifier-1234",15736 "temperature": 1,15737 "top_p": 1,15738 "user": "user-1234"15739 }'15740```1574115742#### Response1574315744```json15745{15746 "id": "id",15747 "created_at": 0,15748 "error": {15749 "code": "server_error",15750 "message": "message",15751 "misalignment": {15752 "detailed_explanation": "detailed_explanation",15753 "error_type": "potentially_unintended_data_transfer",15754 "steer": {15755 "message": "message"15756 }15757 }15758 },15759 "incomplete_details": {15760 "reason": "max_output_tokens"15761 },15762 "instructions": "string",15763 "metadata": {15764 "foo": "string"15765 },15766 "model": "gpt-6-astra",15767 "object": "response",15768 "output": [15769 {15770 "id": "id",15771 "content": [15772 {15773 "annotations": [15774 {15775 "file_id": "file_id",15776 "filename": "filename",15777 "index": 0,15778 "type": "file_citation"15779 }15780 ],15781 "logprobs": [15782 {15783 "token": "token",15784 "bytes": [15785 015786 ],15787 "logprob": 0,15788 "top_logprobs": [15789 {15790 "token": "token",15791 "bytes": [15792 015793 ],15794 "logprob": 015795 }15796 ]15797 }15798 ],15799 "text": "text",15800 "type": "output_text"15801 }15802 ],15803 "role": "assistant",15804 "status": "in_progress",15805 "type": "message",15806 "phase": "commentary"15807 }15808 ],15809 "parallel_tool_calls": true,15810 "temperature": 1,15811 "tool_choice": "none",15812 "tools": [15813 {15814 "name": "name",15815 "parameters": {15816 "foo": "bar"15817 },15818 "strict": true,15819 "type": "function",15820 "allowed_callers": [15821 "direct"15822 ],15823 "async": true,15824 "defer_loading": true,15825 "description": "description",15826 "output_schema": {15827 "foo": "bar"15828 }15829 }15830 ],15831 "top_p": 1,15832 "background": true,15833 "completed_at": 0,15834 "conversation": {15835 "id": "id"15836 },15837 "max_output_tokens": 0,15838 "max_tool_calls": 0,15839 "moderation": {15840 "input": {15841 "categories": {15842 "foo": true15843 },15844 "category_applied_input_types": {15845 "foo": [15846 "text"15847 ]15848 },15849 "category_scores": {15850 "foo": 015851 },15852 "flagged": true,15853 "model": "model",15854 "type": "moderation_result"15855 },15856 "output": {15857 "categories": {15858 "foo": true15859 },15860 "category_applied_input_types": {15861 "foo": [15862 "text"15863 ]15864 },15865 "category_scores": {15866 "foo": 015867 },15868 "flagged": true,15869 "model": "model",15870 "type": "moderation_result"15871 }15872 },15873 "output_text": "output_text",15874 "previous_response_id": "previous_response_id",15875 "prompt": {15876 "id": "id",15877 "variables": {15878 "foo": "string"15879 },15880 "version": "version"15881 },15882 "prompt_cache_diagnostics": {15883 "cache_missed_tokens": 0,15884 "reason": "model_changed",15885 "type": "cache_miss",15886 "comparison_reusable_tokens": 015887 },15888 "prompt_cache_key": "prompt-cache-key-1234",15889 "prompt_cache_options": {15890 "mode": "implicit",15891 "ttl": "30m",15892 "comparison_response_id": "comparison_response_id"15893 },15894 "prompt_cache_retention": "in_memory",15895 "reasoning": {15896 "context": "auto",15897 "effort": "none",15898 "generate_summary": "auto",15899 "mode": "standard",15900 "summary": "auto"15901 },15902 "safety_identifier": "safety-identifier-1234",15903 "service_tier": "auto",15904 "status": "completed",15905 "text": {15906 "format": {15907 "type": "text"15908 },15909 "verbosity": "low"15910 },15911 "top_logprobs": 0,15912 "truncation": "auto",15913 "usage": {15914 "input_tokens": 0,15915 "input_tokens_details": {15916 "cache_write_tokens": 0,15917 "cached_tokens": 015918 },15919 "output_tokens": 0,15920 "output_tokens_details": {15921 "reasoning_tokens": 015922 },15923 "total_tokens": 015924 },15925 "user": "user-1234"15926}15927```1592815929### File input1593015931```http15932curl https://api.openai.com/v1/responses \15933 -H "Content-Type: application/json" \15934 -H "Authorization: Bearer $OPENAI_API_KEY" \15935 -d '{15936 "model": "gpt-6-astra",15937 "input": [15938 {15939 "role": "user",15940 "content": [15941 {"type": "input_text", "text": "what is in this file?"},15942 {15943 "type": "input_file",15944 "file_url": "https://www.berkshirehathaway.com/letters/2024ltr.pdf",15945 "detail": "auto"15946 }15947 ]15948 }15949 ]15950 }'15951```1595215953#### Response1595415955```json15956{15957 "id": "resp_686eef60237881a2bd1180bb8b13de430e34c516d176ff86",15958 "object": "response",15959 "created_at": 1752100704,15960 "status": "completed",15961 "completed_at": 1752100705,15962 "background": false,15963 "error": null,15964 "incomplete_details": null,15965 "instructions": null,15966 "max_output_tokens": null,15967 "max_tool_calls": null,15968 "model": "gpt-6-astra",15969 "output": [15970 {15971 "id": "msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86",15972 "type": "message",15973 "status": "completed",15974 "content": [15975 {15976 "type": "output_text",15977 "annotations": [],15978 "logprobs": [],15979 "text": "The file seems to contain excerpts from a letter to the shareholders of Berkshire Hathaway Inc., likely written by Warren Buffett. It covers several topics:\n\n1. **Communication Philosophy**: Buffett emphasizes the importance of transparency and candidness in reporting mistakes and successes to shareholders.\n\n2. **Mistakes and Learnings**: The letter acknowledges past mistakes in business assessments and management hires, highlighting the importance of correcting errors promptly.\n\n3. **CEO Succession**: Mention of Greg Abel stepping in as the new CEO and continuing the tradition of honest communication.\n\n4. **Pete Liegl Story**: A detailed account of acquiring Forest River and the relationship with its founder, highlighting trust and effective business decisions.\n\n5. **2024 Performance**: Overview of business performance, particularly in insurance and investment activities, with a focus on GEICO's improvement.\n\n6. **Tax Contributions**: Discussion of significant tax payments to the U.S. Treasury, credited to shareholders' reinvestments.\n\n7. **Investment Strategy**: A breakdown of Berkshire\u2019s investments in both controlled subsidiaries and marketable equities, along with a focus on long-term holding strategies.\n\n8. **American Capitalism**: Reflections on America\u2019s economic development and Berkshire\u2019s role within it.\n\n9. **Property-Casualty Insurance**: Insights into the P/C insurance business model and its challenges and benefits.\n\n10. **Japanese Investments**: Information about Berkshire\u2019s investments in Japanese companies and future plans.\n\n11. **Annual Meeting**: Details about the upcoming annual gathering in Omaha, including schedule changes and new book releases.\n\n12. **Personal Anecdotes**: Light-hearted stories about family and interactions, conveying Buffett's personable approach.\n\n13. **Financial Performance Data**: Tables comparing Berkshire\u2019s annual performance to the S&P 500, showing impressive long-term gains.\n\nOverall, the letter reinforces Berkshire Hathaway's commitment to transparency, investment in both its businesses and the wider economy, and emphasizes strong leadership and prudent financial management."15980 }15981 ],15982 "role": "assistant"15983 }15984 ],15985 "parallel_tool_calls": true,15986 "previous_response_id": null,15987 "reasoning": {15988 "effort": null,15989 "summary": null15990 },15991 "service_tier": "default",15992 "store": true,15993 "temperature": 1.0,15994 "text": {15995 "format": {15996 "type": "text"15997 }15998 },15999 "tool_choice": "auto",16000 "tools": [],16001 "top_logprobs": 0,16002 "top_p": 1.0,16003 "truncation": "disabled",16004 "usage": {16005 "input_tokens": 8438,16006 "input_tokens_details": {16007 "cached_tokens": 0,16008 "cache_write_tokens": 016009 },16010 "output_tokens": 398,16011 "output_tokens_details": {16012 "reasoning_tokens": 016013 },16014 "total_tokens": 883616015 },16016 "user": null,16017 "metadata": {}16018}16019```1602016021### File search1602216023```http16024curl https://api.openai.com/v1/responses \16025 -H "Content-Type: application/json" \16026 -H "Authorization: Bearer $OPENAI_API_KEY" \16027 -d '{16028 "model": "gpt-6-astra",16029 "tools": [{16030 "type": "file_search",16031 "vector_store_ids": ["vs_1234567890"],16032 "max_num_results": 2016033 }],16034 "input": "What are the attributes of an ancient brown dragon?"16035 }'16036```1603716038#### Response1603916040```json16041{16042 "id": "resp_67ccf4c55fc48190b71bd0463ad3306d09504fb6872380d7",16043 "object": "response",16044 "created_at": 1741485253,16045 "status": "completed",16046 "completed_at": 1741485254,16047 "error": null,16048 "incomplete_details": null,16049 "instructions": null,16050 "max_output_tokens": null,16051 "model": "gpt-6-astra",16052 "output": [16053 {16054 "type": "file_search_call",16055 "id": "fs_67ccf4c63cd08190887ef6464ba5681609504fb6872380d7",16056 "status": "completed",16057 "queries": [16058 "attributes of an ancient brown dragon"16059 ],16060 "results": null16061 },16062 {16063 "type": "message",16064 "id": "msg_67ccf4c93e5c81909d595b369351a9d309504fb6872380d7",16065 "status": "completed",16066 "role": "assistant",16067 "content": [16068 {16069 "type": "output_text",16070 "text": "The attributes of an ancient brown dragon include...",16071 "annotations": [16072 {16073 "type": "file_citation",16074 "index": 320,16075 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16076 "filename": "dragons.pdf"16077 },16078 {16079 "type": "file_citation",16080 "index": 576,16081 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16082 "filename": "dragons.pdf"16083 },16084 {16085 "type": "file_citation",16086 "index": 815,16087 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16088 "filename": "dragons.pdf"16089 },16090 {16091 "type": "file_citation",16092 "index": 815,16093 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16094 "filename": "dragons.pdf"16095 },16096 {16097 "type": "file_citation",16098 "index": 1030,16099 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16100 "filename": "dragons.pdf"16101 },16102 {16103 "type": "file_citation",16104 "index": 1030,16105 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16106 "filename": "dragons.pdf"16107 },16108 {16109 "type": "file_citation",16110 "index": 1156,16111 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16112 "filename": "dragons.pdf"16113 },16114 {16115 "type": "file_citation",16116 "index": 1225,16117 "file_id": "file-4wDz5b167pAf72nx1h9eiN",16118 "filename": "dragons.pdf"16119 }16120 ]16121 }16122 ]16123 }16124 ],16125 "parallel_tool_calls": true,16126 "previous_response_id": null,16127 "reasoning": {16128 "effort": null,16129 "summary": null16130 },16131 "store": true,16132 "temperature": 1.0,16133 "text": {16134 "format": {16135 "type": "text"16136 }16137 },16138 "tool_choice": "auto",16139 "tools": [16140 {16141 "type": "file_search",16142 "filters": null,16143 "max_num_results": 20,16144 "ranking_options": {16145 "ranker": "auto",16146 "score_threshold": 0.016147 },16148 "vector_store_ids": [16149 "vs_1234567890"16150 ]16151 }16152 ],16153 "top_p": 1.0,16154 "truncation": "disabled",16155 "usage": {16156 "input_tokens": 18307,16157 "input_tokens_details": {16158 "cached_tokens": 0,16159 "cache_write_tokens": 016160 },16161 "output_tokens": 348,16162 "output_tokens_details": {16163 "reasoning_tokens": 016164 },16165 "total_tokens": 1865516166 },16167 "user": null,16168 "metadata": {}16169}16170```1617116172### Functions1617316174```http16175curl https://api.openai.com/v1/responses \16176 -H "Content-Type: application/json" \16177 -H "Authorization: Bearer $OPENAI_API_KEY" \16178 -d '{16179 "model": "gpt-6-astra",16180 "input": "What is the weather like in Boston today?",16181 "tools": [16182 {16183 "type": "function",16184 "name": "get_current_weather",16185 "description": "Get the current weather in a given location",16186 "parameters": {16187 "type": "object",16188 "properties": {16189 "location": {16190 "type": "string",16191 "description": "The city and state, e.g. San Francisco, CA"16192 },16193 "unit": {16194 "type": "string",16195 "enum": ["celsius", "fahrenheit"]16196 }16197 },16198 "required": ["location", "unit"]16199 }16200 }16201 ],16202 "tool_choice": "auto"16203 }'16204```1620516206#### Response1620716208```json16209{16210 "id": "resp_67ca09c5efe0819096d0511c92b8c890096610f474011cc0",16211 "object": "response",16212 "created_at": 1741294021,16213 "status": "completed",16214 "completed_at": 1741294022,16215 "error": null,16216 "incomplete_details": null,16217 "instructions": null,16218 "max_output_tokens": null,16219 "model": "gpt-6-astra",16220 "output": [16221 {16222 "type": "function_call",16223 "id": "fc_67ca09c6bedc8190a7abfec07b1a1332096610f474011cc0",16224 "call_id": "call_unLAR8MvFNptuiZK6K6HCy5k",16225 "name": "get_current_weather",16226 "arguments": "{\"location\":\"Boston, MA\",\"unit\":\"celsius\"}",16227 "status": "completed"16228 }16229 ],16230 "parallel_tool_calls": true,16231 "previous_response_id": null,16232 "reasoning": {16233 "effort": null,16234 "summary": null16235 },16236 "store": true,16237 "temperature": 1.0,16238 "text": {16239 "format": {16240 "type": "text"16241 }16242 },16243 "tool_choice": "auto",16244 "tools": [16245 {16246 "type": "function",16247 "description": "Get the current weather in a given location",16248 "name": "get_current_weather",16249 "parameters": {16250 "type": "object",16251 "properties": {16252 "location": {16253 "type": "string",16254 "description": "The city and state, e.g. San Francisco, CA"16255 },16256 "unit": {16257 "type": "string",16258 "enum": [16259 "celsius",16260 "fahrenheit"16261 ]16262 }16263 },16264 "required": [16265 "location",16266 "unit"16267 ]16268 },16269 "strict": true16270 }16271 ],16272 "top_p": 1.0,16273 "truncation": "disabled",16274 "usage": {16275 "input_tokens": 291,16276 "output_tokens": 23,16277 "output_tokens_details": {16278 "reasoning_tokens": 016279 },16280 "total_tokens": 31416281 },16282 "user": null,16283 "metadata": {}16284}16285```1628616287### Image input1628816289```http16290curl https://api.openai.com/v1/responses \16291 -H "Content-Type: application/json" \16292 -H "Authorization: Bearer $OPENAI_API_KEY" \16293 -d '{16294 "model": "gpt-6-astra",16295 "input": [16296 {16297 "role": "user",16298 "content": [16299 {"type": "input_text", "text": "what is in this image?"},16300 {16301 "type": "input_image",16302 "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"16303 }16304 ]16305 }16306 ]16307 }'16308```1630916310#### Response1631116312```json16313{16314 "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",16315 "object": "response",16316 "created_at": 1741476777,16317 "status": "completed",16318 "completed_at": 1741476778,16319 "error": null,16320 "incomplete_details": null,16321 "instructions": null,16322 "max_output_tokens": null,16323 "model": "gpt-6-astra",16324 "output": [16325 {16326 "type": "message",16327 "id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",16328 "status": "completed",16329 "role": "assistant",16330 "content": [16331 {16332 "type": "output_text",16333 "text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",16334 "annotations": []16335 }16336 ]16337 }16338 ],16339 "parallel_tool_calls": true,16340 "previous_response_id": null,16341 "reasoning": {16342 "effort": null,16343 "summary": null16344 },16345 "store": true,16346 "temperature": 1.0,16347 "text": {16348 "format": {16349 "type": "text"16350 }16351 },16352 "tool_choice": "auto",16353 "tools": [],16354 "top_p": 1.0,16355 "truncation": "disabled",16356 "usage": {16357 "input_tokens": 328,16358 "input_tokens_details": {16359 "cached_tokens": 0,16360 "cache_write_tokens": 016361 },16362 "output_tokens": 52,16363 "output_tokens_details": {16364 "reasoning_tokens": 016365 },16366 "total_tokens": 38016367 },16368 "user": null,16369 "metadata": {}16370}16371```1637216373### Reasoning1637416375```http16376curl https://api.openai.com/v1/responses \16377 -H "Content-Type: application/json" \16378 -H "Authorization: Bearer $OPENAI_API_KEY" \16379 -d '{16380 "model": "gpt-6-astra",16381 "input": "How much wood would a woodchuck chuck?",16382 "reasoning": {16383 "effort": "high"16384 }16385 }'16386```1638716388#### Response1638916390```json16391{16392 "id": "resp_67ccd7eca01881908ff0b5146584e408072912b2993db808",16393 "object": "response",16394 "created_at": 1741477868,16395 "status": "completed",16396 "completed_at": 1741477869,16397 "error": null,16398 "incomplete_details": null,16399 "instructions": null,16400 "max_output_tokens": null,16401 "model": "gpt-6-astra",16402 "output": [16403 {16404 "type": "message",16405 "id": "msg_67ccd7f7b5848190a6f3e95d809f6b44072912b2993db808",16406 "status": "completed",16407 "role": "assistant",16408 "content": [16409 {16410 "type": "output_text",16411 "text": "The classic tongue twister...",16412 "annotations": []16413 }16414 ]16415 }16416 ],16417 "parallel_tool_calls": true,16418 "previous_response_id": null,16419 "reasoning": {16420 "effort": "high",16421 "summary": null16422 },16423 "store": true,16424 "temperature": 1.0,16425 "text": {16426 "format": {16427 "type": "text"16428 }16429 },16430 "tool_choice": "auto",16431 "tools": [],16432 "top_p": 1.0,16433 "truncation": "disabled",16434 "usage": {16435 "input_tokens": 81,16436 "input_tokens_details": {16437 "cached_tokens": 0,16438 "cache_write_tokens": 016439 },16440 "output_tokens": 1035,16441 "output_tokens_details": {16442 "reasoning_tokens": 83216443 },16444 "total_tokens": 111616445 },16446 "user": null,16447 "metadata": {}16448}16449```1645016451### Streaming1645216453```http16454curl https://api.openai.com/v1/responses \16455 -H "Content-Type: application/json" \16456 -H "Authorization: Bearer $OPENAI_API_KEY" \16457 -d '{16458 "model": "gpt-6-astra",16459 "instructions": "You are a helpful assistant.",16460 "input": "Hello!",16461 "stream": true16462 }'16463```1646416465#### Response1646616467```json16468event: response.created16469data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}1647016471event: response.in_progress16472data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}1647316474event: response.output_item.added16475data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]}}1647616477event: response.content_part.added16478data: {"type":"response.content_part.added","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"part":{"type":"output_text","text":"","annotations":[]}}1647916480event: response.output_text.delta16481data: {"type":"response.output_text.delta","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"delta":"Hi"}1648216483...1648416485event: response.output_text.done16486data: {"type":"response.output_text.done","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"text":"Hi there! How can I assist you today?"}1648716488event: response.content_part.done16489data: {"type":"response.content_part.done","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"part":{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}}1649016491event: response.output_item.done16492data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}}1649316494event: response.completed16495data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48},"user":null,"metadata":{}}}16496```1649716498### Text input1649916500```http16501curl https://api.openai.com/v1/responses \16502 -H "Content-Type: application/json" \16503 -H "Authorization: Bearer $OPENAI_API_KEY" \16504 -d '{16505 "model": "gpt-6-astra",16506 "input": "Tell me a three sentence bedtime story about a unicorn."16507 }'16508```1650916510#### Response1651116512```json16513{16514 "id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b",16515 "object": "response",16516 "created_at": 1741476542,16517 "status": "completed",16518 "completed_at": 1741476543,16519 "error": null,16520 "incomplete_details": null,16521 "instructions": null,16522 "max_output_tokens": null,16523 "model": "gpt-6-astra",16524 "output": [16525 {16526 "type": "message",16527 "id": "msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b",16528 "status": "completed",16529 "role": "assistant",16530 "content": [16531 {16532 "type": "output_text",16533 "text": "In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.",16534 "annotations": []16535 }16536 ]16537 }16538 ],16539 "parallel_tool_calls": true,16540 "previous_response_id": null,16541 "reasoning": {16542 "effort": null,16543 "summary": null16544 },16545 "store": true,16546 "temperature": 1.0,16547 "text": {16548 "format": {16549 "type": "text"16550 }16551 },16552 "tool_choice": "auto",16553 "tools": [],16554 "top_p": 1.0,16555 "truncation": "disabled",16556 "usage": {16557 "input_tokens": 36,16558 "input_tokens_details": {16559 "cached_tokens": 0,16560 "cache_write_tokens": 016561 },16562 "output_tokens": 87,16563 "output_tokens_details": {16564 "reasoning_tokens": 016565 },16566 "total_tokens": 12316567 },16568 "user": null,16569 "metadata": {}16570}16571```1657216573### Web search1657416575```http16576curl https://api.openai.com/v1/responses \16577 -H "Content-Type: application/json" \16578 -H "Authorization: Bearer $OPENAI_API_KEY" \16579 -d '{16580 "model": "gpt-6-astra",16581 "tools": [{ "type": "web_search_preview" }],16582 "input": "What was a positive news story from today?"16583 }'16584```1658516586#### Response1658716588```json16589{16590 "id": "resp_67ccf18ef5fc8190b16dbee19bc54e5f087bb177ab789d5c",16591 "object": "response",16592 "created_at": 1741484430,16593 "status": "completed",16594 "completed_at": 1741484431,16595 "error": null,16596 "incomplete_details": null,16597 "instructions": null,16598 "max_output_tokens": null,16599 "model": "gpt-6-astra",16600 "output": [16601 {16602 "type": "web_search_call",16603 "id": "ws_67ccf18f64008190a39b619f4c8455ef087bb177ab789d5c",16604 "status": "completed"16605 },16606 {16607 "type": "message",16608 "id": "msg_67ccf190ca3881909d433c50b1f6357e087bb177ab789d5c",16609 "status": "completed",16610 "role": "assistant",16611 "content": [16612 {16613 "type": "output_text",16614 "text": "As of today, March 9, 2025, one notable positive news story...",16615 "annotations": [16616 {16617 "type": "url_citation",16618 "start_index": 442,16619 "end_index": 557,16620 "url": "https://.../?utm_source=chatgpt.com",16621 "title": "..."16622 },16623 {16624 "type": "url_citation",16625 "start_index": 962,16626 "end_index": 1077,16627 "url": "https://.../?utm_source=chatgpt.com",16628 "title": "..."16629 },16630 {16631 "type": "url_citation",16632 "start_index": 1336,16633 "end_index": 1451,16634 "url": "https://.../?utm_source=chatgpt.com",16635 "title": "..."16636 }16637 ]16638 }16639 ]16640 }16641 ],16642 "parallel_tool_calls": true,16643 "previous_response_id": null,16644 "reasoning": {16645 "effort": null,16646 "summary": null16647 },16648 "store": true,16649 "temperature": 1.0,16650 "text": {16651 "format": {16652 "type": "text"16653 }16654 },16655 "tool_choice": "auto",16656 "tools": [16657 {16658 "type": "web_search_preview",16659 "domains": [],16660 "search_context_size": "medium",16661 "user_location": {16662 "type": "approximate",16663 "city": null,16664 "country": "US",16665 "region": null,16666 "timezone": null16667 }16668 }16669 ],16670 "top_p": 1.0,16671 "truncation": "disabled",16672 "usage": {16673 "input_tokens": 328,16674 "input_tokens_details": {16675 "cached_tokens": 0,16676 "cache_write_tokens": 016677 },16678 "output_tokens": 356,16679 "output_tokens_details": {16680 "reasoning_tokens": 016681 },16682 "total_tokens": 68416683 },16684 "user": null,16685 "metadata": {}16686}16687```16688