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## Compact conversation45**post** `/responses/compact`67Compact a conversation. Returns a compacted response object.89Learn when and how to compact long-running conversations in the [conversation state guide](/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/api/docs/guides/conversation-state#compaction-advanced).1011### Body Parameters1213- `model: "gpt-6-astra" or "gpt-5.6-sol" or "gpt-5.6-terra" or 101 more or string or null`1415 Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.1617 - `"gpt-6-astra" or "gpt-5.6-sol" or "gpt-5.6-terra" or 101 more`1819 Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.2021 - `"gpt-6-astra"`2223 - `"gpt-5.6-sol"`2425 - `"gpt-5.6-terra"`2627 - `"gpt-5.6-luna"`2829 - `"gpt-5.5"`3031 - `"gpt-5.5-2026-04-23"`3233 - `"gpt-5.4"`3435 - `"gpt-5.4-mini"`3637 - `"gpt-5.4-nano"`3839 - `"gpt-5.4-mini-2026-03-17"`4041 - `"gpt-5.4-nano-2026-03-17"`4243 - `"gpt-5.3-chat-latest"`4445 - `"gpt-5.2"`4647 - `"gpt-5.2-2025-12-11"`4849 - `"gpt-5.2-chat-latest"`5051 - `"gpt-5.2-pro"`5253 - `"gpt-5.2-pro-2025-12-11"`5455 - `"gpt-5.1"`5657 - `"gpt-5.1-2025-11-13"`5859 - `"gpt-5.1-codex"`6061 - `"gpt-5.1-chat-latest"`6263 - `"gpt-5"`6465 - `"gpt-5-mini"`6667 - `"gpt-5-nano"`6869 - `"gpt-5-2025-08-07"`7071 - `"gpt-5-mini-2025-08-07"`7273 - `"gpt-5-nano-2025-08-07"`7475 - `"gpt-5-chat-latest"`7677 - `"gpt-4.1"`7879 - `"gpt-4.1-mini"`8081 - `"gpt-4.1-nano"`8283 - `"gpt-4.1-2025-04-14"`8485 - `"gpt-4.1-mini-2025-04-14"`8687 - `"gpt-4.1-nano-2025-04-14"`8889 - `"o4-mini"`9091 - `"o4-mini-2025-04-16"`9293 - `"o3"`9495 - `"o3-2025-04-16"`9697 - `"o3-mini"`9899 - `"o3-mini-2025-01-31"`100101 - `"o1"`102103 - `"o1-2024-12-17"`104105 - `"o1-preview"`106107 - `"o1-preview-2024-09-12"`108109 - `"o1-mini"`110111 - `"o1-mini-2024-09-12"`112113 - `"gpt-4o"`114115 - `"gpt-4o-2024-11-20"`116117 - `"gpt-4o-2024-08-06"`118119 - `"gpt-4o-2024-05-13"`120121 - `"gpt-audio-mini"`122123 - `"gpt-audio-mini-2025-12-15"`124125 - `"gpt-4o-audio-preview"`126127 - `"gpt-4o-audio-preview-2024-10-01"`128129 - `"gpt-4o-audio-preview-2024-12-17"`130131 - `"gpt-4o-audio-preview-2025-06-03"`132133 - `"gpt-4o-mini-audio-preview"`134135 - `"gpt-4o-mini-audio-preview-2024-12-17"`136137 - `"gpt-4o-search-preview"`138139 - `"gpt-4o-mini-search-preview"`140141 - `"gpt-4o-search-preview-2025-03-11"`142143 - `"gpt-4o-mini-search-preview-2025-03-11"`144145 - `"chatgpt-4o-latest"`146147 - `"codex-mini-latest"`148149 - `"gpt-4o-mini"`150151 - `"gpt-4o-mini-2024-07-18"`152153 - `"gpt-4-turbo"`154155 - `"gpt-4-turbo-2024-04-09"`156157 - `"gpt-4-0125-preview"`158159 - `"gpt-4-turbo-preview"`160161 - `"gpt-4-1106-preview"`162163 - `"gpt-4-vision-preview"`164165 - `"gpt-4"`166167 - `"gpt-4-0314"`168169 - `"gpt-4-0613"`170171 - `"gpt-4-32k"`172173 - `"gpt-4-32k-0314"`174175 - `"gpt-4-32k-0613"`176177 - `"gpt-3.5-turbo"`178179 - `"gpt-3.5-turbo-16k"`180181 - `"gpt-3.5-turbo-0301"`182183 - `"gpt-3.5-turbo-0613"`184185 - `"gpt-3.5-turbo-1106"`186187 - `"gpt-3.5-turbo-0125"`188189 - `"gpt-3.5-turbo-16k-0613"`190191 - `"o1-pro"`192193 - `"o1-pro-2025-03-19"`194195 - `"o3-pro"`196197 - `"o3-pro-2025-06-10"`198199 - `"o3-deep-research"`200201 - `"o3-deep-research-2025-06-26"`202203 - `"o4-mini-deep-research"`204205 - `"o4-mini-deep-research-2025-06-26"`206207 - `"computer-use-preview"`208209 - `"computer-use-preview-2025-03-11"`210211 - `"gpt-5.5-pro"`212213 - `"gpt-5.5-pro-2026-04-23"`214215 - `"gpt-5-codex"`216217 - `"gpt-5-pro"`218219 - `"gpt-5-pro-2025-10-06"`220221 - `"gpt-5.1-codex-max"`222223 - `"gpt-daybreak-blue-latest"`224225 - `"gpt-daybreak-red-latest"`226227 - `"gpt-5.6-cyber"`228229 - `string`230231- `input: optional string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more or null`232233 Text, image, or file inputs to the model, used to generate a response234235 - `string`236237 A text input to the model, equivalent to a text input with the `user` role.238239 - `array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more`240241 A list of one or many input items to the model, containing different content types.242243 - `EasyInputMessage object { content, role, phase, type }`244245 A message input to the model with a role indicating instruction following246 hierarchy. Instructions given with the `developer` or `system` role take247 precedence over instructions given with the `user` role. Messages with the248 `assistant` role are presumed to have been generated by the model in previous249 interactions.250251 - `content: string or ResponseInputMessageContentList`252253 Text, image, or audio input to the model, used to generate a response.254 Can also contain previous assistant responses.255256 - `TextInput = string`257258 A text input to the model.259260 - `ResponseInputMessageContentList = array of ResponseInputContent`261262 A list of one or many input items to the model, containing different content263 types.264265 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`266267 A text input to the model.268269 - `text: string`270271 The text input to the model.272273 - `type: "input_text"`274275 The type of the input item. Always `input_text`.276277 - `"input_text"`278279 - `prompt_cache_breakpoint: optional object { mode }`280281 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.282283 - `mode: "explicit"`284285 The breakpoint mode. Always `explicit`.286287 - `"explicit"`288289 - `ResponseInputImage object { detail, type, file_id, 2 more }`290291 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).292293 - `detail: ImageDetail`294295 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.296297 - `"low"`298299 - `"high"`300301 - `"auto"`302303 - `"original"`304305 - `type: "input_image"`306307 The type of the input item. Always `input_image`.308309 - `"input_image"`310311 - `file_id: optional string or null`312313 The ID of the file to be sent to the model.314315 - `image_url: optional string or null`316317 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.318319 - `prompt_cache_breakpoint: optional object { mode }`320321 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.322323 - `mode: "explicit"`324325 The breakpoint mode. Always `explicit`.326327 - `"explicit"`328329 - `ResponseInputFile object { type, detail, file_data, 4 more }`330331 A file input to the model.332333 - `type: "input_file"`334335 The type of the input item. Always `input_file`.336337 - `"input_file"`338339 - `detail: optional "auto" or "low" or "high"`340341 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`.342343 - `"auto"`344345 - `"low"`346347 - `"high"`348349 - `file_data: optional string`350351 The content of the file to be sent to the model.352353 - `file_id: optional string or null`354355 The ID of the file to be sent to the model.356357 - `file_url: optional string`358359 The URL of the file to be sent to the model.360361 - `filename: optional string`362363 The name of the file to be sent to the model.364365 - `prompt_cache_breakpoint: optional object { mode }`366367 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.368369 - `mode: "explicit"`370371 The breakpoint mode. Always `explicit`.372373 - `"explicit"`374375 - `role: "user" or "assistant" or "system" or "developer"`376377 The role of the message input. One of `user`, `assistant`, `system`, or378 `developer`.379380 - `"user"`381382 - `"assistant"`383384 - `"system"`385386 - `"developer"`387388 - `phase: optional "commentary" or "final_answer" or null`389390 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).391 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend392 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.393394 - `"commentary"`395396 - `"final_answer"`397398 - `type: optional "message"`399400 The type of the message input. Always `message`.401402 - `"message"`403404 - `Message object { content, role, status, type }`405406 A message input to the model with a role indicating instruction following407 hierarchy. Instructions given with the `developer` or `system` role take408 precedence over instructions given with the `user` role.409410 - `content: ResponseInputMessageContentList`411412 A list of one or many input items to the model, containing different content413 types.414415 - `role: "user" or "system" or "developer"`416417 The role of the message input. One of `user`, `system`, or `developer`.418419 - `"user"`420421 - `"system"`422423 - `"developer"`424425 - `status: optional "in_progress" or "completed" or "incomplete"`426427 The status of item. One of `in_progress`, `completed`, or428 `incomplete`. Populated when items are returned via API.429430 - `"in_progress"`431432 - `"completed"`433434 - `"incomplete"`435436 - `type: optional "message"`437438 The type of the message input. Always set to `message`.439440 - `"message"`441442 - `ResponseOutputMessage object { id, content, role, 3 more }`443444 An output message from the model.445446 - `id: string`447448 The unique ID of the output message.449450 - `content: array of ResponseOutputText or ResponseOutputRefusal`451452 The content of the output message.453454 - `ResponseOutputText object { annotations, logprobs, text, type }`455456 A text output from the model.457458 - `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 }`459460 The annotations of the text output.461462 - `FileCitation object { file_id, filename, index, type }`463464 A citation to a file.465466 - `file_id: string`467468 The ID of the file.469470 - `filename: string`471472 The filename of the file cited.473474 - `index: number`475476 The index of the file in the list of files.477478 - `type: "file_citation"`479480 The type of the file citation. Always `file_citation`.481482 - `"file_citation"`483484 - `URLCitation object { end_index, start_index, title, 2 more }`485486 A citation for a web resource used to generate a model response.487488 - `end_index: number`489490 The index of the last character of the URL citation in the message.491492 - `start_index: number`493494 The index of the first character of the URL citation in the message.495496 - `title: string`497498 The title of the web resource.499500 - `type: "url_citation"`501502 The type of the URL citation. Always `url_citation`.503504 - `"url_citation"`505506 - `url: string`507508 The URL of the web resource.509510 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`511512 A citation for a container file used to generate a model response.513514 - `container_id: string`515516 The ID of the container file.517518 - `end_index: number`519520 The index of the last character of the container file citation in the message.521522 - `file_id: string`523524 The ID of the file.525526 - `filename: string`527528 The filename of the container file cited.529530 - `start_index: number`531532 The index of the first character of the container file citation in the message.533534 - `type: "container_file_citation"`535536 The type of the container file citation. Always `container_file_citation`.537538 - `"container_file_citation"`539540 - `FilePath object { file_id, index, type }`541542 A path to a file.543544 - `file_id: string`545546 The ID of the file.547548 - `index: number`549550 The index of the file in the list of files.551552 - `type: "file_path"`553554 The type of the file path. Always `file_path`.555556 - `"file_path"`557558 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`559560 - `token: string`561562 - `bytes: array of number`563564 - `logprob: number`565566 - `top_logprobs: array of object { token, bytes, logprob }`567568 - `token: string`569570 - `bytes: array of number`571572 - `logprob: number`573574 - `text: string`575576 The text output from the model.577578 - `type: "output_text"`579580 The type of the output text. Always `output_text`.581582 - `"output_text"`583584 - `ResponseOutputRefusal object { refusal, type }`585586 A refusal from the model.587588 - `refusal: string`589590 The refusal explanation from the model.591592 - `type: "refusal"`593594 The type of the refusal. Always `refusal`.595596 - `"refusal"`597598 - `role: "assistant"`599600 The role of the output message. Always `assistant`.601602 - `"assistant"`603604 - `status: "in_progress" or "completed" or "incomplete"`605606 The status of the message input. One of `in_progress`, `completed`, or607 `incomplete`. Populated when input items are returned via API.608609 - `"in_progress"`610611 - `"completed"`612613 - `"incomplete"`614615 - `type: "message"`616617 The type of the output message. Always `message`.618619 - `"message"`620621 - `phase: optional "commentary" or "final_answer" or null`622623 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).624 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend625 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.626627 - `"commentary"`628629 - `"final_answer"`630631 - `FileSearchCall object { id, queries, status, 2 more }`632633 The results of a file search tool call. See the634 [file search guide](/api/docs/guides/tools-file-search) for more information.635636 - `id: string`637638 The unique ID of the file search tool call.639640 - `queries: array of string`641642 The queries used to search for files.643644 - `status: "in_progress" or "searching" or "completed" or 2 more`645646 The status of the file search tool call. One of `in_progress`,647 `searching`, `incomplete` or `failed`,648649 - `"in_progress"`650651 - `"searching"`652653 - `"completed"`654655 - `"incomplete"`656657 - `"failed"`658659 - `type: "file_search_call"`660661 The type of the file search tool call. Always `file_search_call`.662663 - `"file_search_call"`664665 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`666667 The results of the file search tool call.668669 - `attributes: optional map[string or number or boolean] or null`670671 Set of 16 key-value pairs that can be attached to an object. This can be672 useful for storing additional information about the object in a structured673 format, and querying for objects via API or the dashboard. Keys are strings674 with a maximum length of 64 characters. Values are strings with a maximum675 length of 512 characters, booleans, or numbers.676677 - `string`678679 - `number`680681 - `boolean`682683 - `file_id: optional string`684685 The unique ID of the file.686687 - `filename: optional string`688689 The name of the file.690691 - `score: optional number`692693 The relevance score of the file - a value between 0 and 1.694695 - `text: optional string`696697 The text that was retrieved from the file.698699 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`700701 A tool call to a computer use tool. See the702 [computer use guide](/api/docs/guides/tools-computer-use) for more information.703704 - `id: string`705706 The unique ID of the computer call.707708 - `call_id: string`709710 An identifier used when responding to the tool call with output.711712 - `pending_safety_checks: array of object { id, code, message }`713714 The pending safety checks for the computer call.715716 - `id: string`717718 The ID of the pending safety check.719720 - `code: optional string or null`721722 The type of the pending safety check.723724 - `message: optional string or null`725726 Details about the pending safety check.727728 - `status: "in_progress" or "completed" or "incomplete"`729730 The status of the item. One of `in_progress`, `completed`, or731 `incomplete`. Populated when items are returned via API.732733 - `"in_progress"`734735 - `"completed"`736737 - `"incomplete"`738739 - `type: "computer_call"`740741 The type of the computer call. Always `computer_call`.742743 - `"computer_call"`744745 - `action: optional ComputerAction`746747 A click action.748749 - `Click object { button, type, x, 2 more }`750751 A click action.752753 - `button: "left" or "right" or "wheel" or 2 more`754755 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.756757 - `"left"`758759 - `"right"`760761 - `"wheel"`762763 - `"back"`764765 - `"forward"`766767 - `type: "click"`768769 Specifies the event type. For a click action, this property is always `click`.770771 - `"click"`772773 - `x: number`774775 The x-coordinate where the click occurred.776777 - `y: number`778779 The y-coordinate where the click occurred.780781 - `keys: optional array of string or null`782783 The keys being held while clicking.784785 - `DoubleClick object { keys, type, x, y }`786787 A double click action.788789 - `keys: array of string or null`790791 The keys being held while double-clicking.792793 - `type: "double_click"`794795 Specifies the event type. For a double click action, this property is always set to `double_click`.796797 - `"double_click"`798799 - `x: number`800801 The x-coordinate where the double click occurred.802803 - `y: number`804805 The y-coordinate where the double click occurred.806807 - `Drag object { path, type, keys }`808809 A drag action.810811 - `path: array of object { x, y }`812813 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg814815 ```816 [817 { x: 100, y: 200 },818 { x: 200, y: 300 }819 ]820 ```821822 - `x: number`823824 The x-coordinate.825826 - `y: number`827828 The y-coordinate.829830 - `type: "drag"`831832 Specifies the event type. For a drag action, this property is always set to `drag`.833834 - `"drag"`835836 - `keys: optional array of string or null`837838 The keys being held while dragging the mouse.839840 - `Keypress object { keys, type }`841842 A collection of keypresses the model would like to perform.843844 - `keys: array of string`845846 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.847848 - `type: "keypress"`849850 Specifies the event type. For a keypress action, this property is always set to `keypress`.851852 - `"keypress"`853854 - `Move object { type, x, y, keys }`855856 A mouse move action.857858 - `type: "move"`859860 Specifies the event type. For a move action, this property is always set to `move`.861862 - `"move"`863864 - `x: number`865866 The x-coordinate to move to.867868 - `y: number`869870 The y-coordinate to move to.871872 - `keys: optional array of string or null`873874 The keys being held while moving the mouse.875876 - `Screenshot object { type }`877878 A screenshot action.879880 - `type: "screenshot"`881882 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.883884 - `"screenshot"`885886 - `Scroll object { scroll_x, scroll_y, type, 3 more }`887888 A scroll action.889890 - `scroll_x: number`891892 The horizontal scroll distance.893894 - `scroll_y: number`895896 The vertical scroll distance.897898 - `type: "scroll"`899900 Specifies the event type. For a scroll action, this property is always set to `scroll`.901902 - `"scroll"`903904 - `x: number`905906 The x-coordinate where the scroll occurred.907908 - `y: number`909910 The y-coordinate where the scroll occurred.911912 - `keys: optional array of string or null`913914 The keys being held while scrolling.915916 - `Type object { text, type }`917918 An action to type in text.919920 - `text: string`921922 The text to type.923924 - `type: "type"`925926 Specifies the event type. For a type action, this property is always set to `type`.927928 - `"type"`929930 - `Wait object { type }`931932 A wait action.933934 - `type: "wait"`935936 Specifies the event type. For a wait action, this property is always set to `wait`.937938 - `"wait"`939940 - `actions: optional ComputerActionList`941942 Flattened batched actions for `computer_use`. Each action includes an943 `type` discriminator and action-specific fields.944945 - `Click object { button, type, x, 2 more }`946947 A click action.948949 - `DoubleClick object { keys, type, x, y }`950951 A double click action.952953 - `Drag object { path, type, keys }`954955 A drag action.956957 - `Keypress object { keys, type }`958959 A collection of keypresses the model would like to perform.960961 - `Move object { type, x, y, keys }`962963 A mouse move action.964965 - `Screenshot object { type }`966967 A screenshot action.968969 - `Scroll object { scroll_x, scroll_y, type, 3 more }`970971 A scroll action.972973 - `Type object { text, type }`974975 An action to type in text.976977 - `Wait object { type }`978979 A wait action.980981 - `ComputerCallOutput object { call_id, output, type, 3 more }`982983 The output of a computer tool call.984985 - `call_id: string`986987 The ID of the computer tool call that produced the output.988989 - `output: ResponseComputerToolCallOutputScreenshot`990991 A computer screenshot image used with the computer use tool.992993 - `type: "computer_screenshot"`994995 Specifies the event type. For a computer screenshot, this property is996 always set to `computer_screenshot`.997998 - `"computer_screenshot"`9991000 - `file_id: optional string`10011002 The identifier of an uploaded file that contains the screenshot.10031004 - `image_url: optional string`10051006 The URL of the screenshot image.10071008 - `type: "computer_call_output"`10091010 The type of the computer tool call output. Always `computer_call_output`.10111012 - `"computer_call_output"`10131014 - `id: optional string or null`10151016 The ID of the computer tool call output.10171018 - `acknowledged_safety_checks: optional array of object { id, code, message } or null`10191020 The safety checks reported by the API that have been acknowledged by the developer.10211022 - `id: string`10231024 The ID of the pending safety check.10251026 - `code: optional string or null`10271028 The type of the pending safety check.10291030 - `message: optional string or null`10311032 Details about the pending safety check.10331034 - `status: optional "in_progress" or "completed" or "incomplete" or null`10351036 The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.10371038 - `"in_progress"`10391040 - `"completed"`10411042 - `"incomplete"`10431044 - `WebSearchCall object { id, action, status, type }`10451046 The results of a web search tool call. See the1047 [web search guide](/api/docs/guides/tools-web-search) for more information.10481049 - `id: string`10501051 The unique ID of the web search tool call.10521053 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`10541055 An object describing the specific action taken in this web search call.1056 Includes details on how the model used the web (search, open_page, find_in_page).10571058 - `Search object { type, queries, query, sources }`10591060 Action type "search" - Performs a web search query.10611062 - `type: "search"`10631064 The action type.10651066 - `"search"`10671068 - `queries: optional array of string`10691070 The search queries.10711072 - `query: optional string`10731074 The search query.10751076 - `sources: optional array of object { type, url }`10771078 The sources used in the search.10791080 - `type: "url"`10811082 The type of source. Always `url`.10831084 - `"url"`10851086 - `url: string`10871088 The URL of the source.10891090 - `OpenPage object { type, url }`10911092 Action type "open_page" - Opens a specific URL from search results.10931094 - `type: "open_page"`10951096 The action type.10971098 - `"open_page"`10991100 - `url: optional string or null`11011102 The URL opened by the model.11031104 - `FindInPage object { pattern, type, url }`11051106 Action type "find_in_page": Searches for a pattern within a loaded page.11071108 - `pattern: string`11091110 The pattern or text to search for within the page.11111112 - `type: "find_in_page"`11131114 The action type.11151116 - `"find_in_page"`11171118 - `url: string`11191120 The URL of the page searched for the pattern.11211122 - `status: "in_progress" or "searching" or "completed" or 2 more`11231124 The status of the web search tool call.11251126 - `"in_progress"`11271128 - `"searching"`11291130 - `"completed"`11311132 - `"failed"`11331134 - `"incomplete"`11351136 - `type: "web_search_call"`11371138 The type of the web search tool call. Always `web_search_call`.11391140 - `"web_search_call"`11411142 - `FunctionCall object { arguments, call_id, name, 6 more }`11431144 A tool call to run a function. See the1145 [function calling guide](/api/docs/guides/function-calling) for more information.11461147 - `arguments: string`11481149 A JSON string of the arguments to pass to the function.11501151 - `call_id: string`11521153 The unique ID of the function tool call generated by the model.11541155 - `name: string`11561157 The name of the function to run.11581159 - `type: "function_call"`11601161 The type of the function tool call. Always `function_call`.11621163 - `"function_call"`11641165 - `id: optional string`11661167 The unique ID of the function tool call.11681169 - `async: optional boolean`11701171 Whether the function tool call runs asynchronously.11721173 - `caller: optional object { type } or object { caller_id, type } or null`11741175 The execution context that produced this tool call.11761177 - `Direct object { type }`11781179 - `type: "direct"`11801181 - `"direct"`11821183 - `Program object { caller_id, type }`11841185 - `caller_id: string`11861187 The call ID of the program item that produced this tool call.11881189 - `type: "program"`11901191 - `"program"`11921193 - `namespace: optional string`11941195 The namespace of the function to run.11961197 - `status: optional "in_progress" or "completed" or "incomplete"`11981199 The status of the item. One of `in_progress`, `completed`, or1200 `incomplete`. Populated when items are returned via API.12011202 - `"in_progress"`12031204 - `"completed"`12051206 - `"incomplete"`12071208 - `FunctionCallOutput object { output, type, id, 5 more }`12091210 The output of a function tool call.12111212 - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`12131214 Text, image, or file output of the function tool call.12151216 - `string`12171218 A JSON string of the output of the function tool call.12191220 - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`12211222 An array of content outputs (text, image, file) for the function tool call.12231224 - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`12251226 A text input to the model.12271228 - `text: string`12291230 The text input to the model.12311232 - `type: "input_text"`12331234 The type of the input item. Always `input_text`.12351236 - `"input_text"`12371238 - `prompt_cache_breakpoint: optional object { mode } or null`12391240 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.12411242 - `mode: "explicit"`12431244 The breakpoint mode. Always `explicit`.12451246 - `"explicit"`12471248 - `ResponseInputImageContent object { type, detail, file_id, 2 more }`12491250 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)12511252 - `type: "input_image"`12531254 The type of the input item. Always `input_image`.12551256 - `"input_image"`12571258 - `detail: optional ImageDetail or null`12591260 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.12611262 - `file_id: optional string or null`12631264 The ID of the file to be sent to the model.12651266 - `image_url: optional string or null`12671268 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.12691270 - `prompt_cache_breakpoint: optional object { mode } or null`12711272 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.12731274 - `mode: "explicit"`12751276 The breakpoint mode. Always `explicit`.12771278 - `"explicit"`12791280 - `ResponseInputFileContent object { type, detail, file_data, 4 more }`12811282 A file input to the model.12831284 - `type: "input_file"`12851286 The type of the input item. Always `input_file`.12871288 - `"input_file"`12891290 - `detail: optional "auto" or "low" or "high"`12911292 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`.12931294 - `"auto"`12951296 - `"low"`12971298 - `"high"`12991300 - `file_data: optional string or null`13011302 The base64-encoded data of the file to be sent to the model.13031304 - `file_id: optional string or null`13051306 The ID of the file to be sent to the model.13071308 - `file_url: optional string or null`13091310 The URL of the file to be sent to the model.13111312 - `filename: optional string or null`13131314 The name of the file to be sent to the model.13151316 - `prompt_cache_breakpoint: optional object { mode } or null`13171318 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.13191320 - `mode: "explicit"`13211322 The breakpoint mode. Always `explicit`.13231324 - `"explicit"`13251326 - `type: "function_call_output"`13271328 The type of the function tool call output. Always `function_call_output`.13291330 - `"function_call_output"`13311332 - `id: optional string or null`13331334 The unique ID of the function tool call output. Populated when this item is returned via API.13351336 - `call_id: optional string or null`13371338 The unique ID of the function tool call generated by the model.13391340 - `caller: optional object { type } or object { caller_id, type } or null`13411342 The execution context that produced this tool call.13431344 - `Direct object { type }`13451346 - `type: "direct"`13471348 The caller type. Always `direct`.13491350 - `"direct"`13511352 - `Program object { caller_id, type }`13531354 - `caller_id: string`13551356 The call ID of the program item that produced this tool call.13571358 - `type: "program"`13591360 The caller type. Always `program`.13611362 - `"program"`13631364 - `name: optional string or null`13651366 The name of the tool that produced the output.13671368 - `namespace: optional string or null`13691370 The namespace of the tool that produced the output.13711372 - `status: optional "in_progress" or "completed" or "incomplete" or null`13731374 The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.13751376 - `"in_progress"`13771378 - `"completed"`13791380 - `"incomplete"`13811382 - `ToolSearchCall object { arguments, type, id, 3 more }`13831384 - `arguments: unknown`13851386 The arguments supplied to the tool search call.13871388 - `type: "tool_search_call"`13891390 The item type. Always `tool_search_call`.13911392 - `"tool_search_call"`13931394 - `id: optional string or null`13951396 The unique ID of this tool search call.13971398 - `call_id: optional string or null`13991400 The unique ID of the tool search call generated by the model.14011402 - `execution: optional "server" or "client"`14031404 Whether tool search was executed by the server or by the client.14051406 - `"server"`14071408 - `"client"`14091410 - `status: optional "in_progress" or "completed" or "incomplete" or null`14111412 The status of the tool search call.14131414 - `"in_progress"`14151416 - `"completed"`14171418 - `"incomplete"`14191420 - `ToolSearchOutput object { tools, type, id, 3 more }`14211422 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`14231424 The loaded tool definitions returned by the tool search output.14251426 - `Function object { name, parameters, strict, 6 more }`14271428 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).14291430 - `name: string`14311432 The name of the function to call.14331434 - `parameters: map[unknown] or null`14351436 A JSON schema object describing the parameters of the function.14371438 - `strict: boolean or null`14391440 Whether strict parameter validation is enforced for this function tool.14411442 - `type: "function"`14431444 The type of the function tool. Always `function`.14451446 - `"function"`14471448 - `allowed_callers: optional array of "direct" or "programmatic" or null`14491450 The tool invocation context(s).14511452 - `"direct"`14531454 - `"programmatic"`14551456 - `async: optional boolean`14571458 - `defer_loading: optional boolean`14591460 Whether this function is deferred and loaded via tool search.14611462 - `description: optional string or null`14631464 A description of the function. Used by the model to determine whether or not to call the function.14651466 - `output_schema: optional map[unknown] or null`14671468 A JSON schema object describing the JSON value encoded in string outputs for this function.14691470 - `FileSearch object { type, vector_store_ids, filters, 2 more }`14711472 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).14731474 - `type: "file_search"`14751476 The type of the file search tool. Always `file_search`.14771478 - `"file_search"`14791480 - `vector_store_ids: array of string`14811482 The IDs of the vector stores to search.14831484 - `filters: optional ComparisonFilter or CompoundFilter or null`14851486 A filter to apply.14871488 - `ComparisonFilter object { key, type, value }`14891490 A filter used to compare a specified attribute key to a given value using a defined comparison operation.14911492 - `key: string`14931494 The key to compare against the value.14951496 - `type: "eq" or "ne" or "gt" or 5 more`14971498 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.14991500 - `eq`: equals1501 - `ne`: not equal1502 - `gt`: greater than1503 - `gte`: greater than or equal1504 - `lt`: less than1505 - `lte`: less than or equal1506 - `in`: in1507 - `nin`: not in15081509 - `"eq"`15101511 - `"ne"`15121513 - `"gt"`15141515 - `"gte"`15161517 - `"lt"`15181519 - `"lte"`15201521 - `"in"`15221523 - `"nin"`15241525 - `value: string or number or boolean or array of string or number`15261527 The value to compare against the attribute key; supports string, number, or boolean types.15281529 - `string`15301531 - `number`15321533 - `boolean`15341535 - `array of string or number`15361537 - `string`15381539 - `number`15401541 - `CompoundFilter object { filters, type }`15421543 Combine multiple filters using `and` or `or`.15441545 - `filters: array of ComparisonFilter or unknown`15461547 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.15481549 - `ComparisonFilter object { key, type, value }`15501551 A filter used to compare a specified attribute key to a given value using a defined comparison operation.15521553 - `unknown`15541555 - `type: "and" or "or"`15561557 Type of operation: `and` or `or`.15581559 - `"and"`15601561 - `"or"`15621563 - `max_num_results: optional number`15641565 The maximum number of results to return. This number should be between 1 and 50 inclusive.15661567 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`15681569 Ranking options for search.15701571 - `hybrid_search: optional object { embedding_weight, text_weight }`15721573 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.15741575 - `embedding_weight: number`15761577 The weight of the embedding in the reciprocal ranking fusion.15781579 - `text_weight: number`15801581 The weight of the text in the reciprocal ranking fusion.15821583 - `ranker: optional "auto" or "default-2024-11-15"`15841585 The ranker to use for the file search.15861587 - `"auto"`15881589 - `"default-2024-11-15"`15901591 - `score_threshold: optional number`15921593 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.15941595 - `Computer object { type }`15961597 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).15981599 - `type: "computer"`16001601 The type of the computer tool. Always `computer`.16021603 - `"computer"`16041605 - `ComputerUsePreview object { display_height, display_width, environment, type }`16061607 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).16081609 - `display_height: number`16101611 The height of the computer display.16121613 - `display_width: number`16141615 The width of the computer display.16161617 - `environment: "windows" or "mac" or "linux" or 2 more`16181619 The type of computer environment to control.16201621 - `"windows"`16221623 - `"mac"`16241625 - `"linux"`16261627 - `"ubuntu"`16281629 - `"browser"`16301631 - `type: "computer_use_preview"`16321633 The type of the computer use tool. Always `computer_use_preview`.16341635 - `"computer_use_preview"`16361637 - `WebSearch object { type, external_web_access, filters, 2 more }`16381639 Search the Internet for sources related to the prompt. Learn more about the1640 [web search tool](/api/docs/guides/tools-web-search).16411642 - `type: "web_search" or "web_search_2025_08_26"`16431644 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.16451646 - `"web_search"`16471648 - `"web_search_2025_08_26"`16491650 - `external_web_access: optional boolean`16511652 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.16531654 - `filters: optional object { allowed_domains } or null`16551656 Filters for the search.16571658 - `allowed_domains: optional array of string or null`16591660 Allowed domains for the search. If not provided, all domains are allowed.1661 Subdomains of the provided domains are allowed as well.16621663 Example: `["pubmed.ncbi.nlm.nih.gov"]`16641665 - `search_context_size: optional "low" or "medium" or "high"`16661667 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.16681669 - `"low"`16701671 - `"medium"`16721673 - `"high"`16741675 - `user_location: optional object { city, country, region, 2 more } or null`16761677 The approximate location of the user.16781679 - `city: optional string or null`16801681 Free text input for the city of the user, e.g. `San Francisco`.16821683 - `country: optional string or null`16841685 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.16861687 - `region: optional string or null`16881689 Free text input for the region of the user, e.g. `California`.16901691 - `timezone: optional string or null`16921693 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.16941695 - `type: optional "approximate"`16961697 The type of location approximation. Always `approximate`.16981699 - `"approximate"`17001701 - `Mcp object { server_label, type, allowed_callers, 9 more }`17021703 Give the model access to additional tools via remote Model Context Protocol1704 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).17051706 - `server_label: string`17071708 A label for this MCP server, used to identify it in tool calls.17091710 - `type: "mcp"`17111712 The type of the MCP tool. Always `mcp`.17131714 - `"mcp"`17151716 - `allowed_callers: optional array of "direct" or "programmatic" or null`17171718 The tool invocation context(s).17191720 - `"direct"`17211722 - `"programmatic"`17231724 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`17251726 List of allowed tool names or a filter object.17271728 - `McpAllowedTools = array of string`17291730 A string array of allowed tool names17311732 - `McpToolFilter object { read_only, tool_names }`17331734 A filter object to specify which tools are allowed.17351736 - `read_only: optional boolean`17371738 Indicates whether or not a tool modifies data or is read-only. If an1739 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1740 it will match this filter.17411742 - `tool_names: optional array of string`17431744 List of allowed tool names.17451746 - `authorization: optional string`17471748 An OAuth access token that can be used with a remote MCP server, either1749 with a custom MCP server URL or a service connector. Your application1750 must handle the OAuth authorization flow and provide the token here.17511752 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`17531754 Identifier for service connectors, like those available in ChatGPT. One of1755 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more1756 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).17571758 This field is deprecated for models released after September 1, 2026.1759 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to1760 connect through a Secure MCP Tunnel.17611762 Currently supported `connector_id` values are:17631764 - Dropbox: `connector_dropbox`1765 - Gmail: `connector_gmail`1766 - Google Calendar: `connector_googlecalendar`1767 - Google Drive: `connector_googledrive`1768 - Microsoft Teams: `connector_microsoftteams`1769 - Outlook Calendar: `connector_outlookcalendar`1770 - Outlook Email: `connector_outlookemail`1771 - SharePoint: `connector_sharepoint`17721773 - `"connector_dropbox"`17741775 - `"connector_gmail"`17761777 - `"connector_googlecalendar"`17781779 - `"connector_googledrive"`17801781 - `"connector_microsoftteams"`17821783 - `"connector_outlookcalendar"`17841785 - `"connector_outlookemail"`17861787 - `"connector_sharepoint"`17881789 - `defer_loading: optional boolean`17901791 Whether this MCP tool is deferred and discovered via tool search.17921793 - `headers: optional map[string] or null`17941795 Optional HTTP headers to send to the MCP server. Use for authentication1796 or other purposes.17971798 - `require_approval: optional object { always, never } or "always" or "never" or null`17991800 Specify which of the MCP server's tools require approval.18011802 - `McpToolApprovalFilter object { always, never }`18031804 Specify which of the MCP server's tools require approval. Can be1805 `always`, `never`, or a filter object associated with tools1806 that require approval.18071808 - `always: optional object { read_only, tool_names }`18091810 A filter object to specify which tools are allowed.18111812 - `read_only: optional boolean`18131814 Indicates whether or not a tool modifies data or is read-only. If an1815 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1816 it will match this filter.18171818 - `tool_names: optional array of string`18191820 List of allowed tool names.18211822 - `never: optional object { read_only, tool_names }`18231824 A filter object to specify which tools are allowed.18251826 - `read_only: optional boolean`18271828 Indicates whether or not a tool modifies data or is read-only. If an1829 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1830 it will match this filter.18311832 - `tool_names: optional array of string`18331834 List of allowed tool names.18351836 - `McpToolApprovalSetting = "always" or "never"`18371838 Specify a single approval policy for all tools. One of `always` or1839 `never`. When set to `always`, all tools will require approval. When1840 set to `never`, all tools will not require approval.18411842 - `"always"`18431844 - `"never"`18451846 - `server_description: optional string`18471848 Optional description of the MCP server, used to provide more context.18491850 - `server_url: optional string`18511852 The URL for the MCP server. One of `server_url`, `connector_id`, or1853 `tunnel_id` must be provided.18541855 - `tunnel_id: optional string`18561857 The Secure MCP Tunnel ID to use instead of a direct server URL. One of1858 `server_url`, `connector_id`, or `tunnel_id` must be provided.18591860 - `CodeInterpreter object { container, type, allowed_callers }`18611862 A tool that runs Python code to help generate a response to a prompt.18631864 - `container: string or object { type, file_ids, memory_limit, network_policy }`18651866 The code interpreter container. Can be a container ID or an object that1867 specifies uploaded file IDs to make available to your code, along with an1868 optional `memory_limit` setting.18691870 - `string`18711872 The container ID.18731874 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`18751876 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.18771878 - `type: "auto"`18791880 Always `auto`.18811882 - `"auto"`18831884 - `file_ids: optional array of string`18851886 An optional list of uploaded files to make available to your code.18871888 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`18891890 The memory limit for the code interpreter container.18911892 - `"1g"`18931894 - `"4g"`18951896 - `"16g"`18971898 - `"64g"`18991900 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`19011902 Network access policy for the container.19031904 - `ContainerNetworkPolicyDisabled object { type }`19051906 - `type: "disabled"`19071908 Disable outbound network access. Always `disabled`.19091910 - `"disabled"`19111912 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`19131914 - `allowed_domains: array of string`19151916 A list of allowed domains when type is `allowlist`.19171918 - `type: "allowlist"`19191920 Allow outbound network access only to specified domains. Always `allowlist`.19211922 - `"allowlist"`19231924 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`19251926 Optional domain-scoped secrets for allowlisted domains.19271928 - `domain: string`19291930 The domain associated with the secret.19311932 - `name: string`19331934 The name of the secret to inject for the domain.19351936 - `value: string`19371938 The secret value to inject for the domain.19391940 - `type: "code_interpreter"`19411942 The type of the code interpreter tool. Always `code_interpreter`.19431944 - `"code_interpreter"`19451946 - `allowed_callers: optional array of "direct" or "programmatic" or null`19471948 The tool invocation context(s).19491950 - `"direct"`19511952 - `"programmatic"`19531954 - `ProgrammaticToolCalling object { type }`19551956 - `type: "programmatic_tool_calling"`19571958 The type of the tool. Always `programmatic_tool_calling`.19591960 - `"programmatic_tool_calling"`19611962 - `ImageGeneration object { type, action, background, 9 more }`19631964 A tool that generates images using the GPT image models.19651966 - `type: "image_generation"`19671968 The type of the image generation tool. Always `image_generation`.19691970 - `"image_generation"`19711972 - `action: optional "generate" or "edit" or "auto"`19731974 Whether to generate a new image or edit an existing image. Default: `auto`.19751976 - `"generate"`19771978 - `"edit"`19791980 - `"auto"`19811982 - `background: optional "transparent" or "opaque" or "auto"`19831984 Set the background of the generated image. One of `transparent`, `opaque`,1985 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including1986 their `2026-09-08` snapshots, support `opaque` and `transparent`1987 backgrounds. Transparent backgrounds are available for supported GPT Image1988 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in1989 preview. When using `transparent`, set the output format to `png` or `webp`.1990 Default: `auto`.19911992 - `"transparent"`19931994 - `"opaque"`19951996 - `"auto"`19971998 - `input_fidelity: optional "high" or "low" or null`19992000 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`.20012002 - `"high"`20032004 - `"low"`20052006 - `input_image_mask: optional object { file_id, image_url }`20072008 Optional mask for inpainting. Contains `image_url`2009 (string, optional) and `file_id` (string, optional).20102011 - `file_id: optional string`20122013 File ID for the mask image.20142015 - `image_url: optional string`20162017 Base64-encoded mask image.20182019 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`20202021 The image generation model to use. One of `gpt-image-1`,2022 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2023 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2024 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2025 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2026 `gpt-image-1`.20272028 - `string`20292030 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`20312032 The image generation model to use. One of `gpt-image-1`,2033 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2034 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2035 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2036 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2037 `gpt-image-1`.20382039 - `"gpt-image-1"`20402041 - `"gpt-image-1-mini"`20422043 - `"gpt-image-1.5"`20442045 - `"gpt-image-2"`20462047 - `"gpt-image-2-2026-04-21"`20482049 - `"gpt-image-2.5-sunburst"`20502051 - `"gpt-image-2.5-sunburst-2026-09-08"`20522053 - `"gpt-image-2.5-flare"`20542055 - `"gpt-image-2.5-flare-2026-09-08"`20562057 - `moderation: optional "auto" or "low"`20582059 Moderation level for the generated image. Default: `auto`.20602061 - `"auto"`20622063 - `"low"`20642065 - `output_compression: optional number`20662067 Compression level for the output image. Default: 100.20682069 - `output_format: optional "png" or "webp" or "jpeg"`20702071 The output format of the generated image. One of `png`, `webp`, or2072 `jpeg`. Default: `png`.20732074 - `"png"`20752076 - `"webp"`20772078 - `"jpeg"`20792080 - `partial_images: optional number`20812082 Number of partial images to generate in streaming mode, from 0 (default value) to 3.20832084 - `quality: optional "low" or "medium" or "high" or 3 more`20852086 The quality of the generated image. The GPT image models support `low`,2087 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,2088 including their `2026-09-08` snapshots, also support `xhigh` and `max`.2089 Default: `auto`.20902091 - `"low"`20922093 - `"medium"`20942095 - `"high"`20962097 - `"xhigh"`20982099 - `"max"`21002101 - `"auto"`21022103 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`21042105 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`.21062107 - `string`21082109 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`21102111 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`.21122113 - `"1024x1024"`21142115 - `"1024x1536"`21162117 - `"1536x1024"`21182119 - `"auto"`21202121 - `LocalShell object { type }`21222123 A tool that allows the model to execute shell commands in a local environment.21242125 - `type: "local_shell"`21262127 The type of the local shell tool. Always `local_shell`.21282129 - `"local_shell"`21302131 - `Shell object { type, allowed_callers, environment }`21322133 A tool that allows the model to execute shell commands.21342135 - `type: "shell"`21362137 The type of the shell tool. Always `shell`.21382139 - `"shell"`21402141 - `allowed_callers: optional array of "direct" or "programmatic" or null`21422143 The tool invocation context(s).21442145 - `"direct"`21462147 - `"programmatic"`21482149 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`21502151 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`21522153 - `type: "container_auto"`21542155 Automatically creates a container for this request21562157 - `"container_auto"`21582159 - `file_ids: optional array of string`21602161 An optional list of uploaded files to make available to your code.21622163 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`21642165 The memory limit for the container.21662167 - `"1g"`21682169 - `"4g"`21702171 - `"16g"`21722173 - `"64g"`21742175 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`21762177 Network access policy for the container.21782179 - `ContainerNetworkPolicyDisabled object { type }`21802181 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`21822183 - `skills: optional array of SkillReference or InlineSkill`21842185 An optional list of skills referenced by id or inline data.21862187 - `SkillReference object { skill_id, type, version }`21882189 - `skill_id: string`21902191 The ID of the referenced skill.21922193 - `type: "skill_reference"`21942195 References a skill created with the /v1/skills endpoint.21962197 - `"skill_reference"`21982199 - `version: optional string`22002201 Optional skill version. Use a positive integer or 'latest'. Omit for default.22022203 - `InlineSkill object { description, name, source, type }`22042205 - `description: string`22062207 The description of the skill.22082209 - `name: string`22102211 The name of the skill.22122213 - `source: InlineSkillSource`22142215 Inline skill payload22162217 - `data: string`22182219 Base64-encoded skill zip bundle.22202221 - `media_type: "application/zip"`22222223 The media type of the inline skill payload. Must be `application/zip`.22242225 - `"application/zip"`22262227 - `type: "base64"`22282229 The type of the inline skill source. Must be `base64`.22302231 - `"base64"`22322233 - `type: "inline"`22342235 Defines an inline skill for this request.22362237 - `"inline"`22382239 - `LocalEnvironment object { type, skills }`22402241 - `type: "local"`22422243 Use a local computer environment.22442245 - `"local"`22462247 - `skills: optional array of LocalSkill`22482249 An optional list of skills.22502251 - `description: string`22522253 The description of the skill.22542255 - `name: string`22562257 The name of the skill.22582259 - `path: string`22602261 The path to the directory containing the skill.22622263 - `ContainerReference object { container_id, type }`22642265 - `container_id: string`22662267 The ID of the referenced container.22682269 - `type: "container_reference"`22702271 References a container created with the /v1/containers endpoint22722273 - `"container_reference"`22742275 - `Custom object { name, type, allowed_callers, 4 more }`22762277 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)22782279 - `name: string`22802281 The name of the custom tool, used to identify it in tool calls.22822283 - `type: "custom"`22842285 The type of the custom tool. Always `custom`.22862287 - `"custom"`22882289 - `allowed_callers: optional array of "direct" or "programmatic" or null`22902291 The tool invocation context(s).22922293 - `"direct"`22942295 - `"programmatic"`22962297 - `async: optional boolean`22982299 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.23002301 - `defer_loading: optional boolean`23022303 Whether this tool should be deferred and discovered via tool search.23042305 - `description: optional string`23062307 Optional description of the custom tool, used to provide more context.23082309 - `format: optional CustomToolInputFormat`23102311 The input format for the custom tool. Default is unconstrained text.23122313 - `Text object { type }`23142315 Unconstrained free-form text.23162317 - `type: "text"`23182319 Unconstrained text format. Always `text`.23202321 - `"text"`23222323 - `Grammar object { definition, syntax, type }`23242325 A grammar defined by the user.23262327 - `definition: string`23282329 The grammar definition.23302331 - `syntax: "lark" or "regex"`23322333 The syntax of the grammar definition. One of `lark` or `regex`.23342335 - `"lark"`23362337 - `"regex"`23382339 - `type: "grammar"`23402341 Grammar format. Always `grammar`.23422343 - `"grammar"`23442345 - `Namespace object { description, name, tools, type }`23462347 Groups function/custom tools under a shared namespace.23482349 - `description: string`23502351 A description of the namespace shown to the model.23522353 - `name: string`23542355 The namespace name used in tool calls (for example, `crm`).23562357 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`23582359 The function/custom tools available inside this namespace.23602361 - `Function object { name, type, allowed_callers, 6 more }`23622363 - `name: string`23642365 - `type: "function"`23662367 - `"function"`23682369 - `allowed_callers: optional array of "direct" or "programmatic" or null`23702371 The tool invocation context(s).23722373 - `"direct"`23742375 - `"programmatic"`23762377 - `async: optional boolean`23782379 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.23802381 - `defer_loading: optional boolean`23822383 Whether this function should be deferred and discovered via tool search.23842385 - `description: optional string or null`23862387 - `output_schema: optional map[unknown] or null`23882389 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.23902391 - `parameters: optional unknown or null`23922393 - `strict: optional boolean or null`23942395 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.23962397 - `Custom object { name, type, allowed_callers, 4 more }`23982399 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)24002401 - `name: string`24022403 The name of the custom tool, used to identify it in tool calls.24042405 - `type: "custom"`24062407 The type of the custom tool. Always `custom`.24082409 - `"custom"`24102411 - `allowed_callers: optional array of "direct" or "programmatic" or null`24122413 The tool invocation context(s).24142415 - `"direct"`24162417 - `"programmatic"`24182419 - `async: optional boolean`24202421 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.24222423 - `defer_loading: optional boolean`24242425 Whether this tool should be deferred and discovered via tool search.24262427 - `description: optional string`24282429 Optional description of the custom tool, used to provide more context.24302431 - `format: optional CustomToolInputFormat`24322433 The input format for the custom tool. Default is unconstrained text.24342435 - `type: "namespace"`24362437 The type of the tool. Always `namespace`.24382439 - `"namespace"`24402441 - `ToolSearch object { type, description, execution, parameters }`24422443 Hosted or BYOT tool search configuration for deferred tools.24442445 - `type: "tool_search"`24462447 The type of the tool. Always `tool_search`.24482449 - `"tool_search"`24502451 - `description: optional string or null`24522453 Description shown to the model for a client-executed tool search tool.24542455 - `execution: optional "server" or "client"`24562457 Whether tool search is executed by the server or by the client.24582459 - `"server"`24602461 - `"client"`24622463 - `parameters: optional unknown or null`24642465 Parameter schema for a client-executed tool search tool.24662467 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`24682469 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).24702471 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`24722473 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.24742475 - `"web_search_preview"`24762477 - `"web_search_preview_2025_03_11"`24782479 - `search_content_types: optional array of "text" or "image"`24802481 - `"text"`24822483 - `"image"`24842485 - `search_context_size: optional "low" or "medium" or "high"`24862487 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.24882489 - `"low"`24902491 - `"medium"`24922493 - `"high"`24942495 - `user_location: optional object { type, city, country, 2 more } or null`24962497 The user's location.24982499 - `type: "approximate"`25002501 The type of location approximation. Always `approximate`.25022503 - `"approximate"`25042505 - `city: optional string or null`25062507 Free text input for the city of the user, e.g. `San Francisco`.25082509 - `country: optional string or null`25102511 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.25122513 - `region: optional string or null`25142515 Free text input for the region of the user, e.g. `California`.25162517 - `timezone: optional string or null`25182519 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.25202521 - `ApplyPatch object { type, allowed_callers }`25222523 Allows the assistant to create, delete, or update files using unified diffs.25242525 - `type: "apply_patch"`25262527 The type of the tool. Always `apply_patch`.25282529 - `"apply_patch"`25302531 - `allowed_callers: optional array of "direct" or "programmatic" or null`25322533 The tool invocation context(s).25342535 - `"direct"`25362537 - `"programmatic"`25382539 - `type: "tool_search_output"`25402541 The item type. Always `tool_search_output`.25422543 - `"tool_search_output"`25442545 - `id: optional string or null`25462547 The unique ID of this tool search output.25482549 - `call_id: optional string or null`25502551 The unique ID of the tool search call generated by the model.25522553 - `execution: optional "server" or "client"`25542555 Whether tool search was executed by the server or by the client.25562557 - `"server"`25582559 - `"client"`25602561 - `status: optional "in_progress" or "completed" or "incomplete" or null`25622563 The status of the tool search output.25642565 - `"in_progress"`25662567 - `"completed"`25682569 - `"incomplete"`25702571 - `AdditionalTools object { role, tools, type, id }`25722573 - `role: "developer"`25742575 The role that provided the additional tools. Only `developer` is supported.25762577 - `"developer"`25782579 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`25802581 A list of additional tools made available at this item.25822583 - `Function object { name, parameters, strict, 6 more }`25842585 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).25862587 - `name: string`25882589 The name of the function to call.25902591 - `parameters: map[unknown] or null`25922593 A JSON schema object describing the parameters of the function.25942595 - `strict: boolean or null`25962597 Whether strict parameter validation is enforced for this function tool.25982599 - `type: "function"`26002601 The type of the function tool. Always `function`.26022603 - `"function"`26042605 - `allowed_callers: optional array of "direct" or "programmatic" or null`26062607 The tool invocation context(s).26082609 - `"direct"`26102611 - `"programmatic"`26122613 - `async: optional boolean`26142615 - `defer_loading: optional boolean`26162617 Whether this function is deferred and loaded via tool search.26182619 - `description: optional string or null`26202621 A description of the function. Used by the model to determine whether or not to call the function.26222623 - `output_schema: optional map[unknown] or null`26242625 A JSON schema object describing the JSON value encoded in string outputs for this function.26262627 - `FileSearch object { type, vector_store_ids, filters, 2 more }`26282629 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).26302631 - `type: "file_search"`26322633 The type of the file search tool. Always `file_search`.26342635 - `"file_search"`26362637 - `vector_store_ids: array of string`26382639 The IDs of the vector stores to search.26402641 - `filters: optional ComparisonFilter or CompoundFilter or null`26422643 A filter to apply.26442645 - `ComparisonFilter object { key, type, value }`26462647 A filter used to compare a specified attribute key to a given value using a defined comparison operation.26482649 - `CompoundFilter object { filters, type }`26502651 Combine multiple filters using `and` or `or`.26522653 - `max_num_results: optional number`26542655 The maximum number of results to return. This number should be between 1 and 50 inclusive.26562657 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`26582659 Ranking options for search.26602661 - `hybrid_search: optional object { embedding_weight, text_weight }`26622663 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.26642665 - `embedding_weight: number`26662667 The weight of the embedding in the reciprocal ranking fusion.26682669 - `text_weight: number`26702671 The weight of the text in the reciprocal ranking fusion.26722673 - `ranker: optional "auto" or "default-2024-11-15"`26742675 The ranker to use for the file search.26762677 - `"auto"`26782679 - `"default-2024-11-15"`26802681 - `score_threshold: optional number`26822683 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.26842685 - `Computer object { type }`26862687 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).26882689 - `type: "computer"`26902691 The type of the computer tool. Always `computer`.26922693 - `"computer"`26942695 - `ComputerUsePreview object { display_height, display_width, environment, type }`26962697 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).26982699 - `display_height: number`27002701 The height of the computer display.27022703 - `display_width: number`27042705 The width of the computer display.27062707 - `environment: "windows" or "mac" or "linux" or 2 more`27082709 The type of computer environment to control.27102711 - `"windows"`27122713 - `"mac"`27142715 - `"linux"`27162717 - `"ubuntu"`27182719 - `"browser"`27202721 - `type: "computer_use_preview"`27222723 The type of the computer use tool. Always `computer_use_preview`.27242725 - `"computer_use_preview"`27262727 - `WebSearch object { type, external_web_access, filters, 2 more }`27282729 Search the Internet for sources related to the prompt. Learn more about the2730 [web search tool](/api/docs/guides/tools-web-search).27312732 - `type: "web_search" or "web_search_2025_08_26"`27332734 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.27352736 - `"web_search"`27372738 - `"web_search_2025_08_26"`27392740 - `external_web_access: optional boolean`27412742 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.27432744 - `filters: optional object { allowed_domains } or null`27452746 Filters for the search.27472748 - `allowed_domains: optional array of string or null`27492750 Allowed domains for the search. If not provided, all domains are allowed.2751 Subdomains of the provided domains are allowed as well.27522753 Example: `["pubmed.ncbi.nlm.nih.gov"]`27542755 - `search_context_size: optional "low" or "medium" or "high"`27562757 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.27582759 - `"low"`27602761 - `"medium"`27622763 - `"high"`27642765 - `user_location: optional object { city, country, region, 2 more } or null`27662767 The approximate location of the user.27682769 - `city: optional string or null`27702771 Free text input for the city of the user, e.g. `San Francisco`.27722773 - `country: optional string or null`27742775 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.27762777 - `region: optional string or null`27782779 Free text input for the region of the user, e.g. `California`.27802781 - `timezone: optional string or null`27822783 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.27842785 - `type: optional "approximate"`27862787 The type of location approximation. Always `approximate`.27882789 - `"approximate"`27902791 - `Mcp object { server_label, type, allowed_callers, 9 more }`27922793 Give the model access to additional tools via remote Model Context Protocol2794 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).27952796 - `server_label: string`27972798 A label for this MCP server, used to identify it in tool calls.27992800 - `type: "mcp"`28012802 The type of the MCP tool. Always `mcp`.28032804 - `"mcp"`28052806 - `allowed_callers: optional array of "direct" or "programmatic" or null`28072808 The tool invocation context(s).28092810 - `"direct"`28112812 - `"programmatic"`28132814 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`28152816 List of allowed tool names or a filter object.28172818 - `McpAllowedTools = array of string`28192820 A string array of allowed tool names28212822 - `McpToolFilter object { read_only, tool_names }`28232824 A filter object to specify which tools are allowed.28252826 - `read_only: optional boolean`28272828 Indicates whether or not a tool modifies data or is read-only. If an2829 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2830 it will match this filter.28312832 - `tool_names: optional array of string`28332834 List of allowed tool names.28352836 - `authorization: optional string`28372838 An OAuth access token that can be used with a remote MCP server, either2839 with a custom MCP server URL or a service connector. Your application2840 must handle the OAuth authorization flow and provide the token here.28412842 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`28432844 Identifier for service connectors, like those available in ChatGPT. One of2845 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more2846 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).28472848 This field is deprecated for models released after September 1, 2026.2849 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to2850 connect through a Secure MCP Tunnel.28512852 Currently supported `connector_id` values are:28532854 - Dropbox: `connector_dropbox`2855 - Gmail: `connector_gmail`2856 - Google Calendar: `connector_googlecalendar`2857 - Google Drive: `connector_googledrive`2858 - Microsoft Teams: `connector_microsoftteams`2859 - Outlook Calendar: `connector_outlookcalendar`2860 - Outlook Email: `connector_outlookemail`2861 - SharePoint: `connector_sharepoint`28622863 - `"connector_dropbox"`28642865 - `"connector_gmail"`28662867 - `"connector_googlecalendar"`28682869 - `"connector_googledrive"`28702871 - `"connector_microsoftteams"`28722873 - `"connector_outlookcalendar"`28742875 - `"connector_outlookemail"`28762877 - `"connector_sharepoint"`28782879 - `defer_loading: optional boolean`28802881 Whether this MCP tool is deferred and discovered via tool search.28822883 - `headers: optional map[string] or null`28842885 Optional HTTP headers to send to the MCP server. Use for authentication2886 or other purposes.28872888 - `require_approval: optional object { always, never } or "always" or "never" or null`28892890 Specify which of the MCP server's tools require approval.28912892 - `McpToolApprovalFilter object { always, never }`28932894 Specify which of the MCP server's tools require approval. Can be2895 `always`, `never`, or a filter object associated with tools2896 that require approval.28972898 - `always: optional object { read_only, tool_names }`28992900 A filter object to specify which tools are allowed.29012902 - `read_only: optional boolean`29032904 Indicates whether or not a tool modifies data or is read-only. If an2905 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2906 it will match this filter.29072908 - `tool_names: optional array of string`29092910 List of allowed tool names.29112912 - `never: optional object { read_only, tool_names }`29132914 A filter object to specify which tools are allowed.29152916 - `read_only: optional boolean`29172918 Indicates whether or not a tool modifies data or is read-only. If an2919 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2920 it will match this filter.29212922 - `tool_names: optional array of string`29232924 List of allowed tool names.29252926 - `McpToolApprovalSetting = "always" or "never"`29272928 Specify a single approval policy for all tools. One of `always` or2929 `never`. When set to `always`, all tools will require approval. When2930 set to `never`, all tools will not require approval.29312932 - `"always"`29332934 - `"never"`29352936 - `server_description: optional string`29372938 Optional description of the MCP server, used to provide more context.29392940 - `server_url: optional string`29412942 The URL for the MCP server. One of `server_url`, `connector_id`, or2943 `tunnel_id` must be provided.29442945 - `tunnel_id: optional string`29462947 The Secure MCP Tunnel ID to use instead of a direct server URL. One of2948 `server_url`, `connector_id`, or `tunnel_id` must be provided.29492950 - `CodeInterpreter object { container, type, allowed_callers }`29512952 A tool that runs Python code to help generate a response to a prompt.29532954 - `container: string or object { type, file_ids, memory_limit, network_policy }`29552956 The code interpreter container. Can be a container ID or an object that2957 specifies uploaded file IDs to make available to your code, along with an2958 optional `memory_limit` setting.29592960 - `string`29612962 The container ID.29632964 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`29652966 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.29672968 - `type: "auto"`29692970 Always `auto`.29712972 - `"auto"`29732974 - `file_ids: optional array of string`29752976 An optional list of uploaded files to make available to your code.29772978 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`29792980 The memory limit for the code interpreter container.29812982 - `"1g"`29832984 - `"4g"`29852986 - `"16g"`29872988 - `"64g"`29892990 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`29912992 Network access policy for the container.29932994 - `ContainerNetworkPolicyDisabled object { type }`29952996 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`29972998 - `type: "code_interpreter"`29993000 The type of the code interpreter tool. Always `code_interpreter`.30013002 - `"code_interpreter"`30033004 - `allowed_callers: optional array of "direct" or "programmatic" or null`30053006 The tool invocation context(s).30073008 - `"direct"`30093010 - `"programmatic"`30113012 - `ProgrammaticToolCalling object { type }`30133014 - `type: "programmatic_tool_calling"`30153016 The type of the tool. Always `programmatic_tool_calling`.30173018 - `"programmatic_tool_calling"`30193020 - `ImageGeneration object { type, action, background, 9 more }`30213022 A tool that generates images using the GPT image models.30233024 - `type: "image_generation"`30253026 The type of the image generation tool. Always `image_generation`.30273028 - `"image_generation"`30293030 - `action: optional "generate" or "edit" or "auto"`30313032 Whether to generate a new image or edit an existing image. Default: `auto`.30333034 - `"generate"`30353036 - `"edit"`30373038 - `"auto"`30393040 - `background: optional "transparent" or "opaque" or "auto"`30413042 Set the background of the generated image. One of `transparent`, `opaque`,3043 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including3044 their `2026-09-08` snapshots, support `opaque` and `transparent`3045 backgrounds. Transparent backgrounds are available for supported GPT Image3046 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in3047 preview. When using `transparent`, set the output format to `png` or `webp`.3048 Default: `auto`.30493050 - `"transparent"`30513052 - `"opaque"`30533054 - `"auto"`30553056 - `input_fidelity: optional "high" or "low" or null`30573058 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`.30593060 - `"high"`30613062 - `"low"`30633064 - `input_image_mask: optional object { file_id, image_url }`30653066 Optional mask for inpainting. Contains `image_url`3067 (string, optional) and `file_id` (string, optional).30683069 - `file_id: optional string`30703071 File ID for the mask image.30723073 - `image_url: optional string`30743075 Base64-encoded mask image.30763077 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`30783079 The image generation model to use. One of `gpt-image-1`,3080 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,3081 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3082 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3083 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3084 `gpt-image-1`.30853086 - `string`30873088 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`30893090 The image generation model to use. One of `gpt-image-1`,3091 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,3092 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3093 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3094 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3095 `gpt-image-1`.30963097 - `"gpt-image-1"`30983099 - `"gpt-image-1-mini"`31003101 - `"gpt-image-1.5"`31023103 - `"gpt-image-2"`31043105 - `"gpt-image-2-2026-04-21"`31063107 - `"gpt-image-2.5-sunburst"`31083109 - `"gpt-image-2.5-sunburst-2026-09-08"`31103111 - `"gpt-image-2.5-flare"`31123113 - `"gpt-image-2.5-flare-2026-09-08"`31143115 - `moderation: optional "auto" or "low"`31163117 Moderation level for the generated image. Default: `auto`.31183119 - `"auto"`31203121 - `"low"`31223123 - `output_compression: optional number`31243125 Compression level for the output image. Default: 100.31263127 - `output_format: optional "png" or "webp" or "jpeg"`31283129 The output format of the generated image. One of `png`, `webp`, or3130 `jpeg`. Default: `png`.31313132 - `"png"`31333134 - `"webp"`31353136 - `"jpeg"`31373138 - `partial_images: optional number`31393140 Number of partial images to generate in streaming mode, from 0 (default value) to 3.31413142 - `quality: optional "low" or "medium" or "high" or 3 more`31433144 The quality of the generated image. The GPT image models support `low`,3145 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,3146 including their `2026-09-08` snapshots, also support `xhigh` and `max`.3147 Default: `auto`.31483149 - `"low"`31503151 - `"medium"`31523153 - `"high"`31543155 - `"xhigh"`31563157 - `"max"`31583159 - `"auto"`31603161 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`31623163 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`.31643165 - `string`31663167 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`31683169 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`.31703171 - `"1024x1024"`31723173 - `"1024x1536"`31743175 - `"1536x1024"`31763177 - `"auto"`31783179 - `LocalShell object { type }`31803181 A tool that allows the model to execute shell commands in a local environment.31823183 - `type: "local_shell"`31843185 The type of the local shell tool. Always `local_shell`.31863187 - `"local_shell"`31883189 - `Shell object { type, allowed_callers, environment }`31903191 A tool that allows the model to execute shell commands.31923193 - `type: "shell"`31943195 The type of the shell tool. Always `shell`.31963197 - `"shell"`31983199 - `allowed_callers: optional array of "direct" or "programmatic" or null`32003201 The tool invocation context(s).32023203 - `"direct"`32043205 - `"programmatic"`32063207 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`32083209 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`32103211 - `LocalEnvironment object { type, skills }`32123213 - `ContainerReference object { container_id, type }`32143215 - `Custom object { name, type, allowed_callers, 4 more }`32163217 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)32183219 - `name: string`32203221 The name of the custom tool, used to identify it in tool calls.32223223 - `type: "custom"`32243225 The type of the custom tool. Always `custom`.32263227 - `"custom"`32283229 - `allowed_callers: optional array of "direct" or "programmatic" or null`32303231 The tool invocation context(s).32323233 - `"direct"`32343235 - `"programmatic"`32363237 - `async: optional boolean`32383239 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.32403241 - `defer_loading: optional boolean`32423243 Whether this tool should be deferred and discovered via tool search.32443245 - `description: optional string`32463247 Optional description of the custom tool, used to provide more context.32483249 - `format: optional CustomToolInputFormat`32503251 The input format for the custom tool. Default is unconstrained text.32523253 - `Namespace object { description, name, tools, type }`32543255 Groups function/custom tools under a shared namespace.32563257 - `description: string`32583259 A description of the namespace shown to the model.32603261 - `name: string`32623263 The namespace name used in tool calls (for example, `crm`).32643265 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`32663267 The function/custom tools available inside this namespace.32683269 - `Function object { name, type, allowed_callers, 6 more }`32703271 - `name: string`32723273 - `type: "function"`32743275 - `"function"`32763277 - `allowed_callers: optional array of "direct" or "programmatic" or null`32783279 The tool invocation context(s).32803281 - `"direct"`32823283 - `"programmatic"`32843285 - `async: optional boolean`32863287 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.32883289 - `defer_loading: optional boolean`32903291 Whether this function should be deferred and discovered via tool search.32923293 - `description: optional string or null`32943295 - `output_schema: optional map[unknown] or null`32963297 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.32983299 - `parameters: optional unknown or null`33003301 - `strict: optional boolean or null`33023303 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.33043305 - `Custom object { name, type, allowed_callers, 4 more }`33063307 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)33083309 - `name: string`33103311 The name of the custom tool, used to identify it in tool calls.33123313 - `type: "custom"`33143315 The type of the custom tool. Always `custom`.33163317 - `"custom"`33183319 - `allowed_callers: optional array of "direct" or "programmatic" or null`33203321 The tool invocation context(s).33223323 - `"direct"`33243325 - `"programmatic"`33263327 - `async: optional boolean`33283329 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.33303331 - `defer_loading: optional boolean`33323333 Whether this tool should be deferred and discovered via tool search.33343335 - `description: optional string`33363337 Optional description of the custom tool, used to provide more context.33383339 - `format: optional CustomToolInputFormat`33403341 The input format for the custom tool. Default is unconstrained text.33423343 - `type: "namespace"`33443345 The type of the tool. Always `namespace`.33463347 - `"namespace"`33483349 - `ToolSearch object { type, description, execution, parameters }`33503351 Hosted or BYOT tool search configuration for deferred tools.33523353 - `type: "tool_search"`33543355 The type of the tool. Always `tool_search`.33563357 - `"tool_search"`33583359 - `description: optional string or null`33603361 Description shown to the model for a client-executed tool search tool.33623363 - `execution: optional "server" or "client"`33643365 Whether tool search is executed by the server or by the client.33663367 - `"server"`33683369 - `"client"`33703371 - `parameters: optional unknown or null`33723373 Parameter schema for a client-executed tool search tool.33743375 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`33763377 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).33783379 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`33803381 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.33823383 - `"web_search_preview"`33843385 - `"web_search_preview_2025_03_11"`33863387 - `search_content_types: optional array of "text" or "image"`33883389 - `"text"`33903391 - `"image"`33923393 - `search_context_size: optional "low" or "medium" or "high"`33943395 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.33963397 - `"low"`33983399 - `"medium"`34003401 - `"high"`34023403 - `user_location: optional object { type, city, country, 2 more } or null`34043405 The user's location.34063407 - `type: "approximate"`34083409 The type of location approximation. Always `approximate`.34103411 - `"approximate"`34123413 - `city: optional string or null`34143415 Free text input for the city of the user, e.g. `San Francisco`.34163417 - `country: optional string or null`34183419 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.34203421 - `region: optional string or null`34223423 Free text input for the region of the user, e.g. `California`.34243425 - `timezone: optional string or null`34263427 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.34283429 - `ApplyPatch object { type, allowed_callers }`34303431 Allows the assistant to create, delete, or update files using unified diffs.34323433 - `type: "apply_patch"`34343435 The type of the tool. Always `apply_patch`.34363437 - `"apply_patch"`34383439 - `allowed_callers: optional array of "direct" or "programmatic" or null`34403441 The tool invocation context(s).34423443 - `"direct"`34443445 - `"programmatic"`34463447 - `type: "additional_tools"`34483449 The item type. Always `additional_tools`.34503451 - `"additional_tools"`34523453 - `id: optional string or null`34543455 The unique ID of this additional tools item.34563457 - `ConfigurationUpdate object { type, id, reasoning }`34583459 An update to the conversation's response configuration. The configuration3460 remains in effect for subsequent responses until it is replaced by another3461 configuration update.34623463 - `type: "configuration_update"`34643465 The item type. Always `configuration_update`.34663467 - `"configuration_update"`34683469 - `id: optional string or null`34703471 The unique ID of the configuration update item.34723473 - `reasoning: optional object { effort }`34743475 Updates to reasoning configuration. Only effort is supported.34763477 - `effort: optional ReasoningEffort or null`34783479 The reasoning effort to use for subsequent responses until another3480 configuration update replaces it.34813482 - `"none"`34833484 - `"minimal"`34853486 - `"low"`34873488 - `"medium"`34893490 - `"high"`34913492 - `"xhigh"`34933494 - `"max"`34953496 - `Reasoning object { id, summary, type, 3 more }`34973498 A description of the chain of thought used by a reasoning model while generating3499 a response. Be sure to include these items in your `input` to the Responses API3500 for subsequent turns of a conversation if you are manually3501 [managing context](/api/docs/guides/conversation-state).35023503 - `id: string`35043505 The unique identifier of the reasoning content.35063507 - `summary: array of SummaryTextContent`35083509 Reasoning summary content.35103511 - `text: string`35123513 A summary of the reasoning output from the model so far.35143515 - `type: "summary_text"`35163517 The type of the object. Always `summary_text`.35183519 - `"summary_text"`35203521 - `type: "reasoning"`35223523 The type of the object. Always `reasoning`.35243525 - `"reasoning"`35263527 - `content: optional array of object { text, type }`35283529 Reasoning text content.35303531 - `text: string`35323533 The reasoning text from the model.35343535 - `type: "reasoning_text"`35363537 The type of the reasoning text. Always `reasoning_text`.35383539 - `"reasoning_text"`35403541 - `encrypted_content: optional string or null`35423543 The encrypted content of the reasoning item. This is populated by default3544 for reasoning items returned by `POST /v1/responses` and WebSocket3545 `response.create` requests.35463547 When streaming, use the completed reasoning item and its3548 `encrypted_content` from the `response.output_item.done` event in3549 subsequent requests. The `encrypted_content` in3550 `response.output_item.added` may be incomplete. This is especially3551 important when `store` is `false` or when using Zero Data Retention.35523553 - `status: optional "in_progress" or "completed" or "incomplete"`35543555 The status of the item. One of `in_progress`, `completed`, or3556 `incomplete`. Populated when items are returned via API.35573558 - `"in_progress"`35593560 - `"completed"`35613562 - `"incomplete"`35633564 - `Compaction object { encrypted_content, type, id }`35653566 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).35673568 - `encrypted_content: string`35693570 The encrypted content of the compaction summary.35713572 - `type: "compaction"`35733574 The type of the item. Always `compaction`.35753576 - `"compaction"`35773578 - `id: optional string or null`35793580 The ID of the compaction item.35813582 - `ImageGenerationCall object { id, result, status, 7 more }`35833584 An image generation request made by the model.35853586 - `id: string`35873588 The unique ID of the image generation call.35893590 - `result: string or null`35913592 The generated image encoded in base64.35933594 - `status: "in_progress" or "completed" or "generating" or "failed"`35953596 The status of the image generation call.35973598 - `"in_progress"`35993600 - `"completed"`36013602 - `"generating"`36033604 - `"failed"`36053606 - `type: "image_generation_call"`36073608 The type of the image generation call. Always `image_generation_call`.36093610 - `"image_generation_call"`36113612 - `action: optional "generate" or "edit" or "auto" or null`36133614 The action used for image generation.36153616 - `"generate"`36173618 - `"edit"`36193620 - `"auto"`36213622 - `background: optional "transparent" or "opaque" or "auto" or null`36233624 The background setting used for generation.36253626 - `"transparent"`36273628 - `"opaque"`36293630 - `"auto"`36313632 - `output_format: optional "png" or "webp" or "jpeg" or null`36333634 The output format used for generation.36353636 - `"png"`36373638 - `"webp"`36393640 - `"jpeg"`36413642 - `quality: optional "low" or "medium" or "high" or 3 more or null`36433644 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.36453646 - `"low"`36473648 - `"medium"`36493650 - `"high"`36513652 - `"xhigh"`36533654 - `"max"`36553656 - `"auto"`36573658 - `revised_prompt: optional string or null`36593660 The prompt that was used after any model prompt rewriting.36613662 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`36633664 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.36653666 - `string`36673668 - `"1024x1024" or "1024x1536" or "1536x1024"`36693670 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.36713672 - `"1024x1024"`36733674 - `"1024x1536"`36753676 - `"1536x1024"`36773678 - `CodeInterpreterCall object { id, code, container_id, 3 more }`36793680 A tool call to run code.36813682 - `id: string`36833684 The unique ID of the code interpreter tool call.36853686 - `code: string or null`36873688 The code to run, or null if not available.36893690 - `container_id: string`36913692 The ID of the container used to run the code.36933694 - `outputs: array of object { logs, type } or object { type, url } or null`36953696 The outputs generated by the code interpreter, such as logs or images.3697 Can be null if no outputs are available.36983699 - `Logs object { logs, type }`37003701 The logs output from the code interpreter.37023703 - `logs: string`37043705 The logs output from the code interpreter.37063707 - `type: "logs"`37083709 The type of the output. Always `logs`.37103711 - `"logs"`37123713 - `Image object { type, url }`37143715 The image output from the code interpreter.37163717 - `type: "image"`37183719 The type of the output. Always `image`.37203721 - `"image"`37223723 - `url: string`37243725 The URL of the image output from the code interpreter.37263727 - `status: "in_progress" or "completed" or "incomplete" or 2 more`37283729 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.37303731 - `"in_progress"`37323733 - `"completed"`37343735 - `"incomplete"`37363737 - `"interpreting"`37383739 - `"failed"`37403741 - `type: "code_interpreter_call"`37423743 The type of the code interpreter tool call. Always `code_interpreter_call`.37443745 - `"code_interpreter_call"`37463747 - `LocalShellCall object { id, action, call_id, 2 more }`37483749 A tool call to run a command on the local shell.37503751 - `id: string`37523753 The unique ID of the local shell call.37543755 - `action: object { command, env, type, 3 more }`37563757 Execute a shell command on the server.37583759 - `command: array of string`37603761 The command to run.37623763 - `env: map[string]`37643765 Environment variables to set for the command.37663767 - `type: "exec"`37683769 The type of the local shell action. Always `exec`.37703771 - `"exec"`37723773 - `timeout_ms: optional number or null`37743775 Optional timeout in milliseconds for the command.37763777 - `user: optional string or null`37783779 Optional user to run the command as.37803781 - `working_directory: optional string or null`37823783 Optional working directory to run the command in.37843785 - `call_id: string`37863787 The unique ID of the local shell tool call generated by the model.37883789 - `status: "in_progress" or "completed" or "incomplete"`37903791 The status of the local shell call.37923793 - `"in_progress"`37943795 - `"completed"`37963797 - `"incomplete"`37983799 - `type: "local_shell_call"`38003801 The type of the local shell call. Always `local_shell_call`.38023803 - `"local_shell_call"`38043805 - `LocalShellCallOutput object { id, output, type, status }`38063807 The output of a local shell tool call.38083809 - `id: string`38103811 The unique ID of the local shell tool call generated by the model.38123813 - `output: string`38143815 A JSON string of the output of the local shell tool call.38163817 - `type: "local_shell_call_output"`38183819 The type of the local shell tool call output. Always `local_shell_call_output`.38203821 - `"local_shell_call_output"`38223823 - `status: optional "in_progress" or "completed" or "incomplete" or null`38243825 The status of the item. One of `in_progress`, `completed`, or `incomplete`.38263827 - `"in_progress"`38283829 - `"completed"`38303831 - `"incomplete"`38323833 - `ShellCall object { action, call_id, type, 4 more }`38343835 A tool representing a request to execute one or more shell commands.38363837 - `action: object { commands, max_output_length, timeout_ms }`38383839 The shell commands and limits that describe how to run the tool call.38403841 - `commands: array of string`38423843 Ordered shell commands for the execution environment to run.38443845 - `max_output_length: optional number or null`38463847 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.38483849 - `timeout_ms: optional number or null`38503851 Maximum wall-clock time in milliseconds to allow the shell commands to run.38523853 - `call_id: string`38543855 The unique ID of the shell tool call generated by the model.38563857 - `type: "shell_call"`38583859 The type of the item. Always `shell_call`.38603861 - `"shell_call"`38623863 - `id: optional string or null`38643865 The unique ID of the shell tool call. Populated when this item is returned via API.38663867 - `caller: optional object { type } or object { caller_id, type } or null`38683869 The execution context that produced this tool call.38703871 - `Direct object { type }`38723873 - `type: "direct"`38743875 The caller type. Always `direct`.38763877 - `"direct"`38783879 - `Program object { caller_id, type }`38803881 - `caller_id: string`38823883 The call ID of the program item that produced this tool call.38843885 - `type: "program"`38863887 The caller type. Always `program`.38883889 - `"program"`38903891 - `environment: optional LocalEnvironment or ContainerReference or null`38923893 The environment to execute the shell commands in.38943895 - `LocalEnvironment object { type, skills }`38963897 - `ContainerReference object { container_id, type }`38983899 - `status: optional "in_progress" or "completed" or "incomplete" or null`39003901 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.39023903 - `"in_progress"`39043905 - `"completed"`39063907 - `"incomplete"`39083909 - `ShellCallOutput object { call_id, output, type, 4 more }`39103911 The streamed output items emitted by a shell tool call.39123913 - `call_id: string`39143915 The unique ID of the shell tool call generated by the model.39163917 - `output: array of ResponseFunctionShellCallOutputContent`39183919 Captured chunks of stdout and stderr output, along with their associated outcomes.39203921 - `outcome: object { type } or object { exit_code, type }`39223923 The exit or timeout outcome associated with this shell call.39243925 - `Timeout object { type }`39263927 Indicates that the shell call exceeded its configured time limit.39283929 - `type: "timeout"`39303931 The outcome type. Always `timeout`.39323933 - `"timeout"`39343935 - `Exit object { exit_code, type }`39363937 Indicates that the shell commands finished and returned an exit code.39383939 - `exit_code: number`39403941 The exit code returned by the shell process.39423943 - `type: "exit"`39443945 The outcome type. Always `exit`.39463947 - `"exit"`39483949 - `stderr: string`39503951 Captured stderr output for the shell call.39523953 - `stdout: string`39543955 Captured stdout output for the shell call.39563957 - `type: "shell_call_output"`39583959 The type of the item. Always `shell_call_output`.39603961 - `"shell_call_output"`39623963 - `id: optional string or null`39643965 The unique ID of the shell tool call output. Populated when this item is returned via API.39663967 - `caller: optional object { type } or object { caller_id, type } or null`39683969 The execution context that produced this tool call.39703971 - `Direct object { type }`39723973 - `type: "direct"`39743975 The caller type. Always `direct`.39763977 - `"direct"`39783979 - `Program object { caller_id, type }`39803981 - `caller_id: string`39823983 The call ID of the program item that produced this tool call.39843985 - `type: "program"`39863987 The caller type. Always `program`.39883989 - `"program"`39903991 - `max_output_length: optional number or null`39923993 The maximum number of UTF-8 characters captured for this shell call's combined output.39943995 - `status: optional "in_progress" or "completed" or "incomplete" or null`39963997 The status of the shell call output.39983999 - `"in_progress"`40004001 - `"completed"`40024003 - `"incomplete"`40044005 - `ApplyPatchCall object { call_id, operation, status, 3 more }`40064007 A tool call representing a request to create, delete, or update files using diff patches.40084009 - `call_id: string`40104011 The unique ID of the apply patch tool call generated by the model.40124013 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`40144015 The specific create, delete, or update instruction for the apply_patch tool call.40164017 - `CreateFile object { diff, path, type }`40184019 Instruction for creating a new file via the apply_patch tool.40204021 - `diff: string`40224023 Unified diff content to apply when creating the file.40244025 - `path: string`40264027 Path of the file to create relative to the workspace root.40284029 - `type: "create_file"`40304031 The operation type. Always `create_file`.40324033 - `"create_file"`40344035 - `DeleteFile object { path, type }`40364037 Instruction for deleting an existing file via the apply_patch tool.40384039 - `path: string`40404041 Path of the file to delete relative to the workspace root.40424043 - `type: "delete_file"`40444045 The operation type. Always `delete_file`.40464047 - `"delete_file"`40484049 - `UpdateFile object { diff, path, type }`40504051 Instruction for updating an existing file via the apply_patch tool.40524053 - `diff: string`40544055 Unified diff content to apply to the existing file.40564057 - `path: string`40584059 Path of the file to update relative to the workspace root.40604061 - `type: "update_file"`40624063 The operation type. Always `update_file`.40644065 - `"update_file"`40664067 - `status: "in_progress" or "completed"`40684069 The status of the apply patch tool call. One of `in_progress` or `completed`.40704071 - `"in_progress"`40724073 - `"completed"`40744075 - `type: "apply_patch_call"`40764077 The type of the item. Always `apply_patch_call`.40784079 - `"apply_patch_call"`40804081 - `id: optional string or null`40824083 The unique ID of the apply patch tool call. Populated when this item is returned via API.40844085 - `caller: optional object { type } or object { caller_id, type } or null`40864087 The execution context that produced this tool call.40884089 - `Direct object { type }`40904091 - `type: "direct"`40924093 The caller type. Always `direct`.40944095 - `"direct"`40964097 - `Program object { caller_id, type }`40984099 - `caller_id: string`41004101 The call ID of the program item that produced this tool call.41024103 - `type: "program"`41044105 The caller type. Always `program`.41064107 - `"program"`41084109 - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`41104111 The streamed output emitted by an apply patch tool call.41124113 - `call_id: string`41144115 The unique ID of the apply patch tool call generated by the model.41164117 - `status: "completed" or "failed"`41184119 The status of the apply patch tool call output. One of `completed` or `failed`.41204121 - `"completed"`41224123 - `"failed"`41244125 - `type: "apply_patch_call_output"`41264127 The type of the item. Always `apply_patch_call_output`.41284129 - `"apply_patch_call_output"`41304131 - `id: optional string or null`41324133 The unique ID of the apply patch tool call output. Populated when this item is returned via API.41344135 - `caller: optional object { type } or object { caller_id, type } or null`41364137 The execution context that produced this tool call.41384139 - `Direct object { type }`41404141 - `type: "direct"`41424143 The caller type. Always `direct`.41444145 - `"direct"`41464147 - `Program object { caller_id, type }`41484149 - `caller_id: string`41504151 The call ID of the program item that produced this tool call.41524153 - `type: "program"`41544155 The caller type. Always `program`.41564157 - `"program"`41584159 - `output: optional string or null`41604161 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).41624163 - `McpListTools object { id, server_label, tools, 2 more }`41644165 A list of tools available on an MCP server.41664167 - `id: string`41684169 The unique ID of the list.41704171 - `server_label: string`41724173 The label of the MCP server.41744175 - `tools: array of object { input_schema, name, annotations, description }`41764177 The tools available on the server.41784179 - `input_schema: unknown`41804181 The JSON schema describing the tool's input.41824183 - `name: string`41844185 The name of the tool.41864187 - `annotations: optional unknown or null`41884189 Additional annotations about the tool.41904191 - `description: optional string or null`41924193 The description of the tool.41944195 - `type: "mcp_list_tools"`41964197 The type of the item. Always `mcp_list_tools`.41984199 - `"mcp_list_tools"`42004201 - `error: optional string or null`42024203 Error message if the server could not list tools.42044205 - `McpApprovalRequest object { id, arguments, name, 2 more }`42064207 A request for human approval of a tool invocation.42084209 - `id: string`42104211 The unique ID of the approval request.42124213 - `arguments: string`42144215 A JSON string of arguments for the tool.42164217 - `name: string`42184219 The name of the tool to run.42204221 - `server_label: string`42224223 The label of the MCP server making the request.42244225 - `type: "mcp_approval_request"`42264227 The type of the item. Always `mcp_approval_request`.42284229 - `"mcp_approval_request"`42304231 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`42324233 A response to an MCP approval request.42344235 - `approval_request_id: string`42364237 The ID of the approval request being answered.42384239 - `approve: boolean`42404241 Whether the request was approved.42424243 - `type: "mcp_approval_response"`42444245 The type of the item. Always `mcp_approval_response`.42464247 - `"mcp_approval_response"`42484249 - `id: optional string or null`42504251 The unique ID of the approval response42524253 - `reason: optional string or null`42544255 Optional reason for the decision.42564257 - `McpCall object { id, arguments, name, 6 more }`42584259 An invocation of a tool on an MCP server.42604261 - `id: string`42624263 The unique ID of the tool call.42644265 - `arguments: string`42664267 A JSON string of the arguments passed to the tool.42684269 - `name: string`42704271 The name of the tool that was run.42724273 - `server_label: string`42744275 The label of the MCP server running the tool.42764277 - `type: "mcp_call"`42784279 The type of the item. Always `mcp_call`.42804281 - `"mcp_call"`42824283 - `approval_request_id: optional string or null`42844285 Unique identifier for the MCP tool call approval request.4286 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.42874288 - `error: optional McpToolCallError or null`42894290 The error from the tool call, if any.42914292 - `McpProtocolError object { code, message, type }`42934294 - `code: number`42954296 - `message: string`42974298 - `type: "mcp_protocol_error"`42994300 - `"mcp_protocol_error"`43014302 - `McpToolExecutionError object { content, type }`43034304 - `content: unknown`43054306 - `type: "mcp_tool_execution_error"`43074308 - `"mcp_tool_execution_error"`43094310 - `HTTPError object { code, message, type }`43114312 - `code: number`43134314 - `message: string`43154316 - `type: "http_error"`43174318 - `"http_error"`43194320 - `output: optional string or null`43214322 The output from the tool call.43234324 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`43254326 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.43274328 - `"in_progress"`43294330 - `"completed"`43314332 - `"incomplete"`43334334 - `"calling"`43354336 - `"failed"`43374338 - `CustomToolCallOutput object { call_id, output, type, 2 more }`43394340 The output of a custom tool call from your code, being sent back to the model.43414342 - `call_id: string`43434344 The call ID, used to map this custom tool call output to a custom tool call.43454346 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`43474348 The output from the custom tool call generated by your code.4349 Can be a string or an list of output content.43504351 - `StringOutput = string`43524353 A string of the output of the custom tool call.43544355 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`43564357 Text, image, or file output of the custom tool call.43584359 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`43604361 A text input to the model.43624363 - `ResponseInputImage object { detail, type, file_id, 2 more }`43644365 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).43664367 - `ResponseInputFile object { type, detail, file_data, 4 more }`43684369 A file input to the model.43704371 - `type: "custom_tool_call_output"`43724373 The type of the custom tool call output. Always `custom_tool_call_output`.43744375 - `"custom_tool_call_output"`43764377 - `id: optional string`43784379 The unique ID of the custom tool call output in the OpenAI platform.43804381 - `caller: optional object { type } or object { caller_id, type } or null`43824383 The execution context that produced this tool call.43844385 - `Direct object { type }`43864387 - `type: "direct"`43884389 The caller type. Always `direct`.43904391 - `"direct"`43924393 - `Program object { caller_id, type }`43944395 - `caller_id: string`43964397 The call ID of the program item that produced this tool call.43984399 - `type: "program"`44004401 The caller type. Always `program`.44024403 - `"program"`44044405 - `CustomToolCall object { call_id, input, name, 5 more }`44064407 A call to a custom tool created by the model.44084409 - `call_id: string`44104411 An identifier used to map this custom tool call to a tool call output.44124413 - `input: string`44144415 The input for the custom tool call generated by the model.44164417 - `name: string`44184419 The name of the custom tool being called.44204421 - `type: "custom_tool_call"`44224423 The type of the custom tool call. Always `custom_tool_call`.44244425 - `"custom_tool_call"`44264427 - `id: optional string`44284429 The unique ID of the custom tool call in the OpenAI platform.44304431 - `async: optional boolean`44324433 Whether the custom tool call runs asynchronously.44344435 - `caller: optional object { type } or object { caller_id, type } or null`44364437 The execution context that produced this tool call.44384439 - `Direct object { type }`44404441 - `type: "direct"`44424443 - `"direct"`44444445 - `Program object { caller_id, type }`44464447 - `caller_id: string`44484449 The call ID of the program item that produced this tool call.44504451 - `type: "program"`44524453 - `"program"`44544455 - `namespace: optional string`44564457 The namespace of the custom tool being called.44584459 - `CompactionTrigger object { type, id }`44604461 Compacts the current context. Must be the final input item.44624463 - `type: "compaction_trigger"`44644465 The type of the item. Always `compaction_trigger`.44664467 - `"compaction_trigger"`44684469 - `id: optional string or null`44704471 The unique ID of this compaction trigger.44724473 - `ItemReference object { id, type }`44744475 An internal identifier for an item to reference.44764477 - `id: string`44784479 The ID of the item to reference.44804481 - `type: optional "item_reference" or null`44824483 The type of item to reference. Always `item_reference`.44844485 - `"item_reference"`44864487 - `Program object { id, call_id, code, 2 more }`44884489 - `id: string`44904491 The unique ID of this program item.44924493 - `call_id: string`44944495 The stable call ID of the program item.44964497 - `code: string`44984499 The JavaScript source executed by programmatic tool calling.45004501 - `fingerprint: string`45024503 Opaque program replay fingerprint that must be round-tripped.45044505 - `type: "program"`45064507 The item type. Always `program`.45084509 - `"program"`45104511 - `ProgramOutput object { id, call_id, result, 2 more }`45124513 - `id: string`45144515 The unique ID of this program output item.45164517 - `call_id: string`45184519 The call ID of the program item.45204521 - `result: string`45224523 The result produced by the program item.45244525 - `status: "completed" or "incomplete"`45264527 The terminal status of the program output.45284529 - `"completed"`45304531 - `"incomplete"`45324533 - `type: "program_output"`45344535 The item type. Always `program_output`.45364537 - `"program_output"`45384539- `instructions: optional string or null`45404541 A system (or developer) message inserted into the model's context.4542 When used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.45434544- `previous_response_id: optional string or null`45454546 The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.45474548- `prompt_cache_key: optional string or null`45494550 A key to use when reading from or writing to the prompt cache.45514552- `prompt_cache_options: optional object { mode, ttl } or null`45534554 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.45554556 - `mode: optional "implicit" or "explicit"`45574558 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.45594560 - `"implicit"`45614562 - `"explicit"`45634564 - `ttl: optional "30m"`45654566 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.45674568 - `"30m"`45694570- `prompt_cache_retention: optional "in_memory" or "24h" or null`45714572 How long to retain a prompt cache entry created by this request.45734574 - `"in_memory"`45754576 - `"24h"`45774578- `service_tier: optional "auto" or "default" or "fast" or 2 more or null`45794580 Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - 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. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'.4581 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.45824583 - `"auto"`45844585 - `"default"`45864587 - `"fast"`45884589 - `"flex"`45904591 - `"priority"`45924593### Returns45944595- `CompactedResponse object { id, created_at, object, 2 more }`45964597 - `id: string`45984599 The unique identifier for the compacted response.46004601 - `created_at: number`46024603 Unix timestamp (in seconds) when the compacted conversation was created.46044605 - `object: "response.compaction"`46064607 The object type. Always `response.compaction`.46084609 - `"response.compaction"`46104611 - `output: array of Message or object { id, call_id, code, 2 more } or object { id, call_id, result, 2 more } or 25 more`46124613 The compacted list of output items.46144615 - `Message object { id, content, role, 3 more }`46164617 A message to or from the model.46184619 - `id: string`46204621 The unique ID of the message.46224623 - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more`46244625 The content of the message46264627 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`46284629 A text input to the model.46304631 - `text: string`46324633 The text input to the model.46344635 - `type: "input_text"`46364637 The type of the input item. Always `input_text`.46384639 - `"input_text"`46404641 - `prompt_cache_breakpoint: optional object { mode }`46424643 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.46444645 - `mode: "explicit"`46464647 The breakpoint mode. Always `explicit`.46484649 - `"explicit"`46504651 - `ResponseOutputText object { annotations, logprobs, text, type }`46524653 A text output from the model.46544655 - `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 }`46564657 The annotations of the text output.46584659 - `FileCitation object { file_id, filename, index, type }`46604661 A citation to a file.46624663 - `file_id: string`46644665 The ID of the file.46664667 - `filename: string`46684669 The filename of the file cited.46704671 - `index: number`46724673 The index of the file in the list of files.46744675 - `type: "file_citation"`46764677 The type of the file citation. Always `file_citation`.46784679 - `"file_citation"`46804681 - `URLCitation object { end_index, start_index, title, 2 more }`46824683 A citation for a web resource used to generate a model response.46844685 - `end_index: number`46864687 The index of the last character of the URL citation in the message.46884689 - `start_index: number`46904691 The index of the first character of the URL citation in the message.46924693 - `title: string`46944695 The title of the web resource.46964697 - `type: "url_citation"`46984699 The type of the URL citation. Always `url_citation`.47004701 - `"url_citation"`47024703 - `url: string`47044705 The URL of the web resource.47064707 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`47084709 A citation for a container file used to generate a model response.47104711 - `container_id: string`47124713 The ID of the container file.47144715 - `end_index: number`47164717 The index of the last character of the container file citation in the message.47184719 - `file_id: string`47204721 The ID of the file.47224723 - `filename: string`47244725 The filename of the container file cited.47264727 - `start_index: number`47284729 The index of the first character of the container file citation in the message.47304731 - `type: "container_file_citation"`47324733 The type of the container file citation. Always `container_file_citation`.47344735 - `"container_file_citation"`47364737 - `FilePath object { file_id, index, type }`47384739 A path to a file.47404741 - `file_id: string`47424743 The ID of the file.47444745 - `index: number`47464747 The index of the file in the list of files.47484749 - `type: "file_path"`47504751 The type of the file path. Always `file_path`.47524753 - `"file_path"`47544755 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`47564757 - `token: string`47584759 - `bytes: array of number`47604761 - `logprob: number`47624763 - `top_logprobs: array of object { token, bytes, logprob }`47644765 - `token: string`47664767 - `bytes: array of number`47684769 - `logprob: number`47704771 - `text: string`47724773 The text output from the model.47744775 - `type: "output_text"`47764777 The type of the output text. Always `output_text`.47784779 - `"output_text"`47804781 - `TextContent object { text, type }`47824783 A text content.47844785 - `text: string`47864787 - `type: "text"`47884789 - `"text"`47904791 - `SummaryTextContent object { text, type }`47924793 A summary text from the model.47944795 - `text: string`47964797 A summary of the reasoning output from the model so far.47984799 - `type: "summary_text"`48004801 The type of the object. Always `summary_text`.48024803 - `"summary_text"`48044805 - `ReasoningText object { text, type }`48064807 Reasoning text from the model.48084809 - `text: string`48104811 The reasoning text from the model.48124813 - `type: "reasoning_text"`48144815 The type of the reasoning text. Always `reasoning_text`.48164817 - `"reasoning_text"`48184819 - `ResponseOutputRefusal object { refusal, type }`48204821 A refusal from the model.48224823 - `refusal: string`48244825 The refusal explanation from the model.48264827 - `type: "refusal"`48284829 The type of the refusal. Always `refusal`.48304831 - `"refusal"`48324833 - `ResponseInputImage object { detail, type, file_id, 2 more }`48344835 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).48364837 - `detail: ImageDetail`48384839 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.48404841 - `"low"`48424843 - `"high"`48444845 - `"auto"`48464847 - `"original"`48484849 - `type: "input_image"`48504851 The type of the input item. Always `input_image`.48524853 - `"input_image"`48544855 - `file_id: optional string or null`48564857 The ID of the file to be sent to the model.48584859 - `image_url: optional string or null`48604861 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.48624863 - `prompt_cache_breakpoint: optional object { mode }`48644865 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.48664867 - `mode: "explicit"`48684869 The breakpoint mode. Always `explicit`.48704871 - `"explicit"`48724873 - `ComputerScreenshotContent object { detail, file_id, image_url, 2 more }`48744875 A screenshot of a computer.48764877 - `detail: ImageDetail`48784879 The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.48804881 - `file_id: string or null`48824883 The identifier of an uploaded file that contains the screenshot.48844885 - `image_url: string or null`48864887 The URL of the screenshot image.48884889 - `type: "computer_screenshot"`48904891 Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.48924893 - `"computer_screenshot"`48944895 - `prompt_cache_breakpoint: optional object { mode }`48964897 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.48984899 - `mode: "explicit"`49004901 The breakpoint mode. Always `explicit`.49024903 - `"explicit"`49044905 - `ResponseInputFile object { type, detail, file_data, 4 more }`49064907 A file input to the model.49084909 - `type: "input_file"`49104911 The type of the input item. Always `input_file`.49124913 - `"input_file"`49144915 - `detail: optional "auto" or "low" or "high"`49164917 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`.49184919 - `"auto"`49204921 - `"low"`49224923 - `"high"`49244925 - `file_data: optional string`49264927 The content of the file to be sent to the model.49284929 - `file_id: optional string or null`49304931 The ID of the file to be sent to the model.49324933 - `file_url: optional string`49344935 The URL of the file to be sent to the model.49364937 - `filename: optional string`49384939 The name of the file to be sent to the model.49404941 - `prompt_cache_breakpoint: optional object { mode }`49424943 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.49444945 - `mode: "explicit"`49464947 The breakpoint mode. Always `explicit`.49484949 - `"explicit"`49504951 - `role: "unknown" or "user" or "assistant" or 5 more`49524953 The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.49544955 - `"unknown"`49564957 - `"user"`49584959 - `"assistant"`49604961 - `"system"`49624963 - `"critic"`49644965 - `"discriminator"`49664967 - `"developer"`49684969 - `"tool"`49704971 - `status: "in_progress" or "completed" or "incomplete"`49724973 The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.49744975 - `"in_progress"`49764977 - `"completed"`49784979 - `"incomplete"`49804981 - `type: "message"`49824983 The type of the message. Always set to `message`.49844985 - `"message"`49864987 - `phase: optional "commentary" or "final_answer" or null`49884989 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.49904991 - `"commentary"`49924993 - `"final_answer"`49944995 - `Program object { id, call_id, code, 2 more }`49964997 - `id: string`49984999 The unique ID of the program item.50005001 - `call_id: string`50025003 The stable call ID of the program item.50045005 - `code: string`50065007 The JavaScript source executed by programmatic tool calling.50085009 - `fingerprint: string`50105011 Opaque program replay fingerprint that must be round-tripped.50125013 - `type: "program"`50145015 The type of the item. Always `program`.50165017 - `"program"`50185019 - `ProgramOutput object { id, call_id, result, 2 more }`50205021 - `id: string`50225023 The unique ID of the program output item.50245025 - `call_id: string`50265027 The call ID of the program item.50285029 - `result: string`50305031 The result produced by the program item.50325033 - `status: "completed" or "incomplete"`50345035 The terminal status of the program output item.50365037 - `"completed"`50385039 - `"incomplete"`50405041 - `type: "program_output"`50425043 The type of the item. Always `program_output`.50445045 - `"program_output"`50465047 - `FunctionCall object { arguments, call_id, name, 6 more }`50485049 A tool call to run a function. See the5050 [function calling guide](/api/docs/guides/function-calling) for more information.50515052 - `arguments: string`50535054 A JSON string of the arguments to pass to the function.50555056 - `call_id: string`50575058 The unique ID of the function tool call generated by the model.50595060 - `name: string`50615062 The name of the function to run.50635064 - `type: "function_call"`50655066 The type of the function tool call. Always `function_call`.50675068 - `"function_call"`50695070 - `id: optional string`50715072 The unique ID of the function tool call.50735074 - `async: optional boolean`50755076 Whether the function tool call runs asynchronously.50775078 - `caller: optional object { type } or object { caller_id, type } or null`50795080 The execution context that produced this tool call.50815082 - `Direct object { type }`50835084 - `type: "direct"`50855086 - `"direct"`50875088 - `Program object { caller_id, type }`50895090 - `caller_id: string`50915092 The call ID of the program item that produced this tool call.50935094 - `type: "program"`50955096 - `"program"`50975098 - `namespace: optional string`50995100 The namespace of the function to run.51015102 - `status: optional "in_progress" or "completed" or "incomplete"`51035104 The status of the item. One of `in_progress`, `completed`, or5105 `incomplete`. Populated when items are returned via API.51065107 - `"in_progress"`51085109 - `"completed"`51105111 - `"incomplete"`51125113 - `ToolSearchCall object { id, arguments, call_id, 4 more }`51145115 - `id: string`51165117 The unique ID of the tool search call item.51185119 - `arguments: unknown`51205121 Arguments used for the tool search call.51225123 - `call_id: string or null`51245125 The unique ID of the tool search call generated by the model.51265127 - `execution: "server" or "client"`51285129 Whether tool search was executed by the server or by the client.51305131 - `"server"`51325133 - `"client"`51345135 - `status: "in_progress" or "completed" or "incomplete"`51365137 The status of the tool search call item that was recorded.51385139 - `"in_progress"`51405141 - `"completed"`51425143 - `"incomplete"`51445145 - `type: "tool_search_call"`51465147 The type of the item. Always `tool_search_call`.51485149 - `"tool_search_call"`51505151 - `created_by: optional string`51525153 The identifier of the actor that created the item.51545155 - `ToolSearchOutput object { id, call_id, execution, 4 more }`51565157 - `id: string`51585159 The unique ID of the tool search output item.51605161 - `call_id: string or null`51625163 The unique ID of the tool search call generated by the model.51645165 - `execution: "server" or "client"`51665167 Whether tool search was executed by the server or by the client.51685169 - `"server"`51705171 - `"client"`51725173 - `status: "in_progress" or "completed" or "incomplete"`51745175 The status of the tool search output item that was recorded.51765177 - `"in_progress"`51785179 - `"completed"`51805181 - `"incomplete"`51825183 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`51845185 The loaded tool definitions returned by tool search.51865187 - `Function object { name, parameters, strict, 6 more }`51885189 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).51905191 - `name: string`51925193 The name of the function to call.51945195 - `parameters: map[unknown] or null`51965197 A JSON schema object describing the parameters of the function.51985199 - `strict: boolean or null`52005201 Whether strict parameter validation is enforced for this function tool.52025203 - `type: "function"`52045205 The type of the function tool. Always `function`.52065207 - `"function"`52085209 - `allowed_callers: optional array of "direct" or "programmatic" or null`52105211 The tool invocation context(s).52125213 - `"direct"`52145215 - `"programmatic"`52165217 - `async: optional boolean`52185219 - `defer_loading: optional boolean`52205221 Whether this function is deferred and loaded via tool search.52225223 - `description: optional string or null`52245225 A description of the function. Used by the model to determine whether or not to call the function.52265227 - `output_schema: optional map[unknown] or null`52285229 A JSON schema object describing the JSON value encoded in string outputs for this function.52305231 - `FileSearch object { type, vector_store_ids, filters, 2 more }`52325233 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).52345235 - `type: "file_search"`52365237 The type of the file search tool. Always `file_search`.52385239 - `"file_search"`52405241 - `vector_store_ids: array of string`52425243 The IDs of the vector stores to search.52445245 - `filters: optional ComparisonFilter or CompoundFilter or null`52465247 A filter to apply.52485249 - `ComparisonFilter object { key, type, value }`52505251 A filter used to compare a specified attribute key to a given value using a defined comparison operation.52525253 - `key: string`52545255 The key to compare against the value.52565257 - `type: "eq" or "ne" or "gt" or 5 more`52585259 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.52605261 - `eq`: equals5262 - `ne`: not equal5263 - `gt`: greater than5264 - `gte`: greater than or equal5265 - `lt`: less than5266 - `lte`: less than or equal5267 - `in`: in5268 - `nin`: not in52695270 - `"eq"`52715272 - `"ne"`52735274 - `"gt"`52755276 - `"gte"`52775278 - `"lt"`52795280 - `"lte"`52815282 - `"in"`52835284 - `"nin"`52855286 - `value: string or number or boolean or array of string or number`52875288 The value to compare against the attribute key; supports string, number, or boolean types.52895290 - `string`52915292 - `number`52935294 - `boolean`52955296 - `array of string or number`52975298 - `string`52995300 - `number`53015302 - `CompoundFilter object { filters, type }`53035304 Combine multiple filters using `and` or `or`.53055306 - `filters: array of ComparisonFilter or unknown`53075308 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.53095310 - `ComparisonFilter object { key, type, value }`53115312 A filter used to compare a specified attribute key to a given value using a defined comparison operation.53135314 - `unknown`53155316 - `type: "and" or "or"`53175318 Type of operation: `and` or `or`.53195320 - `"and"`53215322 - `"or"`53235324 - `max_num_results: optional number`53255326 The maximum number of results to return. This number should be between 1 and 50 inclusive.53275328 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`53295330 Ranking options for search.53315332 - `hybrid_search: optional object { embedding_weight, text_weight }`53335334 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.53355336 - `embedding_weight: number`53375338 The weight of the embedding in the reciprocal ranking fusion.53395340 - `text_weight: number`53415342 The weight of the text in the reciprocal ranking fusion.53435344 - `ranker: optional "auto" or "default-2024-11-15"`53455346 The ranker to use for the file search.53475348 - `"auto"`53495350 - `"default-2024-11-15"`53515352 - `score_threshold: optional number`53535354 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.53555356 - `Computer object { type }`53575358 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).53595360 - `type: "computer"`53615362 The type of the computer tool. Always `computer`.53635364 - `"computer"`53655366 - `ComputerUsePreview object { display_height, display_width, environment, type }`53675368 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).53695370 - `display_height: number`53715372 The height of the computer display.53735374 - `display_width: number`53755376 The width of the computer display.53775378 - `environment: "windows" or "mac" or "linux" or 2 more`53795380 The type of computer environment to control.53815382 - `"windows"`53835384 - `"mac"`53855386 - `"linux"`53875388 - `"ubuntu"`53895390 - `"browser"`53915392 - `type: "computer_use_preview"`53935394 The type of the computer use tool. Always `computer_use_preview`.53955396 - `"computer_use_preview"`53975398 - `WebSearch object { type, external_web_access, filters, 2 more }`53995400 Search the Internet for sources related to the prompt. Learn more about the5401 [web search tool](/api/docs/guides/tools-web-search).54025403 - `type: "web_search" or "web_search_2025_08_26"`54045405 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.54065407 - `"web_search"`54085409 - `"web_search_2025_08_26"`54105411 - `external_web_access: optional boolean`54125413 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.54145415 - `filters: optional object { allowed_domains } or null`54165417 Filters for the search.54185419 - `allowed_domains: optional array of string or null`54205421 Allowed domains for the search. If not provided, all domains are allowed.5422 Subdomains of the provided domains are allowed as well.54235424 Example: `["pubmed.ncbi.nlm.nih.gov"]`54255426 - `search_context_size: optional "low" or "medium" or "high"`54275428 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.54295430 - `"low"`54315432 - `"medium"`54335434 - `"high"`54355436 - `user_location: optional object { city, country, region, 2 more } or null`54375438 The approximate location of the user.54395440 - `city: optional string or null`54415442 Free text input for the city of the user, e.g. `San Francisco`.54435444 - `country: optional string or null`54455446 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.54475448 - `region: optional string or null`54495450 Free text input for the region of the user, e.g. `California`.54515452 - `timezone: optional string or null`54535454 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.54555456 - `type: optional "approximate"`54575458 The type of location approximation. Always `approximate`.54595460 - `"approximate"`54615462 - `Mcp object { server_label, type, allowed_callers, 9 more }`54635464 Give the model access to additional tools via remote Model Context Protocol5465 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).54665467 - `server_label: string`54685469 A label for this MCP server, used to identify it in tool calls.54705471 - `type: "mcp"`54725473 The type of the MCP tool. Always `mcp`.54745475 - `"mcp"`54765477 - `allowed_callers: optional array of "direct" or "programmatic" or null`54785479 The tool invocation context(s).54805481 - `"direct"`54825483 - `"programmatic"`54845485 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`54865487 List of allowed tool names or a filter object.54885489 - `McpAllowedTools = array of string`54905491 A string array of allowed tool names54925493 - `McpToolFilter object { read_only, tool_names }`54945495 A filter object to specify which tools are allowed.54965497 - `read_only: optional boolean`54985499 Indicates whether or not a tool modifies data or is read-only. If an5500 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5501 it will match this filter.55025503 - `tool_names: optional array of string`55045505 List of allowed tool names.55065507 - `authorization: optional string`55085509 An OAuth access token that can be used with a remote MCP server, either5510 with a custom MCP server URL or a service connector. Your application5511 must handle the OAuth authorization flow and provide the token here.55125513 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`55145515 Identifier for service connectors, like those available in ChatGPT. One of5516 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more5517 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).55185519 This field is deprecated for models released after September 1, 2026.5520 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to5521 connect through a Secure MCP Tunnel.55225523 Currently supported `connector_id` values are:55245525 - Dropbox: `connector_dropbox`5526 - Gmail: `connector_gmail`5527 - Google Calendar: `connector_googlecalendar`5528 - Google Drive: `connector_googledrive`5529 - Microsoft Teams: `connector_microsoftteams`5530 - Outlook Calendar: `connector_outlookcalendar`5531 - Outlook Email: `connector_outlookemail`5532 - SharePoint: `connector_sharepoint`55335534 - `"connector_dropbox"`55355536 - `"connector_gmail"`55375538 - `"connector_googlecalendar"`55395540 - `"connector_googledrive"`55415542 - `"connector_microsoftteams"`55435544 - `"connector_outlookcalendar"`55455546 - `"connector_outlookemail"`55475548 - `"connector_sharepoint"`55495550 - `defer_loading: optional boolean`55515552 Whether this MCP tool is deferred and discovered via tool search.55535554 - `headers: optional map[string] or null`55555556 Optional HTTP headers to send to the MCP server. Use for authentication5557 or other purposes.55585559 - `require_approval: optional object { always, never } or "always" or "never" or null`55605561 Specify which of the MCP server's tools require approval.55625563 - `McpToolApprovalFilter object { always, never }`55645565 Specify which of the MCP server's tools require approval. Can be5566 `always`, `never`, or a filter object associated with tools5567 that require approval.55685569 - `always: optional object { read_only, tool_names }`55705571 A filter object to specify which tools are allowed.55725573 - `read_only: optional boolean`55745575 Indicates whether or not a tool modifies data or is read-only. If an5576 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5577 it will match this filter.55785579 - `tool_names: optional array of string`55805581 List of allowed tool names.55825583 - `never: optional object { read_only, tool_names }`55845585 A filter object to specify which tools are allowed.55865587 - `read_only: optional boolean`55885589 Indicates whether or not a tool modifies data or is read-only. If an5590 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5591 it will match this filter.55925593 - `tool_names: optional array of string`55945595 List of allowed tool names.55965597 - `McpToolApprovalSetting = "always" or "never"`55985599 Specify a single approval policy for all tools. One of `always` or5600 `never`. When set to `always`, all tools will require approval. When5601 set to `never`, all tools will not require approval.56025603 - `"always"`56045605 - `"never"`56065607 - `server_description: optional string`56085609 Optional description of the MCP server, used to provide more context.56105611 - `server_url: optional string`56125613 The URL for the MCP server. One of `server_url`, `connector_id`, or5614 `tunnel_id` must be provided.56155616 - `tunnel_id: optional string`56175618 The Secure MCP Tunnel ID to use instead of a direct server URL. One of5619 `server_url`, `connector_id`, or `tunnel_id` must be provided.56205621 - `CodeInterpreter object { container, type, allowed_callers }`56225623 A tool that runs Python code to help generate a response to a prompt.56245625 - `container: string or object { type, file_ids, memory_limit, network_policy }`56265627 The code interpreter container. Can be a container ID or an object that5628 specifies uploaded file IDs to make available to your code, along with an5629 optional `memory_limit` setting.56305631 - `string`56325633 The container ID.56345635 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`56365637 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.56385639 - `type: "auto"`56405641 Always `auto`.56425643 - `"auto"`56445645 - `file_ids: optional array of string`56465647 An optional list of uploaded files to make available to your code.56485649 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`56505651 The memory limit for the code interpreter container.56525653 - `"1g"`56545655 - `"4g"`56565657 - `"16g"`56585659 - `"64g"`56605661 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`56625663 Network access policy for the container.56645665 - `ContainerNetworkPolicyDisabled object { type }`56665667 - `type: "disabled"`56685669 Disable outbound network access. Always `disabled`.56705671 - `"disabled"`56725673 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`56745675 - `allowed_domains: array of string`56765677 A list of allowed domains when type is `allowlist`.56785679 - `type: "allowlist"`56805681 Allow outbound network access only to specified domains. Always `allowlist`.56825683 - `"allowlist"`56845685 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`56865687 Optional domain-scoped secrets for allowlisted domains.56885689 - `domain: string`56905691 The domain associated with the secret.56925693 - `name: string`56945695 The name of the secret to inject for the domain.56965697 - `value: string`56985699 The secret value to inject for the domain.57005701 - `type: "code_interpreter"`57025703 The type of the code interpreter tool. Always `code_interpreter`.57045705 - `"code_interpreter"`57065707 - `allowed_callers: optional array of "direct" or "programmatic" or null`57085709 The tool invocation context(s).57105711 - `"direct"`57125713 - `"programmatic"`57145715 - `ProgrammaticToolCalling object { type }`57165717 - `type: "programmatic_tool_calling"`57185719 The type of the tool. Always `programmatic_tool_calling`.57205721 - `"programmatic_tool_calling"`57225723 - `ImageGeneration object { type, action, background, 9 more }`57245725 A tool that generates images using the GPT image models.57265727 - `type: "image_generation"`57285729 The type of the image generation tool. Always `image_generation`.57305731 - `"image_generation"`57325733 - `action: optional "generate" or "edit" or "auto"`57345735 Whether to generate a new image or edit an existing image. Default: `auto`.57365737 - `"generate"`57385739 - `"edit"`57405741 - `"auto"`57425743 - `background: optional "transparent" or "opaque" or "auto"`57445745 Set the background of the generated image. One of `transparent`, `opaque`,5746 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including5747 their `2026-09-08` snapshots, support `opaque` and `transparent`5748 backgrounds. Transparent backgrounds are available for supported GPT Image5749 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in5750 preview. When using `transparent`, set the output format to `png` or `webp`.5751 Default: `auto`.57525753 - `"transparent"`57545755 - `"opaque"`57565757 - `"auto"`57585759 - `input_fidelity: optional "high" or "low" or null`57605761 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`.57625763 - `"high"`57645765 - `"low"`57665767 - `input_image_mask: optional object { file_id, image_url }`57685769 Optional mask for inpainting. Contains `image_url`5770 (string, optional) and `file_id` (string, optional).57715772 - `file_id: optional string`57735774 File ID for the mask image.57755776 - `image_url: optional string`57775778 Base64-encoded mask image.57795780 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`57815782 The image generation model to use. One of `gpt-image-1`,5783 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5784 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5785 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5786 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5787 `gpt-image-1`.57885789 - `string`57905791 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`57925793 The image generation model to use. One of `gpt-image-1`,5794 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5795 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5796 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5797 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5798 `gpt-image-1`.57995800 - `"gpt-image-1"`58015802 - `"gpt-image-1-mini"`58035804 - `"gpt-image-1.5"`58055806 - `"gpt-image-2"`58075808 - `"gpt-image-2-2026-04-21"`58095810 - `"gpt-image-2.5-sunburst"`58115812 - `"gpt-image-2.5-sunburst-2026-09-08"`58135814 - `"gpt-image-2.5-flare"`58155816 - `"gpt-image-2.5-flare-2026-09-08"`58175818 - `moderation: optional "auto" or "low"`58195820 Moderation level for the generated image. Default: `auto`.58215822 - `"auto"`58235824 - `"low"`58255826 - `output_compression: optional number`58275828 Compression level for the output image. Default: 100.58295830 - `output_format: optional "png" or "webp" or "jpeg"`58315832 The output format of the generated image. One of `png`, `webp`, or5833 `jpeg`. Default: `png`.58345835 - `"png"`58365837 - `"webp"`58385839 - `"jpeg"`58405841 - `partial_images: optional number`58425843 Number of partial images to generate in streaming mode, from 0 (default value) to 3.58445845 - `quality: optional "low" or "medium" or "high" or 3 more`58465847 The quality of the generated image. The GPT image models support `low`,5848 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,5849 including their `2026-09-08` snapshots, also support `xhigh` and `max`.5850 Default: `auto`.58515852 - `"low"`58535854 - `"medium"`58555856 - `"high"`58575858 - `"xhigh"`58595860 - `"max"`58615862 - `"auto"`58635864 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`58655866 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`.58675868 - `string`58695870 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`58715872 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`.58735874 - `"1024x1024"`58755876 - `"1024x1536"`58775878 - `"1536x1024"`58795880 - `"auto"`58815882 - `LocalShell object { type }`58835884 A tool that allows the model to execute shell commands in a local environment.58855886 - `type: "local_shell"`58875888 The type of the local shell tool. Always `local_shell`.58895890 - `"local_shell"`58915892 - `Shell object { type, allowed_callers, environment }`58935894 A tool that allows the model to execute shell commands.58955896 - `type: "shell"`58975898 The type of the shell tool. Always `shell`.58995900 - `"shell"`59015902 - `allowed_callers: optional array of "direct" or "programmatic" or null`59035904 The tool invocation context(s).59055906 - `"direct"`59075908 - `"programmatic"`59095910 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`59115912 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`59135914 - `type: "container_auto"`59155916 Automatically creates a container for this request59175918 - `"container_auto"`59195920 - `file_ids: optional array of string`59215922 An optional list of uploaded files to make available to your code.59235924 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`59255926 The memory limit for the container.59275928 - `"1g"`59295930 - `"4g"`59315932 - `"16g"`59335934 - `"64g"`59355936 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`59375938 Network access policy for the container.59395940 - `ContainerNetworkPolicyDisabled object { type }`59415942 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`59435944 - `skills: optional array of SkillReference or InlineSkill`59455946 An optional list of skills referenced by id or inline data.59475948 - `SkillReference object { skill_id, type, version }`59495950 - `skill_id: string`59515952 The ID of the referenced skill.59535954 - `type: "skill_reference"`59555956 References a skill created with the /v1/skills endpoint.59575958 - `"skill_reference"`59595960 - `version: optional string`59615962 Optional skill version. Use a positive integer or 'latest'. Omit for default.59635964 - `InlineSkill object { description, name, source, type }`59655966 - `description: string`59675968 The description of the skill.59695970 - `name: string`59715972 The name of the skill.59735974 - `source: InlineSkillSource`59755976 Inline skill payload59775978 - `data: string`59795980 Base64-encoded skill zip bundle.59815982 - `media_type: "application/zip"`59835984 The media type of the inline skill payload. Must be `application/zip`.59855986 - `"application/zip"`59875988 - `type: "base64"`59895990 The type of the inline skill source. Must be `base64`.59915992 - `"base64"`59935994 - `type: "inline"`59955996 Defines an inline skill for this request.59975998 - `"inline"`59996000 - `LocalEnvironment object { type, skills }`60016002 - `type: "local"`60036004 Use a local computer environment.60056006 - `"local"`60076008 - `skills: optional array of LocalSkill`60096010 An optional list of skills.60116012 - `description: string`60136014 The description of the skill.60156016 - `name: string`60176018 The name of the skill.60196020 - `path: string`60216022 The path to the directory containing the skill.60236024 - `ContainerReference object { container_id, type }`60256026 - `container_id: string`60276028 The ID of the referenced container.60296030 - `type: "container_reference"`60316032 References a container created with the /v1/containers endpoint60336034 - `"container_reference"`60356036 - `Custom object { name, type, allowed_callers, 4 more }`60376038 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)60396040 - `name: string`60416042 The name of the custom tool, used to identify it in tool calls.60436044 - `type: "custom"`60456046 The type of the custom tool. Always `custom`.60476048 - `"custom"`60496050 - `allowed_callers: optional array of "direct" or "programmatic" or null`60516052 The tool invocation context(s).60536054 - `"direct"`60556056 - `"programmatic"`60576058 - `async: optional boolean`60596060 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.60616062 - `defer_loading: optional boolean`60636064 Whether this tool should be deferred and discovered via tool search.60656066 - `description: optional string`60676068 Optional description of the custom tool, used to provide more context.60696070 - `format: optional CustomToolInputFormat`60716072 The input format for the custom tool. Default is unconstrained text.60736074 - `Text object { type }`60756076 Unconstrained free-form text.60776078 - `type: "text"`60796080 Unconstrained text format. Always `text`.60816082 - `"text"`60836084 - `Grammar object { definition, syntax, type }`60856086 A grammar defined by the user.60876088 - `definition: string`60896090 The grammar definition.60916092 - `syntax: "lark" or "regex"`60936094 The syntax of the grammar definition. One of `lark` or `regex`.60956096 - `"lark"`60976098 - `"regex"`60996100 - `type: "grammar"`61016102 Grammar format. Always `grammar`.61036104 - `"grammar"`61056106 - `Namespace object { description, name, tools, type }`61076108 Groups function/custom tools under a shared namespace.61096110 - `description: string`61116112 A description of the namespace shown to the model.61136114 - `name: string`61156116 The namespace name used in tool calls (for example, `crm`).61176118 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`61196120 The function/custom tools available inside this namespace.61216122 - `Function object { name, type, allowed_callers, 6 more }`61236124 - `name: string`61256126 - `type: "function"`61276128 - `"function"`61296130 - `allowed_callers: optional array of "direct" or "programmatic" or null`61316132 The tool invocation context(s).61336134 - `"direct"`61356136 - `"programmatic"`61376138 - `async: optional boolean`61396140 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.61416142 - `defer_loading: optional boolean`61436144 Whether this function should be deferred and discovered via tool search.61456146 - `description: optional string or null`61476148 - `output_schema: optional map[unknown] or null`61496150 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.61516152 - `parameters: optional unknown or null`61536154 - `strict: optional boolean or null`61556156 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.61576158 - `Custom object { name, type, allowed_callers, 4 more }`61596160 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)61616162 - `name: string`61636164 The name of the custom tool, used to identify it in tool calls.61656166 - `type: "custom"`61676168 The type of the custom tool. Always `custom`.61696170 - `"custom"`61716172 - `allowed_callers: optional array of "direct" or "programmatic" or null`61736174 The tool invocation context(s).61756176 - `"direct"`61776178 - `"programmatic"`61796180 - `async: optional boolean`61816182 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.61836184 - `defer_loading: optional boolean`61856186 Whether this tool should be deferred and discovered via tool search.61876188 - `description: optional string`61896190 Optional description of the custom tool, used to provide more context.61916192 - `format: optional CustomToolInputFormat`61936194 The input format for the custom tool. Default is unconstrained text.61956196 - `type: "namespace"`61976198 The type of the tool. Always `namespace`.61996200 - `"namespace"`62016202 - `ToolSearch object { type, description, execution, parameters }`62036204 Hosted or BYOT tool search configuration for deferred tools.62056206 - `type: "tool_search"`62076208 The type of the tool. Always `tool_search`.62096210 - `"tool_search"`62116212 - `description: optional string or null`62136214 Description shown to the model for a client-executed tool search tool.62156216 - `execution: optional "server" or "client"`62176218 Whether tool search is executed by the server or by the client.62196220 - `"server"`62216222 - `"client"`62236224 - `parameters: optional unknown or null`62256226 Parameter schema for a client-executed tool search tool.62276228 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`62296230 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).62316232 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`62336234 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.62356236 - `"web_search_preview"`62376238 - `"web_search_preview_2025_03_11"`62396240 - `search_content_types: optional array of "text" or "image"`62416242 - `"text"`62436244 - `"image"`62456246 - `search_context_size: optional "low" or "medium" or "high"`62476248 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.62496250 - `"low"`62516252 - `"medium"`62536254 - `"high"`62556256 - `user_location: optional object { type, city, country, 2 more } or null`62576258 The user's location.62596260 - `type: "approximate"`62616262 The type of location approximation. Always `approximate`.62636264 - `"approximate"`62656266 - `city: optional string or null`62676268 Free text input for the city of the user, e.g. `San Francisco`.62696270 - `country: optional string or null`62716272 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.62736274 - `region: optional string or null`62756276 Free text input for the region of the user, e.g. `California`.62776278 - `timezone: optional string or null`62796280 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.62816282 - `ApplyPatch object { type, allowed_callers }`62836284 Allows the assistant to create, delete, or update files using unified diffs.62856286 - `type: "apply_patch"`62876288 The type of the tool. Always `apply_patch`.62896290 - `"apply_patch"`62916292 - `allowed_callers: optional array of "direct" or "programmatic" or null`62936294 The tool invocation context(s).62956296 - `"direct"`62976298 - `"programmatic"`62996300 - `type: "tool_search_output"`63016302 The type of the item. Always `tool_search_output`.63036304 - `"tool_search_output"`63056306 - `created_by: optional string`63076308 The identifier of the actor that created the item.63096310 - `AdditionalTools object { id, role, tools, type }`63116312 - `id: string`63136314 The unique ID of the additional tools item.63156316 - `role: "unknown" or "user" or "assistant" or 5 more`63176318 The role that provided the additional tools.63196320 - `"unknown"`63216322 - `"user"`63236324 - `"assistant"`63256326 - `"system"`63276328 - `"critic"`63296330 - `"discriminator"`63316332 - `"developer"`63336334 - `"tool"`63356336 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`63376338 The additional tool definitions made available at this item.63396340 - `Function object { name, parameters, strict, 6 more }`63416342 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).63436344 - `name: string`63456346 The name of the function to call.63476348 - `parameters: map[unknown] or null`63496350 A JSON schema object describing the parameters of the function.63516352 - `strict: boolean or null`63536354 Whether strict parameter validation is enforced for this function tool.63556356 - `type: "function"`63576358 The type of the function tool. Always `function`.63596360 - `"function"`63616362 - `allowed_callers: optional array of "direct" or "programmatic" or null`63636364 The tool invocation context(s).63656366 - `"direct"`63676368 - `"programmatic"`63696370 - `async: optional boolean`63716372 - `defer_loading: optional boolean`63736374 Whether this function is deferred and loaded via tool search.63756376 - `description: optional string or null`63776378 A description of the function. Used by the model to determine whether or not to call the function.63796380 - `output_schema: optional map[unknown] or null`63816382 A JSON schema object describing the JSON value encoded in string outputs for this function.63836384 - `FileSearch object { type, vector_store_ids, filters, 2 more }`63856386 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).63876388 - `type: "file_search"`63896390 The type of the file search tool. Always `file_search`.63916392 - `"file_search"`63936394 - `vector_store_ids: array of string`63956396 The IDs of the vector stores to search.63976398 - `filters: optional ComparisonFilter or CompoundFilter or null`63996400 A filter to apply.64016402 - `ComparisonFilter object { key, type, value }`64036404 A filter used to compare a specified attribute key to a given value using a defined comparison operation.64056406 - `CompoundFilter object { filters, type }`64076408 Combine multiple filters using `and` or `or`.64096410 - `max_num_results: optional number`64116412 The maximum number of results to return. This number should be between 1 and 50 inclusive.64136414 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`64156416 Ranking options for search.64176418 - `hybrid_search: optional object { embedding_weight, text_weight }`64196420 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.64216422 - `embedding_weight: number`64236424 The weight of the embedding in the reciprocal ranking fusion.64256426 - `text_weight: number`64276428 The weight of the text in the reciprocal ranking fusion.64296430 - `ranker: optional "auto" or "default-2024-11-15"`64316432 The ranker to use for the file search.64336434 - `"auto"`64356436 - `"default-2024-11-15"`64376438 - `score_threshold: optional number`64396440 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.64416442 - `Computer object { type }`64436444 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).64456446 - `type: "computer"`64476448 The type of the computer tool. Always `computer`.64496450 - `"computer"`64516452 - `ComputerUsePreview object { display_height, display_width, environment, type }`64536454 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).64556456 - `display_height: number`64576458 The height of the computer display.64596460 - `display_width: number`64616462 The width of the computer display.64636464 - `environment: "windows" or "mac" or "linux" or 2 more`64656466 The type of computer environment to control.64676468 - `"windows"`64696470 - `"mac"`64716472 - `"linux"`64736474 - `"ubuntu"`64756476 - `"browser"`64776478 - `type: "computer_use_preview"`64796480 The type of the computer use tool. Always `computer_use_preview`.64816482 - `"computer_use_preview"`64836484 - `WebSearch object { type, external_web_access, filters, 2 more }`64856486 Search the Internet for sources related to the prompt. Learn more about the6487 [web search tool](/api/docs/guides/tools-web-search).64886489 - `type: "web_search" or "web_search_2025_08_26"`64906491 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.64926493 - `"web_search"`64946495 - `"web_search_2025_08_26"`64966497 - `external_web_access: optional boolean`64986499 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.65006501 - `filters: optional object { allowed_domains } or null`65026503 Filters for the search.65046505 - `allowed_domains: optional array of string or null`65066507 Allowed domains for the search. If not provided, all domains are allowed.6508 Subdomains of the provided domains are allowed as well.65096510 Example: `["pubmed.ncbi.nlm.nih.gov"]`65116512 - `search_context_size: optional "low" or "medium" or "high"`65136514 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.65156516 - `"low"`65176518 - `"medium"`65196520 - `"high"`65216522 - `user_location: optional object { city, country, region, 2 more } or null`65236524 The approximate location of the user.65256526 - `city: optional string or null`65276528 Free text input for the city of the user, e.g. `San Francisco`.65296530 - `country: optional string or null`65316532 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.65336534 - `region: optional string or null`65356536 Free text input for the region of the user, e.g. `California`.65376538 - `timezone: optional string or null`65396540 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.65416542 - `type: optional "approximate"`65436544 The type of location approximation. Always `approximate`.65456546 - `"approximate"`65476548 - `Mcp object { server_label, type, allowed_callers, 9 more }`65496550 Give the model access to additional tools via remote Model Context Protocol6551 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).65526553 - `server_label: string`65546555 A label for this MCP server, used to identify it in tool calls.65566557 - `type: "mcp"`65586559 The type of the MCP tool. Always `mcp`.65606561 - `"mcp"`65626563 - `allowed_callers: optional array of "direct" or "programmatic" or null`65646565 The tool invocation context(s).65666567 - `"direct"`65686569 - `"programmatic"`65706571 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`65726573 List of allowed tool names or a filter object.65746575 - `McpAllowedTools = array of string`65766577 A string array of allowed tool names65786579 - `McpToolFilter object { read_only, tool_names }`65806581 A filter object to specify which tools are allowed.65826583 - `read_only: optional boolean`65846585 Indicates whether or not a tool modifies data or is read-only. If an6586 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6587 it will match this filter.65886589 - `tool_names: optional array of string`65906591 List of allowed tool names.65926593 - `authorization: optional string`65946595 An OAuth access token that can be used with a remote MCP server, either6596 with a custom MCP server URL or a service connector. Your application6597 must handle the OAuth authorization flow and provide the token here.65986599 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`66006601 Identifier for service connectors, like those available in ChatGPT. One of6602 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more6603 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).66046605 This field is deprecated for models released after September 1, 2026.6606 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to6607 connect through a Secure MCP Tunnel.66086609 Currently supported `connector_id` values are:66106611 - Dropbox: `connector_dropbox`6612 - Gmail: `connector_gmail`6613 - Google Calendar: `connector_googlecalendar`6614 - Google Drive: `connector_googledrive`6615 - Microsoft Teams: `connector_microsoftteams`6616 - Outlook Calendar: `connector_outlookcalendar`6617 - Outlook Email: `connector_outlookemail`6618 - SharePoint: `connector_sharepoint`66196620 - `"connector_dropbox"`66216622 - `"connector_gmail"`66236624 - `"connector_googlecalendar"`66256626 - `"connector_googledrive"`66276628 - `"connector_microsoftteams"`66296630 - `"connector_outlookcalendar"`66316632 - `"connector_outlookemail"`66336634 - `"connector_sharepoint"`66356636 - `defer_loading: optional boolean`66376638 Whether this MCP tool is deferred and discovered via tool search.66396640 - `headers: optional map[string] or null`66416642 Optional HTTP headers to send to the MCP server. Use for authentication6643 or other purposes.66446645 - `require_approval: optional object { always, never } or "always" or "never" or null`66466647 Specify which of the MCP server's tools require approval.66486649 - `McpToolApprovalFilter object { always, never }`66506651 Specify which of the MCP server's tools require approval. Can be6652 `always`, `never`, or a filter object associated with tools6653 that require approval.66546655 - `always: optional object { read_only, tool_names }`66566657 A filter object to specify which tools are allowed.66586659 - `read_only: optional boolean`66606661 Indicates whether or not a tool modifies data or is read-only. If an6662 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6663 it will match this filter.66646665 - `tool_names: optional array of string`66666667 List of allowed tool names.66686669 - `never: optional object { read_only, tool_names }`66706671 A filter object to specify which tools are allowed.66726673 - `read_only: optional boolean`66746675 Indicates whether or not a tool modifies data or is read-only. If an6676 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6677 it will match this filter.66786679 - `tool_names: optional array of string`66806681 List of allowed tool names.66826683 - `McpToolApprovalSetting = "always" or "never"`66846685 Specify a single approval policy for all tools. One of `always` or6686 `never`. When set to `always`, all tools will require approval. When6687 set to `never`, all tools will not require approval.66886689 - `"always"`66906691 - `"never"`66926693 - `server_description: optional string`66946695 Optional description of the MCP server, used to provide more context.66966697 - `server_url: optional string`66986699 The URL for the MCP server. One of `server_url`, `connector_id`, or6700 `tunnel_id` must be provided.67016702 - `tunnel_id: optional string`67036704 The Secure MCP Tunnel ID to use instead of a direct server URL. One of6705 `server_url`, `connector_id`, or `tunnel_id` must be provided.67066707 - `CodeInterpreter object { container, type, allowed_callers }`67086709 A tool that runs Python code to help generate a response to a prompt.67106711 - `container: string or object { type, file_ids, memory_limit, network_policy }`67126713 The code interpreter container. Can be a container ID or an object that6714 specifies uploaded file IDs to make available to your code, along with an6715 optional `memory_limit` setting.67166717 - `string`67186719 The container ID.67206721 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`67226723 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.67246725 - `type: "auto"`67266727 Always `auto`.67286729 - `"auto"`67306731 - `file_ids: optional array of string`67326733 An optional list of uploaded files to make available to your code.67346735 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`67366737 The memory limit for the code interpreter container.67386739 - `"1g"`67406741 - `"4g"`67426743 - `"16g"`67446745 - `"64g"`67466747 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`67486749 Network access policy for the container.67506751 - `ContainerNetworkPolicyDisabled object { type }`67526753 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`67546755 - `type: "code_interpreter"`67566757 The type of the code interpreter tool. Always `code_interpreter`.67586759 - `"code_interpreter"`67606761 - `allowed_callers: optional array of "direct" or "programmatic" or null`67626763 The tool invocation context(s).67646765 - `"direct"`67666767 - `"programmatic"`67686769 - `ProgrammaticToolCalling object { type }`67706771 - `type: "programmatic_tool_calling"`67726773 The type of the tool. Always `programmatic_tool_calling`.67746775 - `"programmatic_tool_calling"`67766777 - `ImageGeneration object { type, action, background, 9 more }`67786779 A tool that generates images using the GPT image models.67806781 - `type: "image_generation"`67826783 The type of the image generation tool. Always `image_generation`.67846785 - `"image_generation"`67866787 - `action: optional "generate" or "edit" or "auto"`67886789 Whether to generate a new image or edit an existing image. Default: `auto`.67906791 - `"generate"`67926793 - `"edit"`67946795 - `"auto"`67966797 - `background: optional "transparent" or "opaque" or "auto"`67986799 Set the background of the generated image. One of `transparent`, `opaque`,6800 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including6801 their `2026-09-08` snapshots, support `opaque` and `transparent`6802 backgrounds. Transparent backgrounds are available for supported GPT Image6803 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in6804 preview. When using `transparent`, set the output format to `png` or `webp`.6805 Default: `auto`.68066807 - `"transparent"`68086809 - `"opaque"`68106811 - `"auto"`68126813 - `input_fidelity: optional "high" or "low" or null`68146815 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`.68166817 - `"high"`68186819 - `"low"`68206821 - `input_image_mask: optional object { file_id, image_url }`68226823 Optional mask for inpainting. Contains `image_url`6824 (string, optional) and `file_id` (string, optional).68256826 - `file_id: optional string`68276828 File ID for the mask image.68296830 - `image_url: optional string`68316832 Base64-encoded mask image.68336834 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`68356836 The image generation model to use. One of `gpt-image-1`,6837 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,6838 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,6839 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,6840 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:6841 `gpt-image-1`.68426843 - `string`68446845 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`68466847 The image generation model to use. One of `gpt-image-1`,6848 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,6849 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,6850 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,6851 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:6852 `gpt-image-1`.68536854 - `"gpt-image-1"`68556856 - `"gpt-image-1-mini"`68576858 - `"gpt-image-1.5"`68596860 - `"gpt-image-2"`68616862 - `"gpt-image-2-2026-04-21"`68636864 - `"gpt-image-2.5-sunburst"`68656866 - `"gpt-image-2.5-sunburst-2026-09-08"`68676868 - `"gpt-image-2.5-flare"`68696870 - `"gpt-image-2.5-flare-2026-09-08"`68716872 - `moderation: optional "auto" or "low"`68736874 Moderation level for the generated image. Default: `auto`.68756876 - `"auto"`68776878 - `"low"`68796880 - `output_compression: optional number`68816882 Compression level for the output image. Default: 100.68836884 - `output_format: optional "png" or "webp" or "jpeg"`68856886 The output format of the generated image. One of `png`, `webp`, or6887 `jpeg`. Default: `png`.68886889 - `"png"`68906891 - `"webp"`68926893 - `"jpeg"`68946895 - `partial_images: optional number`68966897 Number of partial images to generate in streaming mode, from 0 (default value) to 3.68986899 - `quality: optional "low" or "medium" or "high" or 3 more`69006901 The quality of the generated image. The GPT image models support `low`,6902 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,6903 including their `2026-09-08` snapshots, also support `xhigh` and `max`.6904 Default: `auto`.69056906 - `"low"`69076908 - `"medium"`69096910 - `"high"`69116912 - `"xhigh"`69136914 - `"max"`69156916 - `"auto"`69176918 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`69196920 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`.69216922 - `string`69236924 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`69256926 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`.69276928 - `"1024x1024"`69296930 - `"1024x1536"`69316932 - `"1536x1024"`69336934 - `"auto"`69356936 - `LocalShell object { type }`69376938 A tool that allows the model to execute shell commands in a local environment.69396940 - `type: "local_shell"`69416942 The type of the local shell tool. Always `local_shell`.69436944 - `"local_shell"`69456946 - `Shell object { type, allowed_callers, environment }`69476948 A tool that allows the model to execute shell commands.69496950 - `type: "shell"`69516952 The type of the shell tool. Always `shell`.69536954 - `"shell"`69556956 - `allowed_callers: optional array of "direct" or "programmatic" or null`69576958 The tool invocation context(s).69596960 - `"direct"`69616962 - `"programmatic"`69636964 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`69656966 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`69676968 - `LocalEnvironment object { type, skills }`69696970 - `ContainerReference object { container_id, type }`69716972 - `Custom object { name, type, allowed_callers, 4 more }`69736974 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)69756976 - `name: string`69776978 The name of the custom tool, used to identify it in tool calls.69796980 - `type: "custom"`69816982 The type of the custom tool. Always `custom`.69836984 - `"custom"`69856986 - `allowed_callers: optional array of "direct" or "programmatic" or null`69876988 The tool invocation context(s).69896990 - `"direct"`69916992 - `"programmatic"`69936994 - `async: optional boolean`69956996 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.69976998 - `defer_loading: optional boolean`69997000 Whether this tool should be deferred and discovered via tool search.70017002 - `description: optional string`70037004 Optional description of the custom tool, used to provide more context.70057006 - `format: optional CustomToolInputFormat`70077008 The input format for the custom tool. Default is unconstrained text.70097010 - `Namespace object { description, name, tools, type }`70117012 Groups function/custom tools under a shared namespace.70137014 - `description: string`70157016 A description of the namespace shown to the model.70177018 - `name: string`70197020 The namespace name used in tool calls (for example, `crm`).70217022 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`70237024 The function/custom tools available inside this namespace.70257026 - `Function object { name, type, allowed_callers, 6 more }`70277028 - `name: string`70297030 - `type: "function"`70317032 - `"function"`70337034 - `allowed_callers: optional array of "direct" or "programmatic" or null`70357036 The tool invocation context(s).70377038 - `"direct"`70397040 - `"programmatic"`70417042 - `async: optional boolean`70437044 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.70457046 - `defer_loading: optional boolean`70477048 Whether this function should be deferred and discovered via tool search.70497050 - `description: optional string or null`70517052 - `output_schema: optional map[unknown] or null`70537054 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.70557056 - `parameters: optional unknown or null`70577058 - `strict: optional boolean or null`70597060 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.70617062 - `Custom object { name, type, allowed_callers, 4 more }`70637064 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)70657066 - `name: string`70677068 The name of the custom tool, used to identify it in tool calls.70697070 - `type: "custom"`70717072 The type of the custom tool. Always `custom`.70737074 - `"custom"`70757076 - `allowed_callers: optional array of "direct" or "programmatic" or null`70777078 The tool invocation context(s).70797080 - `"direct"`70817082 - `"programmatic"`70837084 - `async: optional boolean`70857086 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.70877088 - `defer_loading: optional boolean`70897090 Whether this tool should be deferred and discovered via tool search.70917092 - `description: optional string`70937094 Optional description of the custom tool, used to provide more context.70957096 - `format: optional CustomToolInputFormat`70977098 The input format for the custom tool. Default is unconstrained text.70997100 - `type: "namespace"`71017102 The type of the tool. Always `namespace`.71037104 - `"namespace"`71057106 - `ToolSearch object { type, description, execution, parameters }`71077108 Hosted or BYOT tool search configuration for deferred tools.71097110 - `type: "tool_search"`71117112 The type of the tool. Always `tool_search`.71137114 - `"tool_search"`71157116 - `description: optional string or null`71177118 Description shown to the model for a client-executed tool search tool.71197120 - `execution: optional "server" or "client"`71217122 Whether tool search is executed by the server or by the client.71237124 - `"server"`71257126 - `"client"`71277128 - `parameters: optional unknown or null`71297130 Parameter schema for a client-executed tool search tool.71317132 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`71337134 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).71357136 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`71377138 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.71397140 - `"web_search_preview"`71417142 - `"web_search_preview_2025_03_11"`71437144 - `search_content_types: optional array of "text" or "image"`71457146 - `"text"`71477148 - `"image"`71497150 - `search_context_size: optional "low" or "medium" or "high"`71517152 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.71537154 - `"low"`71557156 - `"medium"`71577158 - `"high"`71597160 - `user_location: optional object { type, city, country, 2 more } or null`71617162 The user's location.71637164 - `type: "approximate"`71657166 The type of location approximation. Always `approximate`.71677168 - `"approximate"`71697170 - `city: optional string or null`71717172 Free text input for the city of the user, e.g. `San Francisco`.71737174 - `country: optional string or null`71757176 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.71777178 - `region: optional string or null`71797180 Free text input for the region of the user, e.g. `California`.71817182 - `timezone: optional string or null`71837184 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.71857186 - `ApplyPatch object { type, allowed_callers }`71877188 Allows the assistant to create, delete, or update files using unified diffs.71897190 - `type: "apply_patch"`71917192 The type of the tool. Always `apply_patch`.71937194 - `"apply_patch"`71957196 - `allowed_callers: optional array of "direct" or "programmatic" or null`71977198 The tool invocation context(s).71997200 - `"direct"`72017202 - `"programmatic"`72037204 - `type: "additional_tools"`72057206 The type of the item. Always `additional_tools`.72077208 - `"additional_tools"`72097210 - `FunctionCallOutput object { output, type, id, 5 more }`72117212 The output of a function tool call.72137214 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`72157216 The output from the function call generated by your code.7217 Can be a string or an list of output content.72187219 - `StringOutput = string`72207221 A string of the output of the function call.72227223 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`72247225 Text, image, or file output of the function call.72267227 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`72287229 A text input to the model.72307231 - `ResponseInputImage object { detail, type, file_id, 2 more }`72327233 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).72347235 - `ResponseInputFile object { type, detail, file_data, 4 more }`72367237 A file input to the model.72387239 - `type: "function_call_output"`72407241 The type of the function tool call output. Always `function_call_output`.72427243 - `"function_call_output"`72447245 - `id: optional string`72467247 The unique ID of the function tool call output. Populated when this item7248 is returned via API.72497250 - `call_id: optional string`72517252 The unique ID of the function tool call generated by the model.72537254 - `caller: optional object { type } or object { caller_id, type } or null`72557256 The execution context that produced this tool call.72577258 - `Direct object { type }`72597260 - `type: "direct"`72617262 The caller type. Always `direct`.72637264 - `"direct"`72657266 - `Program object { caller_id, type }`72677268 - `caller_id: string`72697270 The call ID of the program item that produced this tool call.72717272 - `type: "program"`72737274 The caller type. Always `program`.72757276 - `"program"`72777278 - `name: optional string`72797280 The name of the tool that produced the output.72817282 - `namespace: optional string`72837284 The namespace of the tool that produced the output.72857286 - `status: optional "in_progress" or "completed" or "incomplete"`72877288 The status of the item. One of `in_progress`, `completed`, or7289 `incomplete`. Populated when items are returned via API.72907291 - `"in_progress"`72927293 - `"completed"`72947295 - `"incomplete"`72967297 - `FileSearchCall object { id, queries, status, 2 more }`72987299 The results of a file search tool call. See the7300 [file search guide](/api/docs/guides/tools-file-search) for more information.73017302 - `id: string`73037304 The unique ID of the file search tool call.73057306 - `queries: array of string`73077308 The queries used to search for files.73097310 - `status: "in_progress" or "searching" or "completed" or 2 more`73117312 The status of the file search tool call. One of `in_progress`,7313 `searching`, `incomplete` or `failed`,73147315 - `"in_progress"`73167317 - `"searching"`73187319 - `"completed"`73207321 - `"incomplete"`73227323 - `"failed"`73247325 - `type: "file_search_call"`73267327 The type of the file search tool call. Always `file_search_call`.73287329 - `"file_search_call"`73307331 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`73327333 The results of the file search tool call.73347335 - `attributes: optional map[string or number or boolean] or null`73367337 Set of 16 key-value pairs that can be attached to an object. This can be7338 useful for storing additional information about the object in a structured7339 format, and querying for objects via API or the dashboard. Keys are strings7340 with a maximum length of 64 characters. Values are strings with a maximum7341 length of 512 characters, booleans, or numbers.73427343 - `string`73447345 - `number`73467347 - `boolean`73487349 - `file_id: optional string`73507351 The unique ID of the file.73527353 - `filename: optional string`73547355 The name of the file.73567357 - `score: optional number`73587359 The relevance score of the file - a value between 0 and 1.73607361 - `text: optional string`73627363 The text that was retrieved from the file.73647365 - `WebSearchCall object { id, action, status, type }`73667367 The results of a web search tool call. See the7368 [web search guide](/api/docs/guides/tools-web-search) for more information.73697370 - `id: string`73717372 The unique ID of the web search tool call.73737374 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`73757376 An object describing the specific action taken in this web search call.7377 Includes details on how the model used the web (search, open_page, find_in_page).73787379 - `Search object { type, queries, query, sources }`73807381 Action type "search" - Performs a web search query.73827383 - `type: "search"`73847385 The action type.73867387 - `"search"`73887389 - `queries: optional array of string`73907391 The search queries.73927393 - `query: optional string`73947395 The search query.73967397 - `sources: optional array of object { type, url }`73987399 The sources used in the search.74007401 - `type: "url"`74027403 The type of source. Always `url`.74047405 - `"url"`74067407 - `url: string`74087409 The URL of the source.74107411 - `OpenPage object { type, url }`74127413 Action type "open_page" - Opens a specific URL from search results.74147415 - `type: "open_page"`74167417 The action type.74187419 - `"open_page"`74207421 - `url: optional string or null`74227423 The URL opened by the model.74247425 - `FindInPage object { pattern, type, url }`74267427 Action type "find_in_page": Searches for a pattern within a loaded page.74287429 - `pattern: string`74307431 The pattern or text to search for within the page.74327433 - `type: "find_in_page"`74347435 The action type.74367437 - `"find_in_page"`74387439 - `url: string`74407441 The URL of the page searched for the pattern.74427443 - `status: "in_progress" or "searching" or "completed" or 2 more`74447445 The status of the web search tool call.74467447 - `"in_progress"`74487449 - `"searching"`74507451 - `"completed"`74527453 - `"failed"`74547455 - `"incomplete"`74567457 - `type: "web_search_call"`74587459 The type of the web search tool call. Always `web_search_call`.74607461 - `"web_search_call"`74627463 - `ImageGenerationCall object { id, result, status, 7 more }`74647465 An image generation request made by the model.74667467 - `id: string`74687469 The unique ID of the image generation call.74707471 - `result: string or null`74727473 The generated image encoded in base64.74747475 - `status: "in_progress" or "completed" or "generating" or "failed"`74767477 The status of the image generation call.74787479 - `"in_progress"`74807481 - `"completed"`74827483 - `"generating"`74847485 - `"failed"`74867487 - `type: "image_generation_call"`74887489 The type of the image generation call. Always `image_generation_call`.74907491 - `"image_generation_call"`74927493 - `action: optional "generate" or "edit" or "auto" or null`74947495 The action used for image generation.74967497 - `"generate"`74987499 - `"edit"`75007501 - `"auto"`75027503 - `background: optional "transparent" or "opaque" or "auto" or null`75047505 The background setting used for generation.75067507 - `"transparent"`75087509 - `"opaque"`75107511 - `"auto"`75127513 - `output_format: optional "png" or "webp" or "jpeg" or null`75147515 The output format used for generation.75167517 - `"png"`75187519 - `"webp"`75207521 - `"jpeg"`75227523 - `quality: optional "low" or "medium" or "high" or 3 more or null`75247525 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.75267527 - `"low"`75287529 - `"medium"`75307531 - `"high"`75327533 - `"xhigh"`75347535 - `"max"`75367537 - `"auto"`75387539 - `revised_prompt: optional string or null`75407541 The prompt that was used after any model prompt rewriting.75427543 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`75447545 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.75467547 - `string`75487549 - `"1024x1024" or "1024x1536" or "1536x1024"`75507551 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.75527553 - `"1024x1024"`75547555 - `"1024x1536"`75567557 - `"1536x1024"`75587559 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`75607561 A tool call to a computer use tool. See the7562 [computer use guide](/api/docs/guides/tools-computer-use) for more information.75637564 - `id: string`75657566 The unique ID of the computer call.75677568 - `call_id: string`75697570 An identifier used when responding to the tool call with output.75717572 - `pending_safety_checks: array of object { id, code, message }`75737574 The pending safety checks for the computer call.75757576 - `id: string`75777578 The ID of the pending safety check.75797580 - `code: optional string or null`75817582 The type of the pending safety check.75837584 - `message: optional string or null`75857586 Details about the pending safety check.75877588 - `status: "in_progress" or "completed" or "incomplete"`75897590 The status of the item. One of `in_progress`, `completed`, or7591 `incomplete`. Populated when items are returned via API.75927593 - `"in_progress"`75947595 - `"completed"`75967597 - `"incomplete"`75987599 - `type: "computer_call"`76007601 The type of the computer call. Always `computer_call`.76027603 - `"computer_call"`76047605 - `action: optional ComputerAction`76067607 A click action.76087609 - `Click object { button, type, x, 2 more }`76107611 A click action.76127613 - `button: "left" or "right" or "wheel" or 2 more`76147615 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.76167617 - `"left"`76187619 - `"right"`76207621 - `"wheel"`76227623 - `"back"`76247625 - `"forward"`76267627 - `type: "click"`76287629 Specifies the event type. For a click action, this property is always `click`.76307631 - `"click"`76327633 - `x: number`76347635 The x-coordinate where the click occurred.76367637 - `y: number`76387639 The y-coordinate where the click occurred.76407641 - `keys: optional array of string or null`76427643 The keys being held while clicking.76447645 - `DoubleClick object { keys, type, x, y }`76467647 A double click action.76487649 - `keys: array of string or null`76507651 The keys being held while double-clicking.76527653 - `type: "double_click"`76547655 Specifies the event type. For a double click action, this property is always set to `double_click`.76567657 - `"double_click"`76587659 - `x: number`76607661 The x-coordinate where the double click occurred.76627663 - `y: number`76647665 The y-coordinate where the double click occurred.76667667 - `Drag object { path, type, keys }`76687669 A drag action.76707671 - `path: array of object { x, y }`76727673 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg76747675 ```7676 [7677 { x: 100, y: 200 },7678 { x: 200, y: 300 }7679 ]7680 ```76817682 - `x: number`76837684 The x-coordinate.76857686 - `y: number`76877688 The y-coordinate.76897690 - `type: "drag"`76917692 Specifies the event type. For a drag action, this property is always set to `drag`.76937694 - `"drag"`76957696 - `keys: optional array of string or null`76977698 The keys being held while dragging the mouse.76997700 - `Keypress object { keys, type }`77017702 A collection of keypresses the model would like to perform.77037704 - `keys: array of string`77057706 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.77077708 - `type: "keypress"`77097710 Specifies the event type. For a keypress action, this property is always set to `keypress`.77117712 - `"keypress"`77137714 - `Move object { type, x, y, keys }`77157716 A mouse move action.77177718 - `type: "move"`77197720 Specifies the event type. For a move action, this property is always set to `move`.77217722 - `"move"`77237724 - `x: number`77257726 The x-coordinate to move to.77277728 - `y: number`77297730 The y-coordinate to move to.77317732 - `keys: optional array of string or null`77337734 The keys being held while moving the mouse.77357736 - `Screenshot object { type }`77377738 A screenshot action.77397740 - `type: "screenshot"`77417742 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.77437744 - `"screenshot"`77457746 - `Scroll object { scroll_x, scroll_y, type, 3 more }`77477748 A scroll action.77497750 - `scroll_x: number`77517752 The horizontal scroll distance.77537754 - `scroll_y: number`77557756 The vertical scroll distance.77577758 - `type: "scroll"`77597760 Specifies the event type. For a scroll action, this property is always set to `scroll`.77617762 - `"scroll"`77637764 - `x: number`77657766 The x-coordinate where the scroll occurred.77677768 - `y: number`77697770 The y-coordinate where the scroll occurred.77717772 - `keys: optional array of string or null`77737774 The keys being held while scrolling.77757776 - `Type object { text, type }`77777778 An action to type in text.77797780 - `text: string`77817782 The text to type.77837784 - `type: "type"`77857786 Specifies the event type. For a type action, this property is always set to `type`.77877788 - `"type"`77897790 - `Wait object { type }`77917792 A wait action.77937794 - `type: "wait"`77957796 Specifies the event type. For a wait action, this property is always set to `wait`.77977798 - `"wait"`77997800 - `actions: optional ComputerActionList`78017802 Flattened batched actions for `computer_use`. Each action includes an7803 `type` discriminator and action-specific fields.78047805 - `Click object { button, type, x, 2 more }`78067807 A click action.78087809 - `DoubleClick object { keys, type, x, y }`78107811 A double click action.78127813 - `Drag object { path, type, keys }`78147815 A drag action.78167817 - `Keypress object { keys, type }`78187819 A collection of keypresses the model would like to perform.78207821 - `Move object { type, x, y, keys }`78227823 A mouse move action.78247825 - `Screenshot object { type }`78267827 A screenshot action.78287829 - `Scroll object { scroll_x, scroll_y, type, 3 more }`78307831 A scroll action.78327833 - `Type object { text, type }`78347835 An action to type in text.78367837 - `Wait object { type }`78387839 A wait action.78407841 - `ComputerCallOutput object { id, call_id, output, 4 more }`78427843 - `id: string`78447845 The unique ID of the computer call tool output.78467847 - `call_id: string`78487849 The ID of the computer tool call that produced the output.78507851 - `output: ResponseComputerToolCallOutputScreenshot`78527853 A computer screenshot image used with the computer use tool.78547855 - `type: "computer_screenshot"`78567857 Specifies the event type. For a computer screenshot, this property is7858 always set to `computer_screenshot`.78597860 - `"computer_screenshot"`78617862 - `file_id: optional string`78637864 The identifier of an uploaded file that contains the screenshot.78657866 - `image_url: optional string`78677868 The URL of the screenshot image.78697870 - `status: "completed" or "incomplete" or "failed" or "in_progress"`78717872 The status of the message input. One of `in_progress`, `completed`, or7873 `incomplete`. Populated when input items are returned via API.78747875 - `"completed"`78767877 - `"incomplete"`78787879 - `"failed"`78807881 - `"in_progress"`78827883 - `type: "computer_call_output"`78847885 The type of the computer tool call output. Always `computer_call_output`.78867887 - `"computer_call_output"`78887889 - `acknowledged_safety_checks: optional array of object { id, code, message }`78907891 The safety checks reported by the API that have been acknowledged by the7892 developer.78937894 - `id: string`78957896 The ID of the pending safety check.78977898 - `code: optional string or null`78997900 The type of the pending safety check.79017902 - `message: optional string or null`79037904 Details about the pending safety check.79057906 - `created_by: optional string`79077908 The identifier of the actor that created the item.79097910 - `Reasoning object { id, summary, type, 3 more }`79117912 A description of the chain of thought used by a reasoning model while generating7913 a response. Be sure to include these items in your `input` to the Responses API7914 for subsequent turns of a conversation if you are manually7915 [managing context](/api/docs/guides/conversation-state).79167917 - `id: string`79187919 The unique identifier of the reasoning content.79207921 - `summary: array of SummaryTextContent`79227923 Reasoning summary content.79247925 - `text: string`79267927 A summary of the reasoning output from the model so far.79287929 - `type: "summary_text"`79307931 The type of the object. Always `summary_text`.79327933 - `type: "reasoning"`79347935 The type of the object. Always `reasoning`.79367937 - `"reasoning"`79387939 - `content: optional array of object { text, type }`79407941 Reasoning text content.79427943 - `text: string`79447945 The reasoning text from the model.79467947 - `type: "reasoning_text"`79487949 The type of the reasoning text. Always `reasoning_text`.79507951 - `"reasoning_text"`79527953 - `encrypted_content: optional string or null`79547955 The encrypted content of the reasoning item. This is populated by default7956 for reasoning items returned by `POST /v1/responses` and WebSocket7957 `response.create` requests.79587959 When streaming, use the completed reasoning item and its7960 `encrypted_content` from the `response.output_item.done` event in7961 subsequent requests. The `encrypted_content` in7962 `response.output_item.added` may be incomplete. This is especially7963 important when `store` is `false` or when using Zero Data Retention.79647965 - `status: optional "in_progress" or "completed" or "incomplete"`79667967 The status of the item. One of `in_progress`, `completed`, or7968 `incomplete`. Populated when items are returned via API.79697970 - `"in_progress"`79717972 - `"completed"`79737974 - `"incomplete"`79757976 - `Compaction object { id, encrypted_content, type, created_by }`79777978 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).79797980 - `id: string`79817982 The unique ID of the compaction item.79837984 - `encrypted_content: string`79857986 The encrypted content that was produced by compaction.79877988 - `type: "compaction"`79897990 The type of the item. Always `compaction`.79917992 - `"compaction"`79937994 - `created_by: optional string`79957996 The identifier of the actor that created the item.79977998 - `CodeInterpreterCall object { id, code, container_id, 3 more }`79998000 A tool call to run code.80018002 - `id: string`80038004 The unique ID of the code interpreter tool call.80058006 - `code: string or null`80078008 The code to run, or null if not available.80098010 - `container_id: string`80118012 The ID of the container used to run the code.80138014 - `outputs: array of object { logs, type } or object { type, url } or null`80158016 The outputs generated by the code interpreter, such as logs or images.8017 Can be null if no outputs are available.80188019 - `Logs object { logs, type }`80208021 The logs output from the code interpreter.80228023 - `logs: string`80248025 The logs output from the code interpreter.80268027 - `type: "logs"`80288029 The type of the output. Always `logs`.80308031 - `"logs"`80328033 - `Image object { type, url }`80348035 The image output from the code interpreter.80368037 - `type: "image"`80388039 The type of the output. Always `image`.80408041 - `"image"`80428043 - `url: string`80448045 The URL of the image output from the code interpreter.80468047 - `status: "in_progress" or "completed" or "incomplete" or 2 more`80488049 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.80508051 - `"in_progress"`80528053 - `"completed"`80548055 - `"incomplete"`80568057 - `"interpreting"`80588059 - `"failed"`80608061 - `type: "code_interpreter_call"`80628063 The type of the code interpreter tool call. Always `code_interpreter_call`.80648065 - `"code_interpreter_call"`80668067 - `LocalShellCall object { id, action, call_id, 2 more }`80688069 A tool call to run a command on the local shell.80708071 - `id: string`80728073 The unique ID of the local shell call.80748075 - `action: object { command, env, type, 3 more }`80768077 Execute a shell command on the server.80788079 - `command: array of string`80808081 The command to run.80828083 - `env: map[string]`80848085 Environment variables to set for the command.80868087 - `type: "exec"`80888089 The type of the local shell action. Always `exec`.80908091 - `"exec"`80928093 - `timeout_ms: optional number or null`80948095 Optional timeout in milliseconds for the command.80968097 - `user: optional string or null`80988099 Optional user to run the command as.81008101 - `working_directory: optional string or null`81028103 Optional working directory to run the command in.81048105 - `call_id: string`81068107 The unique ID of the local shell tool call generated by the model.81088109 - `status: "in_progress" or "completed" or "incomplete"`81108111 The status of the local shell call.81128113 - `"in_progress"`81148115 - `"completed"`81168117 - `"incomplete"`81188119 - `type: "local_shell_call"`81208121 The type of the local shell call. Always `local_shell_call`.81228123 - `"local_shell_call"`81248125 - `LocalShellCallOutput object { id, output, type, status }`81268127 The output of a local shell tool call.81288129 - `id: string`81308131 The unique ID of the local shell tool call generated by the model.81328133 - `output: string`81348135 A JSON string of the output of the local shell tool call.81368137 - `type: "local_shell_call_output"`81388139 The type of the local shell tool call output. Always `local_shell_call_output`.81408141 - `"local_shell_call_output"`81428143 - `status: optional "in_progress" or "completed" or "incomplete" or null`81448145 The status of the item. One of `in_progress`, `completed`, or `incomplete`.81468147 - `"in_progress"`81488149 - `"completed"`81508151 - `"incomplete"`81528153 - `ShellCall object { id, action, call_id, 5 more }`81548155 A tool call that executes one or more shell commands in a managed environment.81568157 - `id: string`81588159 The unique ID of the shell tool call. Populated when this item is returned via API.81608161 - `action: object { commands, max_output_length, timeout_ms }`81628163 The shell commands and limits that describe how to run the tool call.81648165 - `commands: array of string`81668167 - `max_output_length: number or null`81688169 Optional maximum number of characters to return from each command.81708171 - `timeout_ms: number or null`81728173 Optional timeout in milliseconds for the commands.81748175 - `call_id: string`81768177 The unique ID of the shell tool call generated by the model.81788179 - `environment: ResponseLocalEnvironment or ResponseContainerReference or null`81808181 Represents the use of a local environment to perform shell actions.81828183 - `ResponseLocalEnvironment object { type }`81848185 Represents the use of a local environment to perform shell actions.81868187 - `type: "local"`81888189 The environment type. Always `local`.81908191 - `"local"`81928193 - `ResponseContainerReference object { container_id, type }`81948195 Represents a container created with /v1/containers.81968197 - `container_id: string`81988199 - `type: "container_reference"`82008201 The environment type. Always `container_reference`.82028203 - `"container_reference"`82048205 - `status: "in_progress" or "completed" or "incomplete"`82068207 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.82088209 - `"in_progress"`82108211 - `"completed"`82128213 - `"incomplete"`82148215 - `type: "shell_call"`82168217 The type of the item. Always `shell_call`.82188219 - `"shell_call"`82208221 - `caller: optional object { type } or object { caller_id, type } or null`82228223 The execution context that produced this tool call.82248225 - `Direct object { type }`82268227 - `type: "direct"`82288229 - `"direct"`82308231 - `Program object { caller_id, type }`82328233 - `caller_id: string`82348235 The call ID of the program item that produced this tool call.82368237 - `type: "program"`82388239 - `"program"`82408241 - `created_by: optional string`82428243 The ID of the entity that created this tool call.82448245 - `ShellCallOutput object { id, call_id, max_output_length, 5 more }`82468247 The output of a shell tool call that was emitted.82488249 - `id: string`82508251 The unique ID of the shell call output. Populated when this item is returned via API.82528253 - `call_id: string`82548255 The unique ID of the shell tool call generated by the model.82568257 - `max_output_length: number or null`82588259 The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.82608261 - `output: array of object { outcome, stderr, stdout, created_by }`82628263 An array of shell call output contents82648265 - `outcome: object { type } or object { exit_code, type }`82668267 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.82688269 - `Timeout object { type }`82708271 Indicates that the shell call exceeded its configured time limit.82728273 - `type: "timeout"`82748275 The outcome type. Always `timeout`.82768277 - `"timeout"`82788279 - `Exit object { exit_code, type }`82808281 Indicates that the shell commands finished and returned an exit code.82828283 - `exit_code: number`82848285 Exit code from the shell process.82868287 - `type: "exit"`82888289 The outcome type. Always `exit`.82908291 - `"exit"`82928293 - `stderr: string`82948295 The standard error output that was captured.82968297 - `stdout: string`82988299 The standard output that was captured.83008301 - `created_by: optional string`83028303 The identifier of the actor that created the item.83048305 - `status: "in_progress" or "completed" or "incomplete"`83068307 The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.83088309 - `"in_progress"`83108311 - `"completed"`83128313 - `"incomplete"`83148315 - `type: "shell_call_output"`83168317 The type of the shell call output. Always `shell_call_output`.83188319 - `"shell_call_output"`83208321 - `caller: optional object { type } or object { caller_id, type } or null`83228323 The execution context that produced this tool call.83248325 - `Direct object { type }`83268327 - `type: "direct"`83288329 - `"direct"`83308331 - `Program object { caller_id, type }`83328333 - `caller_id: string`83348335 The call ID of the program item that produced this tool call.83368337 - `type: "program"`83388339 - `"program"`83408341 - `created_by: optional string`83428343 The identifier of the actor that created the item.83448345 - `ApplyPatchCall object { id, call_id, operation, 4 more }`83468347 A tool call that applies file diffs by creating, deleting, or updating files.83488349 - `id: string`83508351 The unique ID of the apply patch tool call. Populated when this item is returned via API.83528353 - `call_id: string`83548355 The unique ID of the apply patch tool call generated by the model.83568357 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`83588359 One of the create_file, delete_file, or update_file operations applied via apply_patch.83608361 - `CreateFile object { diff, path, type }`83628363 Instruction describing how to create a file via the apply_patch tool.83648365 - `diff: string`83668367 Diff to apply.83688369 - `path: string`83708371 Path of the file to create.83728373 - `type: "create_file"`83748375 Create a new file with the provided diff.83768377 - `"create_file"`83788379 - `DeleteFile object { path, type }`83808381 Instruction describing how to delete a file via the apply_patch tool.83828383 - `path: string`83848385 Path of the file to delete.83868387 - `type: "delete_file"`83888389 Delete the specified file.83908391 - `"delete_file"`83928393 - `UpdateFile object { diff, path, type }`83948395 Instruction describing how to update a file via the apply_patch tool.83968397 - `diff: string`83988399 Diff to apply.84008401 - `path: string`84028403 Path of the file to update.84048405 - `type: "update_file"`84068407 Update an existing file with the provided diff.84088409 - `"update_file"`84108411 - `status: "in_progress" or "completed"`84128413 The status of the apply patch tool call. One of `in_progress` or `completed`.84148415 - `"in_progress"`84168417 - `"completed"`84188419 - `type: "apply_patch_call"`84208421 The type of the item. Always `apply_patch_call`.84228423 - `"apply_patch_call"`84248425 - `caller: optional object { type } or object { caller_id, type } or null`84268427 The execution context that produced this tool call.84288429 - `Direct object { type }`84308431 - `type: "direct"`84328433 - `"direct"`84348435 - `Program object { caller_id, type }`84368437 - `caller_id: string`84388439 The call ID of the program item that produced this tool call.84408441 - `type: "program"`84428443 - `"program"`84448445 - `created_by: optional string`84468447 The ID of the entity that created this tool call.84488449 - `ApplyPatchCallOutput object { id, call_id, status, 4 more }`84508451 The output emitted by an apply patch tool call.84528453 - `id: string`84548455 The unique ID of the apply patch tool call output. Populated when this item is returned via API.84568457 - `call_id: string`84588459 The unique ID of the apply patch tool call generated by the model.84608461 - `status: "completed" or "failed"`84628463 The status of the apply patch tool call output. One of `completed` or `failed`.84648465 - `"completed"`84668467 - `"failed"`84688469 - `type: "apply_patch_call_output"`84708471 The type of the item. Always `apply_patch_call_output`.84728473 - `"apply_patch_call_output"`84748475 - `caller: optional object { type } or object { caller_id, type } or null`84768477 The execution context that produced this tool call.84788479 - `Direct object { type }`84808481 - `type: "direct"`84828483 - `"direct"`84848485 - `Program object { caller_id, type }`84868487 - `caller_id: string`84888489 The call ID of the program item that produced this tool call.84908491 - `type: "program"`84928493 - `"program"`84948495 - `created_by: optional string`84968497 The ID of the entity that created this tool call output.84988499 - `output: optional string or null`85008501 Optional textual output returned by the apply patch tool.85028503 - `McpListTools object { id, server_label, tools, 2 more }`85048505 A list of tools available on an MCP server.85068507 - `id: string`85088509 The unique ID of the list.85108511 - `server_label: string`85128513 The label of the MCP server.85148515 - `tools: array of object { input_schema, name, annotations, description }`85168517 The tools available on the server.85188519 - `input_schema: unknown`85208521 The JSON schema describing the tool's input.85228523 - `name: string`85248525 The name of the tool.85268527 - `annotations: optional unknown or null`85288529 Additional annotations about the tool.85308531 - `description: optional string or null`85328533 The description of the tool.85348535 - `type: "mcp_list_tools"`85368537 The type of the item. Always `mcp_list_tools`.85388539 - `"mcp_list_tools"`85408541 - `error: optional string or null`85428543 Error message if the server could not list tools.85448545 - `McpApprovalRequest object { id, arguments, name, 2 more }`85468547 A request for human approval of a tool invocation.85488549 - `id: string`85508551 The unique ID of the approval request.85528553 - `arguments: string`85548555 A JSON string of arguments for the tool.85568557 - `name: string`85588559 The name of the tool to run.85608561 - `server_label: string`85628563 The label of the MCP server making the request.85648565 - `type: "mcp_approval_request"`85668567 The type of the item. Always `mcp_approval_request`.85688569 - `"mcp_approval_request"`85708571 - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`85728573 A response to an MCP approval request.85748575 - `id: string`85768577 The unique ID of the approval response85788579 - `approval_request_id: string`85808581 The ID of the approval request being answered.85828583 - `approve: boolean`85848585 Whether the request was approved.85868587 - `type: "mcp_approval_response"`85888589 The type of the item. Always `mcp_approval_response`.85908591 - `"mcp_approval_response"`85928593 - `reason: optional string or null`85948595 Optional reason for the decision.85968597 - `McpCall object { id, arguments, name, 6 more }`85988599 An invocation of a tool on an MCP server.86008601 - `id: string`86028603 The unique ID of the tool call.86048605 - `arguments: string`86068607 A JSON string of the arguments passed to the tool.86088609 - `name: string`86108611 The name of the tool that was run.86128613 - `server_label: string`86148615 The label of the MCP server running the tool.86168617 - `type: "mcp_call"`86188619 The type of the item. Always `mcp_call`.86208621 - `"mcp_call"`86228623 - `approval_request_id: optional string or null`86248625 Unique identifier for the MCP tool call approval request.8626 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.86278628 - `error: optional McpToolCallError or null`86298630 The error from the tool call, if any.86318632 - `McpProtocolError object { code, message, type }`86338634 - `code: number`86358636 - `message: string`86378638 - `type: "mcp_protocol_error"`86398640 - `"mcp_protocol_error"`86418642 - `McpToolExecutionError object { content, type }`86438644 - `content: unknown`86458646 - `type: "mcp_tool_execution_error"`86478648 - `"mcp_tool_execution_error"`86498650 - `HTTPError object { code, message, type }`86518652 - `code: number`86538654 - `message: string`86558656 - `type: "http_error"`86578658 - `"http_error"`86598660 - `output: optional string or null`86618662 The output from the tool call.86638664 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`86658666 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.86678668 - `"in_progress"`86698670 - `"completed"`86718672 - `"incomplete"`86738674 - `"calling"`86758676 - `"failed"`86778678 - `CustomToolCall object { call_id, input, name, 5 more }`86798680 A call to a custom tool created by the model.86818682 - `call_id: string`86838684 An identifier used to map this custom tool call to a tool call output.86858686 - `input: string`86878688 The input for the custom tool call generated by the model.86898690 - `name: string`86918692 The name of the custom tool being called.86938694 - `type: "custom_tool_call"`86958696 The type of the custom tool call. Always `custom_tool_call`.86978698 - `"custom_tool_call"`86998700 - `id: optional string`87018702 The unique ID of the custom tool call in the OpenAI platform.87038704 - `async: optional boolean`87058706 Whether the custom tool call runs asynchronously.87078708 - `caller: optional object { type } or object { caller_id, type } or null`87098710 The execution context that produced this tool call.87118712 - `Direct object { type }`87138714 - `type: "direct"`87158716 - `"direct"`87178718 - `Program object { caller_id, type }`87198720 - `caller_id: string`87218722 The call ID of the program item that produced this tool call.87238724 - `type: "program"`87258726 - `"program"`87278728 - `namespace: optional string`87298730 The namespace of the custom tool being called.87318732 - `CustomToolCallOutput object { call_id, output, type, 2 more }`87338734 The output of a custom tool call from your code, being sent back to the model.87358736 - `call_id: string`87378738 The call ID, used to map this custom tool call output to a custom tool call.87398740 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`87418742 The output from the custom tool call generated by your code.8743 Can be a string or an list of output content.87448745 - `StringOutput = string`87468747 A string of the output of the custom tool call.87488749 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`87508751 Text, image, or file output of the custom tool call.87528753 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`87548755 A text input to the model.87568757 - `ResponseInputImage object { detail, type, file_id, 2 more }`87588759 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).87608761 - `ResponseInputFile object { type, detail, file_data, 4 more }`87628763 A file input to the model.87648765 - `type: "custom_tool_call_output"`87668767 The type of the custom tool call output. Always `custom_tool_call_output`.87688769 - `"custom_tool_call_output"`87708771 - `id: optional string`87728773 The unique ID of the custom tool call output in the OpenAI platform.87748775 - `caller: optional object { type } or object { caller_id, type } or null`87768777 The execution context that produced this tool call.87788779 - `Direct object { type }`87808781 - `type: "direct"`87828783 The caller type. Always `direct`.87848785 - `"direct"`87868787 - `Program object { caller_id, type }`87888789 - `caller_id: string`87908791 The call ID of the program item that produced this tool call.87928793 - `type: "program"`87948795 The caller type. Always `program`.87968797 - `"program"`87988799 - `usage: ResponseUsage`88008801 Token accounting for the compaction pass, including cached, reasoning, and total tokens.88028803 - `input_tokens: number`88048805 The number of input tokens.88068807 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`88088809 A detailed breakdown of the input tokens.88108811 - `cache_write_tokens: number`88128813 The number of input tokens that were written to the cache.88148815 - `cached_tokens: number`88168817 The number of tokens that were retrieved from the cache.8818 [More on prompt caching](/api/docs/guides/prompt-caching).88198820 - `output_tokens: number`88218822 The number of output tokens.88238824 - `output_tokens_details: object { reasoning_tokens }`88258826 A detailed breakdown of the output tokens.88278828 - `reasoning_tokens: number`88298830 The number of reasoning tokens.88318832 - `total_tokens: number`88338834 The total number of tokens used.88358836### Example88378838```http8839curl https://api.openai.com/v1/responses/compact \8840 -H 'Content-Type: application/json' \8841 -H "Authorization: Bearer $OPENAI_API_KEY" \8842 -d '{8843 "model": "gpt-6-astra",8844 "previous_response_id": "resp_123"8845 }'8846```88478848#### Response88498850```json8851{8852 "id": "id",8853 "created_at": 0,8854 "object": "response.compaction",8855 "output": [8856 {8857 "id": "id",8858 "content": [8859 {8860 "text": "text",8861 "type": "input_text",8862 "prompt_cache_breakpoint": {8863 "mode": "explicit"8864 }8865 }8866 ],8867 "role": "unknown",8868 "status": "in_progress",8869 "type": "message",8870 "phase": "commentary"8871 }8872 ],8873 "usage": {8874 "input_tokens": 0,8875 "input_tokens_details": {8876 "cache_write_tokens": 0,8877 "cached_tokens": 08878 },8879 "output_tokens": 0,8880 "output_tokens_details": {8881 "reasoning_tokens": 08882 },8883 "total_tokens": 08884 }8885}8886```88878888### Example88898890```http8891curl -X POST https://api.openai.com/v1/responses/compact \8892 -H "Content-Type: application/json" \8893 -H "Authorization: Bearer $OPENAI_API_KEY" \8894 -d '{8895 "model": "gpt-6-astra",8896 "input": [8897 {8898 "role": "user",8899 "content": "Create a simple landing page for a dog petting café."8900 },8901 {8902 "id": "msg_001",8903 "type": "message",8904 "status": "completed",8905 "content": [8906 {8907 "type": "output_text",8908 "annotations": [],8909 "logprobs": [],8910 "text": "Below is a single file, ready-to-use landing page for a dog petting café:..."8911 }8912 ],8913 "role": "assistant"8914 }8915 ]8916 }'8917```89188919#### Response89208921```json8922{8923 "id": "resp_001",8924 "object": "response.compaction",8925 "created_at": 1764967971,8926 "output": [8927 {8928 "id": "msg_000",8929 "type": "message",8930 "status": "completed",8931 "content": [8932 {8933 "type": "input_text",8934 "text": "Create a simple landing page for a dog petting cafe."8935 }8936 ],8937 "role": "user"8938 },8939 {8940 "id": "cmp_001",8941 "type": "compaction",8942 "encrypted_content": "gAAAAABpM0Yj-...="8943 }8944 ],8945 "usage": {8946 "input_tokens": 139,8947 "input_tokens_details": {8948 "cached_tokens": 0,8949 "cache_write_tokens": 08950 },8951 "output_tokens": 438,8952 "output_tokens_details": {8953 "reasoning_tokens": 648954 },8955 "total_tokens": 5778956 }8957}8958```8959