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## Get a model response45**get** `/responses/{response_id}`67Retrieves a model response with the given ID.89### Path Parameters1011- `response_id: string`1213### Query Parameters1415- `include: optional array of ResponseIncludable`1617 Additional fields to include in the response. See the `include`18 parameter for Response creation above for more information.1920 - `"file_search_call.results"`2122 - `"web_search_call.results"`2324 - `"web_search_call.action.sources"`2526 - `"message.input_image.image_url"`2728 - `"computer_call_output.output.image_url"`2930 - `"code_interpreter_call.outputs"`3132 - `"reasoning.encrypted_content"`3334 - `"message.output_text.logprobs"`3536- `include_obfuscation: optional boolean`3738 When true, stream obfuscation will be enabled. Stream obfuscation adds39 random characters to an `obfuscation` field on streaming delta events40 to normalize payload sizes as a mitigation to certain side-channel41 attacks. These obfuscation fields are included by default, but add a42 small amount of overhead to the data stream. You can set43 `include_obfuscation` to false to optimize for bandwidth if you trust44 the network links between your application and the OpenAI API.4546- `starting_after: optional number`4748 The sequence number of the event after which to start streaming.4950- `stream: optional false`5152 If set to true, the model response data will be streamed to the client53 as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).54 See the [Streaming section below](/api/reference/resources/responses/streaming-events)55 for more information.5657 - `false`5859### Returns6061- `Response object { id, created_at, error, 33 more }`6263 - `id: string`6465 Unique identifier for this Response.6667 - `created_at: number`6869 Unix timestamp (in seconds) of when this Response was created.7071 - `error: ResponseError or null`7273 An error object returned when the model fails to generate a Response.7475 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 18 more`7677 The error code for the response.7879 - `"server_error"`8081 - `"rate_limit_exceeded"`8283 - `"invalid_prompt"`8485 - `"data_residency_mismatch"`8687 - `"bio_policy"`8889 - `"misalignment_policy_violation"`9091 - `"vector_store_timeout"`9293 - `"invalid_image"`9495 - `"invalid_image_format"`9697 - `"invalid_base64_image"`9899 - `"invalid_image_url"`100101 - `"image_too_large"`102103 - `"image_too_small"`104105 - `"image_parse_error"`106107 - `"image_content_policy_violation"`108109 - `"invalid_image_mode"`110111 - `"image_file_too_large"`112113 - `"unsupported_image_media_type"`114115 - `"empty_image_file"`116117 - `"failed_to_download_image"`118119 - `"image_file_not_found"`120121 - `message: string`122123 A human-readable description of the error.124125 - `misalignment: optional object { detailed_explanation, error_type, steer }`126127 - `detailed_explanation: optional string`128129 The public explanation for this block.130131 - `error_type: optional string or "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`132133 An optional classification; clients must accept additional values.134135 - `string`136137 - `SafetyAlertErrorType = "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`138139 An optional classification; clients must accept additional values.140141 - `"potentially_unintended_data_transfer"`142143 - `"potentially_unintended_data_access"`144145 - `"potentially_unintended_destructive_activity"`146147 - `"other"`148149 - `steer: optional object { message }`150151 An optional public continuation instruction.152153 - `message: string`154155 The public continuation instruction.156157 - `incomplete_details: object { reason } or null`158159 Details about why the response is incomplete.160161 - `reason: optional "max_output_tokens" or "max_messages" or "content_filter" or "steered"`162163 The reason why the response is incomplete. `steered` means164 the response stopped at a safe output boundary after a165 WebSocket `response.steer` event. The server can then create166 a successor response automatically with the queued input.167168 - `"max_output_tokens"`169170 - `"max_messages"`171172 - `"content_filter"`173174 - `"steered"`175176 - `instructions: string or array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more or null`177178 A system (or developer) message inserted into the model's context.179180 When using along with `previous_response_id`, the instructions from a previous181 response will not be carried over to the next response. This makes it simple182 to swap out system (or developer) messages in new responses.183184 - `string`185186 A text input to the model, equivalent to a text input with the187 `developer` role.188189 - `InputItemList = array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more`190191 A list of one or many input items to the model, containing192 different content types.193194 - `EasyInputMessage object { content, role, phase, type }`195196 A message input to the model with a role indicating instruction following197 hierarchy. Instructions given with the `developer` or `system` role take198 precedence over instructions given with the `user` role. Messages with the199 `assistant` role are presumed to have been generated by the model in previous200 interactions.201202 - `content: string or ResponseInputMessageContentList`203204 Text, image, or audio input to the model, used to generate a response.205 Can also contain previous assistant responses.206207 - `TextInput = string`208209 A text input to the model.210211 - `ResponseInputMessageContentList = array of ResponseInputContent`212213 A list of one or many input items to the model, containing different content214 types.215216 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`217218 A text input to the model.219220 - `text: string`221222 The text input to the model.223224 - `type: "input_text"`225226 The type of the input item. Always `input_text`.227228 - `"input_text"`229230 - `prompt_cache_breakpoint: optional object { mode }`231232 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.233234 - `mode: "explicit"`235236 The breakpoint mode. Always `explicit`.237238 - `"explicit"`239240 - `ResponseInputImage object { detail, type, file_id, 2 more }`241242 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).243244 - `detail: ImageDetail`245246 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.247248 - `"low"`249250 - `"high"`251252 - `"auto"`253254 - `"original"`255256 - `type: "input_image"`257258 The type of the input item. Always `input_image`.259260 - `"input_image"`261262 - `file_id: optional string or null`263264 The ID of the file to be sent to the model.265266 - `image_url: optional string or null`267268 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.269270 - `prompt_cache_breakpoint: optional object { mode }`271272 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.273274 - `mode: "explicit"`275276 The breakpoint mode. Always `explicit`.277278 - `"explicit"`279280 - `ResponseInputFile object { type, detail, file_data, 4 more }`281282 A file input to the model.283284 - `type: "input_file"`285286 The type of the input item. Always `input_file`.287288 - `"input_file"`289290 - `detail: optional "auto" or "low" or "high"`291292 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`.293294 - `"auto"`295296 - `"low"`297298 - `"high"`299300 - `file_data: optional string`301302 The content of the file to be sent to the model.303304 - `file_id: optional string or null`305306 The ID of the file to be sent to the model.307308 - `file_url: optional string`309310 The URL of the file to be sent to the model.311312 - `filename: optional string`313314 The name of the file to be sent to the model.315316 - `prompt_cache_breakpoint: optional object { mode }`317318 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.319320 - `mode: "explicit"`321322 The breakpoint mode. Always `explicit`.323324 - `"explicit"`325326 - `role: "user" or "assistant" or "system" or "developer"`327328 The role of the message input. One of `user`, `assistant`, `system`, or329 `developer`.330331 - `"user"`332333 - `"assistant"`334335 - `"system"`336337 - `"developer"`338339 - `phase: optional "commentary" or "final_answer" or null`340341 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).342 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend343 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.344345 - `"commentary"`346347 - `"final_answer"`348349 - `type: optional "message"`350351 The type of the message input. Always `message`.352353 - `"message"`354355 - `Message object { content, role, status, type }`356357 A message input to the model with a role indicating instruction following358 hierarchy. Instructions given with the `developer` or `system` role take359 precedence over instructions given with the `user` role.360361 - `content: ResponseInputMessageContentList`362363 A list of one or many input items to the model, containing different content364 types.365366 - `role: "user" or "system" or "developer"`367368 The role of the message input. One of `user`, `system`, or `developer`.369370 - `"user"`371372 - `"system"`373374 - `"developer"`375376 - `status: optional "in_progress" or "completed" or "incomplete"`377378 The status of item. One of `in_progress`, `completed`, or379 `incomplete`. Populated when items are returned via API.380381 - `"in_progress"`382383 - `"completed"`384385 - `"incomplete"`386387 - `type: optional "message"`388389 The type of the message input. Always set to `message`.390391 - `"message"`392393 - `ResponseOutputMessage object { id, content, role, 3 more }`394395 An output message from the model.396397 - `id: string`398399 The unique ID of the output message.400401 - `content: array of ResponseOutputText or ResponseOutputRefusal`402403 The content of the output message.404405 - `ResponseOutputText object { annotations, logprobs, text, type }`406407 A text output from the model.408409 - `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 }`410411 The annotations of the text output.412413 - `FileCitation object { file_id, filename, index, type }`414415 A citation to a file.416417 - `file_id: string`418419 The ID of the file.420421 - `filename: string`422423 The filename of the file cited.424425 - `index: number`426427 The index of the file in the list of files.428429 - `type: "file_citation"`430431 The type of the file citation. Always `file_citation`.432433 - `"file_citation"`434435 - `URLCitation object { end_index, start_index, title, 2 more }`436437 A citation for a web resource used to generate a model response.438439 - `end_index: number`440441 The index of the last character of the URL citation in the message.442443 - `start_index: number`444445 The index of the first character of the URL citation in the message.446447 - `title: string`448449 The title of the web resource.450451 - `type: "url_citation"`452453 The type of the URL citation. Always `url_citation`.454455 - `"url_citation"`456457 - `url: string`458459 The URL of the web resource.460461 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`462463 A citation for a container file used to generate a model response.464465 - `container_id: string`466467 The ID of the container file.468469 - `end_index: number`470471 The index of the last character of the container file citation in the message.472473 - `file_id: string`474475 The ID of the file.476477 - `filename: string`478479 The filename of the container file cited.480481 - `start_index: number`482483 The index of the first character of the container file citation in the message.484485 - `type: "container_file_citation"`486487 The type of the container file citation. Always `container_file_citation`.488489 - `"container_file_citation"`490491 - `FilePath object { file_id, index, type }`492493 A path to a file.494495 - `file_id: string`496497 The ID of the file.498499 - `index: number`500501 The index of the file in the list of files.502503 - `type: "file_path"`504505 The type of the file path. Always `file_path`.506507 - `"file_path"`508509 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`510511 - `token: string`512513 - `bytes: array of number`514515 - `logprob: number`516517 - `top_logprobs: array of object { token, bytes, logprob }`518519 - `token: string`520521 - `bytes: array of number`522523 - `logprob: number`524525 - `text: string`526527 The text output from the model.528529 - `type: "output_text"`530531 The type of the output text. Always `output_text`.532533 - `"output_text"`534535 - `ResponseOutputRefusal object { refusal, type }`536537 A refusal from the model.538539 - `refusal: string`540541 The refusal explanation from the model.542543 - `type: "refusal"`544545 The type of the refusal. Always `refusal`.546547 - `"refusal"`548549 - `role: "assistant"`550551 The role of the output message. Always `assistant`.552553 - `"assistant"`554555 - `status: "in_progress" or "completed" or "incomplete"`556557 The status of the message input. One of `in_progress`, `completed`, or558 `incomplete`. Populated when input items are returned via API.559560 - `"in_progress"`561562 - `"completed"`563564 - `"incomplete"`565566 - `type: "message"`567568 The type of the output message. Always `message`.569570 - `"message"`571572 - `phase: optional "commentary" or "final_answer" or null`573574 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).575 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend576 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.577578 - `"commentary"`579580 - `"final_answer"`581582 - `FileSearchCall object { id, queries, status, 2 more }`583584 The results of a file search tool call. See the585 [file search guide](/api/docs/guides/tools-file-search) for more information.586587 - `id: string`588589 The unique ID of the file search tool call.590591 - `queries: array of string`592593 The queries used to search for files.594595 - `status: "in_progress" or "searching" or "completed" or 2 more`596597 The status of the file search tool call. One of `in_progress`,598 `searching`, `incomplete` or `failed`,599600 - `"in_progress"`601602 - `"searching"`603604 - `"completed"`605606 - `"incomplete"`607608 - `"failed"`609610 - `type: "file_search_call"`611612 The type of the file search tool call. Always `file_search_call`.613614 - `"file_search_call"`615616 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`617618 The results of the file search tool call.619620 - `attributes: optional map[string or number or boolean] or null`621622 Set of 16 key-value pairs that can be attached to an object. This can be623 useful for storing additional information about the object in a structured624 format, and querying for objects via API or the dashboard. Keys are strings625 with a maximum length of 64 characters. Values are strings with a maximum626 length of 512 characters, booleans, or numbers.627628 - `string`629630 - `number`631632 - `boolean`633634 - `file_id: optional string`635636 The unique ID of the file.637638 - `filename: optional string`639640 The name of the file.641642 - `score: optional number`643644 The relevance score of the file - a value between 0 and 1.645646 - `text: optional string`647648 The text that was retrieved from the file.649650 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`651652 A tool call to a computer use tool. See the653 [computer use guide](/api/docs/guides/tools-computer-use) for more information.654655 - `id: string`656657 The unique ID of the computer call.658659 - `call_id: string`660661 An identifier used when responding to the tool call with output.662663 - `pending_safety_checks: array of object { id, code, message }`664665 The pending safety checks for the computer call.666667 - `id: string`668669 The ID of the pending safety check.670671 - `code: optional string or null`672673 The type of the pending safety check.674675 - `message: optional string or null`676677 Details about the pending safety check.678679 - `status: "in_progress" or "completed" or "incomplete"`680681 The status of the item. One of `in_progress`, `completed`, or682 `incomplete`. Populated when items are returned via API.683684 - `"in_progress"`685686 - `"completed"`687688 - `"incomplete"`689690 - `type: "computer_call"`691692 The type of the computer call. Always `computer_call`.693694 - `"computer_call"`695696 - `action: optional ComputerAction`697698 A click action.699700 - `Click object { button, type, x, 2 more }`701702 A click action.703704 - `button: "left" or "right" or "wheel" or 2 more`705706 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.707708 - `"left"`709710 - `"right"`711712 - `"wheel"`713714 - `"back"`715716 - `"forward"`717718 - `type: "click"`719720 Specifies the event type. For a click action, this property is always `click`.721722 - `"click"`723724 - `x: number`725726 The x-coordinate where the click occurred.727728 - `y: number`729730 The y-coordinate where the click occurred.731732 - `keys: optional array of string or null`733734 The keys being held while clicking.735736 - `DoubleClick object { keys, type, x, y }`737738 A double click action.739740 - `keys: array of string or null`741742 The keys being held while double-clicking.743744 - `type: "double_click"`745746 Specifies the event type. For a double click action, this property is always set to `double_click`.747748 - `"double_click"`749750 - `x: number`751752 The x-coordinate where the double click occurred.753754 - `y: number`755756 The y-coordinate where the double click occurred.757758 - `Drag object { path, type, keys }`759760 A drag action.761762 - `path: array of object { x, y }`763764 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg765766 ```767 [768 { x: 100, y: 200 },769 { x: 200, y: 300 }770 ]771 ```772773 - `x: number`774775 The x-coordinate.776777 - `y: number`778779 The y-coordinate.780781 - `type: "drag"`782783 Specifies the event type. For a drag action, this property is always set to `drag`.784785 - `"drag"`786787 - `keys: optional array of string or null`788789 The keys being held while dragging the mouse.790791 - `Keypress object { keys, type }`792793 A collection of keypresses the model would like to perform.794795 - `keys: array of string`796797 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.798799 - `type: "keypress"`800801 Specifies the event type. For a keypress action, this property is always set to `keypress`.802803 - `"keypress"`804805 - `Move object { type, x, y, keys }`806807 A mouse move action.808809 - `type: "move"`810811 Specifies the event type. For a move action, this property is always set to `move`.812813 - `"move"`814815 - `x: number`816817 The x-coordinate to move to.818819 - `y: number`820821 The y-coordinate to move to.822823 - `keys: optional array of string or null`824825 The keys being held while moving the mouse.826827 - `Screenshot object { type }`828829 A screenshot action.830831 - `type: "screenshot"`832833 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.834835 - `"screenshot"`836837 - `Scroll object { scroll_x, scroll_y, type, 3 more }`838839 A scroll action.840841 - `scroll_x: number`842843 The horizontal scroll distance.844845 - `scroll_y: number`846847 The vertical scroll distance.848849 - `type: "scroll"`850851 Specifies the event type. For a scroll action, this property is always set to `scroll`.852853 - `"scroll"`854855 - `x: number`856857 The x-coordinate where the scroll occurred.858859 - `y: number`860861 The y-coordinate where the scroll occurred.862863 - `keys: optional array of string or null`864865 The keys being held while scrolling.866867 - `Type object { text, type }`868869 An action to type in text.870871 - `text: string`872873 The text to type.874875 - `type: "type"`876877 Specifies the event type. For a type action, this property is always set to `type`.878879 - `"type"`880881 - `Wait object { type }`882883 A wait action.884885 - `type: "wait"`886887 Specifies the event type. For a wait action, this property is always set to `wait`.888889 - `"wait"`890891 - `actions: optional ComputerActionList`892893 Flattened batched actions for `computer_use`. Each action includes an894 `type` discriminator and action-specific fields.895896 - `Click object { button, type, x, 2 more }`897898 A click action.899900 - `DoubleClick object { keys, type, x, y }`901902 A double click action.903904 - `Drag object { path, type, keys }`905906 A drag action.907908 - `Keypress object { keys, type }`909910 A collection of keypresses the model would like to perform.911912 - `Move object { type, x, y, keys }`913914 A mouse move action.915916 - `Screenshot object { type }`917918 A screenshot action.919920 - `Scroll object { scroll_x, scroll_y, type, 3 more }`921922 A scroll action.923924 - `Type object { text, type }`925926 An action to type in text.927928 - `Wait object { type }`929930 A wait action.931932 - `ComputerCallOutput object { call_id, output, type, 3 more }`933934 The output of a computer tool call.935936 - `call_id: string`937938 The ID of the computer tool call that produced the output.939940 - `output: ResponseComputerToolCallOutputScreenshot`941942 A computer screenshot image used with the computer use tool.943944 - `type: "computer_screenshot"`945946 Specifies the event type. For a computer screenshot, this property is947 always set to `computer_screenshot`.948949 - `"computer_screenshot"`950951 - `file_id: optional string`952953 The identifier of an uploaded file that contains the screenshot.954955 - `image_url: optional string`956957 The URL of the screenshot image.958959 - `type: "computer_call_output"`960961 The type of the computer tool call output. Always `computer_call_output`.962963 - `"computer_call_output"`964965 - `id: optional string or null`966967 The ID of the computer tool call output.968969 - `acknowledged_safety_checks: optional array of object { id, code, message } or null`970971 The safety checks reported by the API that have been acknowledged by the developer.972973 - `id: string`974975 The ID of the pending safety check.976977 - `code: optional string or null`978979 The type of the pending safety check.980981 - `message: optional string or null`982983 Details about the pending safety check.984985 - `status: optional "in_progress" or "completed" or "incomplete" or null`986987 The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.988989 - `"in_progress"`990991 - `"completed"`992993 - `"incomplete"`994995 - `WebSearchCall object { id, action, status, type }`996997 The results of a web search tool call. See the998 [web search guide](/api/docs/guides/tools-web-search) for more information.9991000 - `id: string`10011002 The unique ID of the web search tool call.10031004 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`10051006 An object describing the specific action taken in this web search call.1007 Includes details on how the model used the web (search, open_page, find_in_page).10081009 - `Search object { type, queries, query, sources }`10101011 Action type "search" - Performs a web search query.10121013 - `type: "search"`10141015 The action type.10161017 - `"search"`10181019 - `queries: optional array of string`10201021 The search queries.10221023 - `query: optional string`10241025 The search query.10261027 - `sources: optional array of object { type, url }`10281029 The sources used in the search.10301031 - `type: "url"`10321033 The type of source. Always `url`.10341035 - `"url"`10361037 - `url: string`10381039 The URL of the source.10401041 - `OpenPage object { type, url }`10421043 Action type "open_page" - Opens a specific URL from search results.10441045 - `type: "open_page"`10461047 The action type.10481049 - `"open_page"`10501051 - `url: optional string or null`10521053 The URL opened by the model.10541055 - `FindInPage object { pattern, type, url }`10561057 Action type "find_in_page": Searches for a pattern within a loaded page.10581059 - `pattern: string`10601061 The pattern or text to search for within the page.10621063 - `type: "find_in_page"`10641065 The action type.10661067 - `"find_in_page"`10681069 - `url: string`10701071 The URL of the page searched for the pattern.10721073 - `status: "in_progress" or "searching" or "completed" or 2 more`10741075 The status of the web search tool call.10761077 - `"in_progress"`10781079 - `"searching"`10801081 - `"completed"`10821083 - `"failed"`10841085 - `"incomplete"`10861087 - `type: "web_search_call"`10881089 The type of the web search tool call. Always `web_search_call`.10901091 - `"web_search_call"`10921093 - `FunctionCall object { arguments, call_id, name, 6 more }`10941095 A tool call to run a function. See the1096 [function calling guide](/api/docs/guides/function-calling) for more information.10971098 - `arguments: string`10991100 A JSON string of the arguments to pass to the function.11011102 - `call_id: string`11031104 The unique ID of the function tool call generated by the model.11051106 - `name: string`11071108 The name of the function to run.11091110 - `type: "function_call"`11111112 The type of the function tool call. Always `function_call`.11131114 - `"function_call"`11151116 - `id: optional string`11171118 The unique ID of the function tool call.11191120 - `async: optional boolean`11211122 Whether the function tool call runs asynchronously.11231124 - `caller: optional object { type } or object { caller_id, type } or null`11251126 The execution context that produced this tool call.11271128 - `Direct object { type }`11291130 - `type: "direct"`11311132 - `"direct"`11331134 - `Program object { caller_id, type }`11351136 - `caller_id: string`11371138 The call ID of the program item that produced this tool call.11391140 - `type: "program"`11411142 - `"program"`11431144 - `namespace: optional string`11451146 The namespace of the function to run.11471148 - `status: optional "in_progress" or "completed" or "incomplete"`11491150 The status of the item. One of `in_progress`, `completed`, or1151 `incomplete`. Populated when items are returned via API.11521153 - `"in_progress"`11541155 - `"completed"`11561157 - `"incomplete"`11581159 - `FunctionCallOutput object { output, type, id, 5 more }`11601161 The output of a function tool call.11621163 - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`11641165 Text, image, or file output of the function tool call.11661167 - `string`11681169 A JSON string of the output of the function tool call.11701171 - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`11721173 An array of content outputs (text, image, file) for the function tool call.11741175 - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`11761177 A text input to the model.11781179 - `text: string`11801181 The text input to the model.11821183 - `type: "input_text"`11841185 The type of the input item. Always `input_text`.11861187 - `"input_text"`11881189 - `prompt_cache_breakpoint: optional object { mode } or null`11901191 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.11921193 - `mode: "explicit"`11941195 The breakpoint mode. Always `explicit`.11961197 - `"explicit"`11981199 - `ResponseInputImageContent object { type, detail, file_id, 2 more }`12001201 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)12021203 - `type: "input_image"`12041205 The type of the input item. Always `input_image`.12061207 - `"input_image"`12081209 - `detail: optional ImageDetail or null`12101211 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.12121213 - `file_id: optional string or null`12141215 The ID of the file to be sent to the model.12161217 - `image_url: optional string or null`12181219 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.12201221 - `prompt_cache_breakpoint: optional object { mode } or null`12221223 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.12241225 - `mode: "explicit"`12261227 The breakpoint mode. Always `explicit`.12281229 - `"explicit"`12301231 - `ResponseInputFileContent object { type, detail, file_data, 4 more }`12321233 A file input to the model.12341235 - `type: "input_file"`12361237 The type of the input item. Always `input_file`.12381239 - `"input_file"`12401241 - `detail: optional "auto" or "low" or "high"`12421243 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`.12441245 - `"auto"`12461247 - `"low"`12481249 - `"high"`12501251 - `file_data: optional string or null`12521253 The base64-encoded data of the file to be sent to the model.12541255 - `file_id: optional string or null`12561257 The ID of the file to be sent to the model.12581259 - `file_url: optional string or null`12601261 The URL of the file to be sent to the model.12621263 - `filename: optional string or null`12641265 The name of the file to be sent to the model.12661267 - `prompt_cache_breakpoint: optional object { mode } or null`12681269 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.12701271 - `mode: "explicit"`12721273 The breakpoint mode. Always `explicit`.12741275 - `"explicit"`12761277 - `type: "function_call_output"`12781279 The type of the function tool call output. Always `function_call_output`.12801281 - `"function_call_output"`12821283 - `id: optional string or null`12841285 The unique ID of the function tool call output. Populated when this item is returned via API.12861287 - `call_id: optional string or null`12881289 The unique ID of the function tool call generated by the model.12901291 - `caller: optional object { type } or object { caller_id, type } or null`12921293 The execution context that produced this tool call.12941295 - `Direct object { type }`12961297 - `type: "direct"`12981299 The caller type. Always `direct`.13001301 - `"direct"`13021303 - `Program object { caller_id, type }`13041305 - `caller_id: string`13061307 The call ID of the program item that produced this tool call.13081309 - `type: "program"`13101311 The caller type. Always `program`.13121313 - `"program"`13141315 - `name: optional string or null`13161317 The name of the tool that produced the output.13181319 - `namespace: optional string or null`13201321 The namespace of the tool that produced the output.13221323 - `status: optional "in_progress" or "completed" or "incomplete" or null`13241325 The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.13261327 - `"in_progress"`13281329 - `"completed"`13301331 - `"incomplete"`13321333 - `ToolSearchCall object { arguments, type, id, 3 more }`13341335 - `arguments: unknown`13361337 The arguments supplied to the tool search call.13381339 - `type: "tool_search_call"`13401341 The item type. Always `tool_search_call`.13421343 - `"tool_search_call"`13441345 - `id: optional string or null`13461347 The unique ID of this tool search call.13481349 - `call_id: optional string or null`13501351 The unique ID of the tool search call generated by the model.13521353 - `execution: optional "server" or "client"`13541355 Whether tool search was executed by the server or by the client.13561357 - `"server"`13581359 - `"client"`13601361 - `status: optional "in_progress" or "completed" or "incomplete" or null`13621363 The status of the tool search call.13641365 - `"in_progress"`13661367 - `"completed"`13681369 - `"incomplete"`13701371 - `ToolSearchOutput object { tools, type, id, 3 more }`13721373 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`13741375 The loaded tool definitions returned by the tool search output.13761377 - `Function object { name, parameters, strict, 6 more }`13781379 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).13801381 - `name: string`13821383 The name of the function to call.13841385 - `parameters: map[unknown] or null`13861387 A JSON schema object describing the parameters of the function.13881389 - `strict: boolean or null`13901391 Whether strict parameter validation is enforced for this function tool.13921393 - `type: "function"`13941395 The type of the function tool. Always `function`.13961397 - `"function"`13981399 - `allowed_callers: optional array of "direct" or "programmatic" or null`14001401 The tool invocation context(s).14021403 - `"direct"`14041405 - `"programmatic"`14061407 - `async: optional boolean`14081409 - `defer_loading: optional boolean`14101411 Whether this function is deferred and loaded via tool search.14121413 - `description: optional string or null`14141415 A description of the function. Used by the model to determine whether or not to call the function.14161417 - `output_schema: optional map[unknown] or null`14181419 A JSON schema object describing the JSON value encoded in string outputs for this function.14201421 - `FileSearch object { type, vector_store_ids, filters, 2 more }`14221423 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).14241425 - `type: "file_search"`14261427 The type of the file search tool. Always `file_search`.14281429 - `"file_search"`14301431 - `vector_store_ids: array of string`14321433 The IDs of the vector stores to search.14341435 - `filters: optional ComparisonFilter or CompoundFilter or null`14361437 A filter to apply.14381439 - `ComparisonFilter object { key, type, value }`14401441 A filter used to compare a specified attribute key to a given value using a defined comparison operation.14421443 - `key: string`14441445 The key to compare against the value.14461447 - `type: "eq" or "ne" or "gt" or 5 more`14481449 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.14501451 - `eq`: equals1452 - `ne`: not equal1453 - `gt`: greater than1454 - `gte`: greater than or equal1455 - `lt`: less than1456 - `lte`: less than or equal1457 - `in`: in1458 - `nin`: not in14591460 - `"eq"`14611462 - `"ne"`14631464 - `"gt"`14651466 - `"gte"`14671468 - `"lt"`14691470 - `"lte"`14711472 - `"in"`14731474 - `"nin"`14751476 - `value: string or number or boolean or array of string or number`14771478 The value to compare against the attribute key; supports string, number, or boolean types.14791480 - `string`14811482 - `number`14831484 - `boolean`14851486 - `array of string or number`14871488 - `string`14891490 - `number`14911492 - `CompoundFilter object { filters, type }`14931494 Combine multiple filters using `and` or `or`.14951496 - `filters: array of ComparisonFilter or unknown`14971498 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.14991500 - `ComparisonFilter object { key, type, value }`15011502 A filter used to compare a specified attribute key to a given value using a defined comparison operation.15031504 - `unknown`15051506 - `type: "and" or "or"`15071508 Type of operation: `and` or `or`.15091510 - `"and"`15111512 - `"or"`15131514 - `max_num_results: optional number`15151516 The maximum number of results to return. This number should be between 1 and 50 inclusive.15171518 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`15191520 Ranking options for search.15211522 - `hybrid_search: optional object { embedding_weight, text_weight }`15231524 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.15251526 - `embedding_weight: number`15271528 The weight of the embedding in the reciprocal ranking fusion.15291530 - `text_weight: number`15311532 The weight of the text in the reciprocal ranking fusion.15331534 - `ranker: optional "auto" or "default-2024-11-15"`15351536 The ranker to use for the file search.15371538 - `"auto"`15391540 - `"default-2024-11-15"`15411542 - `score_threshold: optional number`15431544 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.15451546 - `Computer object { type }`15471548 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).15491550 - `type: "computer"`15511552 The type of the computer tool. Always `computer`.15531554 - `"computer"`15551556 - `ComputerUsePreview object { display_height, display_width, environment, type }`15571558 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).15591560 - `display_height: number`15611562 The height of the computer display.15631564 - `display_width: number`15651566 The width of the computer display.15671568 - `environment: "windows" or "mac" or "linux" or 2 more`15691570 The type of computer environment to control.15711572 - `"windows"`15731574 - `"mac"`15751576 - `"linux"`15771578 - `"ubuntu"`15791580 - `"browser"`15811582 - `type: "computer_use_preview"`15831584 The type of the computer use tool. Always `computer_use_preview`.15851586 - `"computer_use_preview"`15871588 - `WebSearch object { type, external_web_access, filters, 2 more }`15891590 Search the Internet for sources related to the prompt. Learn more about the1591 [web search tool](/api/docs/guides/tools-web-search).15921593 - `type: "web_search" or "web_search_2025_08_26"`15941595 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.15961597 - `"web_search"`15981599 - `"web_search_2025_08_26"`16001601 - `external_web_access: optional boolean`16021603 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.16041605 - `filters: optional object { allowed_domains } or null`16061607 Filters for the search.16081609 - `allowed_domains: optional array of string or null`16101611 Allowed domains for the search. If not provided, all domains are allowed.1612 Subdomains of the provided domains are allowed as well.16131614 Example: `["pubmed.ncbi.nlm.nih.gov"]`16151616 - `search_context_size: optional "low" or "medium" or "high"`16171618 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.16191620 - `"low"`16211622 - `"medium"`16231624 - `"high"`16251626 - `user_location: optional object { city, country, region, 2 more } or null`16271628 The approximate location of the user.16291630 - `city: optional string or null`16311632 Free text input for the city of the user, e.g. `San Francisco`.16331634 - `country: optional string or null`16351636 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.16371638 - `region: optional string or null`16391640 Free text input for the region of the user, e.g. `California`.16411642 - `timezone: optional string or null`16431644 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.16451646 - `type: optional "approximate"`16471648 The type of location approximation. Always `approximate`.16491650 - `"approximate"`16511652 - `Mcp object { server_label, type, allowed_callers, 9 more }`16531654 Give the model access to additional tools via remote Model Context Protocol1655 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).16561657 - `server_label: string`16581659 A label for this MCP server, used to identify it in tool calls.16601661 - `type: "mcp"`16621663 The type of the MCP tool. Always `mcp`.16641665 - `"mcp"`16661667 - `allowed_callers: optional array of "direct" or "programmatic" or null`16681669 The tool invocation context(s).16701671 - `"direct"`16721673 - `"programmatic"`16741675 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`16761677 List of allowed tool names or a filter object.16781679 - `McpAllowedTools = array of string`16801681 A string array of allowed tool names16821683 - `McpToolFilter object { read_only, tool_names }`16841685 A filter object to specify which tools are allowed.16861687 - `read_only: optional boolean`16881689 Indicates whether or not a tool modifies data or is read-only. If an1690 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1691 it will match this filter.16921693 - `tool_names: optional array of string`16941695 List of allowed tool names.16961697 - `authorization: optional string`16981699 An OAuth access token that can be used with a remote MCP server, either1700 with a custom MCP server URL or a service connector. Your application1701 must handle the OAuth authorization flow and provide the token here.17021703 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`17041705 Identifier for service connectors, like those available in ChatGPT. One of1706 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more1707 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).17081709 This field is deprecated for models released after September 1, 2026.1710 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to1711 connect through a Secure MCP Tunnel.17121713 Currently supported `connector_id` values are:17141715 - Dropbox: `connector_dropbox`1716 - Gmail: `connector_gmail`1717 - Google Calendar: `connector_googlecalendar`1718 - Google Drive: `connector_googledrive`1719 - Microsoft Teams: `connector_microsoftteams`1720 - Outlook Calendar: `connector_outlookcalendar`1721 - Outlook Email: `connector_outlookemail`1722 - SharePoint: `connector_sharepoint`17231724 - `"connector_dropbox"`17251726 - `"connector_gmail"`17271728 - `"connector_googlecalendar"`17291730 - `"connector_googledrive"`17311732 - `"connector_microsoftteams"`17331734 - `"connector_outlookcalendar"`17351736 - `"connector_outlookemail"`17371738 - `"connector_sharepoint"`17391740 - `defer_loading: optional boolean`17411742 Whether this MCP tool is deferred and discovered via tool search.17431744 - `headers: optional map[string] or null`17451746 Optional HTTP headers to send to the MCP server. Use for authentication1747 or other purposes.17481749 - `require_approval: optional object { always, never } or "always" or "never" or null`17501751 Specify which of the MCP server's tools require approval.17521753 - `McpToolApprovalFilter object { always, never }`17541755 Specify which of the MCP server's tools require approval. Can be1756 `always`, `never`, or a filter object associated with tools1757 that require approval.17581759 - `always: optional object { read_only, tool_names }`17601761 A filter object to specify which tools are allowed.17621763 - `read_only: optional boolean`17641765 Indicates whether or not a tool modifies data or is read-only. If an1766 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1767 it will match this filter.17681769 - `tool_names: optional array of string`17701771 List of allowed tool names.17721773 - `never: optional object { read_only, tool_names }`17741775 A filter object to specify which tools are allowed.17761777 - `read_only: optional boolean`17781779 Indicates whether or not a tool modifies data or is read-only. If an1780 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1781 it will match this filter.17821783 - `tool_names: optional array of string`17841785 List of allowed tool names.17861787 - `McpToolApprovalSetting = "always" or "never"`17881789 Specify a single approval policy for all tools. One of `always` or1790 `never`. When set to `always`, all tools will require approval. When1791 set to `never`, all tools will not require approval.17921793 - `"always"`17941795 - `"never"`17961797 - `server_description: optional string`17981799 Optional description of the MCP server, used to provide more context.18001801 - `server_url: optional string`18021803 The URL for the MCP server. One of `server_url`, `connector_id`, or1804 `tunnel_id` must be provided.18051806 - `tunnel_id: optional string`18071808 The Secure MCP Tunnel ID to use instead of a direct server URL. One of1809 `server_url`, `connector_id`, or `tunnel_id` must be provided.18101811 - `CodeInterpreter object { container, type, allowed_callers }`18121813 A tool that runs Python code to help generate a response to a prompt.18141815 - `container: string or object { type, file_ids, memory_limit, network_policy }`18161817 The code interpreter container. Can be a container ID or an object that1818 specifies uploaded file IDs to make available to your code, along with an1819 optional `memory_limit` setting.18201821 - `string`18221823 The container ID.18241825 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`18261827 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.18281829 - `type: "auto"`18301831 Always `auto`.18321833 - `"auto"`18341835 - `file_ids: optional array of string`18361837 An optional list of uploaded files to make available to your code.18381839 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`18401841 The memory limit for the code interpreter container.18421843 - `"1g"`18441845 - `"4g"`18461847 - `"16g"`18481849 - `"64g"`18501851 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`18521853 Network access policy for the container.18541855 - `ContainerNetworkPolicyDisabled object { type }`18561857 - `type: "disabled"`18581859 Disable outbound network access. Always `disabled`.18601861 - `"disabled"`18621863 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`18641865 - `allowed_domains: array of string`18661867 A list of allowed domains when type is `allowlist`.18681869 - `type: "allowlist"`18701871 Allow outbound network access only to specified domains. Always `allowlist`.18721873 - `"allowlist"`18741875 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`18761877 Optional domain-scoped secrets for allowlisted domains.18781879 - `domain: string`18801881 The domain associated with the secret.18821883 - `name: string`18841885 The name of the secret to inject for the domain.18861887 - `value: string`18881889 The secret value to inject for the domain.18901891 - `type: "code_interpreter"`18921893 The type of the code interpreter tool. Always `code_interpreter`.18941895 - `"code_interpreter"`18961897 - `allowed_callers: optional array of "direct" or "programmatic" or null`18981899 The tool invocation context(s).19001901 - `"direct"`19021903 - `"programmatic"`19041905 - `ProgrammaticToolCalling object { type }`19061907 - `type: "programmatic_tool_calling"`19081909 The type of the tool. Always `programmatic_tool_calling`.19101911 - `"programmatic_tool_calling"`19121913 - `ImageGeneration object { type, action, background, 9 more }`19141915 A tool that generates images using the GPT image models.19161917 - `type: "image_generation"`19181919 The type of the image generation tool. Always `image_generation`.19201921 - `"image_generation"`19221923 - `action: optional "generate" or "edit" or "auto"`19241925 Whether to generate a new image or edit an existing image. Default: `auto`.19261927 - `"generate"`19281929 - `"edit"`19301931 - `"auto"`19321933 - `background: optional "transparent" or "opaque" or "auto"`19341935 Set the background of the generated image. One of `transparent`, `opaque`,1936 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including1937 their `2026-09-08` snapshots, support `opaque` and `transparent`1938 backgrounds. Transparent backgrounds are available for supported GPT Image1939 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in1940 preview. When using `transparent`, set the output format to `png` or `webp`.1941 Default: `auto`.19421943 - `"transparent"`19441945 - `"opaque"`19461947 - `"auto"`19481949 - `input_fidelity: optional "high" or "low" or null`19501951 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`.19521953 - `"high"`19541955 - `"low"`19561957 - `input_image_mask: optional object { file_id, image_url }`19581959 Optional mask for inpainting. Contains `image_url`1960 (string, optional) and `file_id` (string, optional).19611962 - `file_id: optional string`19631964 File ID for the mask image.19651966 - `image_url: optional string`19671968 Base64-encoded mask image.19691970 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`19711972 The image generation model to use. One of `gpt-image-1`,1973 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1974 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1975 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1976 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1977 `gpt-image-1`.19781979 - `string`19801981 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`19821983 The image generation model to use. One of `gpt-image-1`,1984 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1985 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1986 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1987 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1988 `gpt-image-1`.19891990 - `"gpt-image-1"`19911992 - `"gpt-image-1-mini"`19931994 - `"gpt-image-1.5"`19951996 - `"gpt-image-2"`19971998 - `"gpt-image-2-2026-04-21"`19992000 - `"gpt-image-2.5-sunburst"`20012002 - `"gpt-image-2.5-sunburst-2026-09-08"`20032004 - `"gpt-image-2.5-flare"`20052006 - `"gpt-image-2.5-flare-2026-09-08"`20072008 - `moderation: optional "auto" or "low"`20092010 Moderation level for the generated image. Default: `auto`.20112012 - `"auto"`20132014 - `"low"`20152016 - `output_compression: optional number`20172018 Compression level for the output image. Default: 100.20192020 - `output_format: optional "png" or "webp" or "jpeg"`20212022 The output format of the generated image. One of `png`, `webp`, or2023 `jpeg`. Default: `png`.20242025 - `"png"`20262027 - `"webp"`20282029 - `"jpeg"`20302031 - `partial_images: optional number`20322033 Number of partial images to generate in streaming mode, from 0 (default value) to 3.20342035 - `quality: optional "low" or "medium" or "high" or 3 more`20362037 The quality of the generated image. The GPT image models support `low`,2038 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,2039 including their `2026-09-08` snapshots, also support `xhigh` and `max`.2040 Default: `auto`.20412042 - `"low"`20432044 - `"medium"`20452046 - `"high"`20472048 - `"xhigh"`20492050 - `"max"`20512052 - `"auto"`20532054 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`20552056 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`.20572058 - `string`20592060 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`20612062 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`.20632064 - `"1024x1024"`20652066 - `"1024x1536"`20672068 - `"1536x1024"`20692070 - `"auto"`20712072 - `LocalShell object { type }`20732074 A tool that allows the model to execute shell commands in a local environment.20752076 - `type: "local_shell"`20772078 The type of the local shell tool. Always `local_shell`.20792080 - `"local_shell"`20812082 - `Shell object { type, allowed_callers, environment }`20832084 A tool that allows the model to execute shell commands.20852086 - `type: "shell"`20872088 The type of the shell tool. Always `shell`.20892090 - `"shell"`20912092 - `allowed_callers: optional array of "direct" or "programmatic" or null`20932094 The tool invocation context(s).20952096 - `"direct"`20972098 - `"programmatic"`20992100 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`21012102 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`21032104 - `type: "container_auto"`21052106 Automatically creates a container for this request21072108 - `"container_auto"`21092110 - `file_ids: optional array of string`21112112 An optional list of uploaded files to make available to your code.21132114 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`21152116 The memory limit for the container.21172118 - `"1g"`21192120 - `"4g"`21212122 - `"16g"`21232124 - `"64g"`21252126 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`21272128 Network access policy for the container.21292130 - `ContainerNetworkPolicyDisabled object { type }`21312132 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`21332134 - `skills: optional array of SkillReference or InlineSkill`21352136 An optional list of skills referenced by id or inline data.21372138 - `SkillReference object { skill_id, type, version }`21392140 - `skill_id: string`21412142 The ID of the referenced skill.21432144 - `type: "skill_reference"`21452146 References a skill created with the /v1/skills endpoint.21472148 - `"skill_reference"`21492150 - `version: optional string`21512152 Optional skill version. Use a positive integer or 'latest'. Omit for default.21532154 - `InlineSkill object { description, name, source, type }`21552156 - `description: string`21572158 The description of the skill.21592160 - `name: string`21612162 The name of the skill.21632164 - `source: InlineSkillSource`21652166 Inline skill payload21672168 - `data: string`21692170 Base64-encoded skill zip bundle.21712172 - `media_type: "application/zip"`21732174 The media type of the inline skill payload. Must be `application/zip`.21752176 - `"application/zip"`21772178 - `type: "base64"`21792180 The type of the inline skill source. Must be `base64`.21812182 - `"base64"`21832184 - `type: "inline"`21852186 Defines an inline skill for this request.21872188 - `"inline"`21892190 - `LocalEnvironment object { type, skills }`21912192 - `type: "local"`21932194 Use a local computer environment.21952196 - `"local"`21972198 - `skills: optional array of LocalSkill`21992200 An optional list of skills.22012202 - `description: string`22032204 The description of the skill.22052206 - `name: string`22072208 The name of the skill.22092210 - `path: string`22112212 The path to the directory containing the skill.22132214 - `ContainerReference object { container_id, type }`22152216 - `container_id: string`22172218 The ID of the referenced container.22192220 - `type: "container_reference"`22212222 References a container created with the /v1/containers endpoint22232224 - `"container_reference"`22252226 - `Custom object { name, type, allowed_callers, 4 more }`22272228 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)22292230 - `name: string`22312232 The name of the custom tool, used to identify it in tool calls.22332234 - `type: "custom"`22352236 The type of the custom tool. Always `custom`.22372238 - `"custom"`22392240 - `allowed_callers: optional array of "direct" or "programmatic" or null`22412242 The tool invocation context(s).22432244 - `"direct"`22452246 - `"programmatic"`22472248 - `async: optional boolean`22492250 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.22512252 - `defer_loading: optional boolean`22532254 Whether this tool should be deferred and discovered via tool search.22552256 - `description: optional string`22572258 Optional description of the custom tool, used to provide more context.22592260 - `format: optional CustomToolInputFormat`22612262 The input format for the custom tool. Default is unconstrained text.22632264 - `Text object { type }`22652266 Unconstrained free-form text.22672268 - `type: "text"`22692270 Unconstrained text format. Always `text`.22712272 - `"text"`22732274 - `Grammar object { definition, syntax, type }`22752276 A grammar defined by the user.22772278 - `definition: string`22792280 The grammar definition.22812282 - `syntax: "lark" or "regex"`22832284 The syntax of the grammar definition. One of `lark` or `regex`.22852286 - `"lark"`22872288 - `"regex"`22892290 - `type: "grammar"`22912292 Grammar format. Always `grammar`.22932294 - `"grammar"`22952296 - `Namespace object { description, name, tools, type }`22972298 Groups function/custom tools under a shared namespace.22992300 - `description: string`23012302 A description of the namespace shown to the model.23032304 - `name: string`23052306 The namespace name used in tool calls (for example, `crm`).23072308 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`23092310 The function/custom tools available inside this namespace.23112312 - `Function object { name, type, allowed_callers, 6 more }`23132314 - `name: string`23152316 - `type: "function"`23172318 - `"function"`23192320 - `allowed_callers: optional array of "direct" or "programmatic" or null`23212322 The tool invocation context(s).23232324 - `"direct"`23252326 - `"programmatic"`23272328 - `async: optional boolean`23292330 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.23312332 - `defer_loading: optional boolean`23332334 Whether this function should be deferred and discovered via tool search.23352336 - `description: optional string or null`23372338 - `output_schema: optional map[unknown] or null`23392340 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.23412342 - `parameters: optional unknown or null`23432344 - `strict: optional boolean or null`23452346 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.23472348 - `Custom object { name, type, allowed_callers, 4 more }`23492350 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)23512352 - `name: string`23532354 The name of the custom tool, used to identify it in tool calls.23552356 - `type: "custom"`23572358 The type of the custom tool. Always `custom`.23592360 - `"custom"`23612362 - `allowed_callers: optional array of "direct" or "programmatic" or null`23632364 The tool invocation context(s).23652366 - `"direct"`23672368 - `"programmatic"`23692370 - `async: optional boolean`23712372 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.23732374 - `defer_loading: optional boolean`23752376 Whether this tool should be deferred and discovered via tool search.23772378 - `description: optional string`23792380 Optional description of the custom tool, used to provide more context.23812382 - `format: optional CustomToolInputFormat`23832384 The input format for the custom tool. Default is unconstrained text.23852386 - `type: "namespace"`23872388 The type of the tool. Always `namespace`.23892390 - `"namespace"`23912392 - `ToolSearch object { type, description, execution, parameters }`23932394 Hosted or BYOT tool search configuration for deferred tools.23952396 - `type: "tool_search"`23972398 The type of the tool. Always `tool_search`.23992400 - `"tool_search"`24012402 - `description: optional string or null`24032404 Description shown to the model for a client-executed tool search tool.24052406 - `execution: optional "server" or "client"`24072408 Whether tool search is executed by the server or by the client.24092410 - `"server"`24112412 - `"client"`24132414 - `parameters: optional unknown or null`24152416 Parameter schema for a client-executed tool search tool.24172418 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`24192420 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).24212422 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`24232424 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.24252426 - `"web_search_preview"`24272428 - `"web_search_preview_2025_03_11"`24292430 - `search_content_types: optional array of "text" or "image"`24312432 - `"text"`24332434 - `"image"`24352436 - `search_context_size: optional "low" or "medium" or "high"`24372438 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.24392440 - `"low"`24412442 - `"medium"`24432444 - `"high"`24452446 - `user_location: optional object { type, city, country, 2 more } or null`24472448 The user's location.24492450 - `type: "approximate"`24512452 The type of location approximation. Always `approximate`.24532454 - `"approximate"`24552456 - `city: optional string or null`24572458 Free text input for the city of the user, e.g. `San Francisco`.24592460 - `country: optional string or null`24612462 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.24632464 - `region: optional string or null`24652466 Free text input for the region of the user, e.g. `California`.24672468 - `timezone: optional string or null`24692470 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.24712472 - `ApplyPatch object { type, allowed_callers }`24732474 Allows the assistant to create, delete, or update files using unified diffs.24752476 - `type: "apply_patch"`24772478 The type of the tool. Always `apply_patch`.24792480 - `"apply_patch"`24812482 - `allowed_callers: optional array of "direct" or "programmatic" or null`24832484 The tool invocation context(s).24852486 - `"direct"`24872488 - `"programmatic"`24892490 - `type: "tool_search_output"`24912492 The item type. Always `tool_search_output`.24932494 - `"tool_search_output"`24952496 - `id: optional string or null`24972498 The unique ID of this tool search output.24992500 - `call_id: optional string or null`25012502 The unique ID of the tool search call generated by the model.25032504 - `execution: optional "server" or "client"`25052506 Whether tool search was executed by the server or by the client.25072508 - `"server"`25092510 - `"client"`25112512 - `status: optional "in_progress" or "completed" or "incomplete" or null`25132514 The status of the tool search output.25152516 - `"in_progress"`25172518 - `"completed"`25192520 - `"incomplete"`25212522 - `AdditionalTools object { role, tools, type, id }`25232524 - `role: "developer"`25252526 The role that provided the additional tools. Only `developer` is supported.25272528 - `"developer"`25292530 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`25312532 A list of additional tools made available at this item.25332534 - `Function object { name, parameters, strict, 6 more }`25352536 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).25372538 - `name: string`25392540 The name of the function to call.25412542 - `parameters: map[unknown] or null`25432544 A JSON schema object describing the parameters of the function.25452546 - `strict: boolean or null`25472548 Whether strict parameter validation is enforced for this function tool.25492550 - `type: "function"`25512552 The type of the function tool. Always `function`.25532554 - `"function"`25552556 - `allowed_callers: optional array of "direct" or "programmatic" or null`25572558 The tool invocation context(s).25592560 - `"direct"`25612562 - `"programmatic"`25632564 - `async: optional boolean`25652566 - `defer_loading: optional boolean`25672568 Whether this function is deferred and loaded via tool search.25692570 - `description: optional string or null`25712572 A description of the function. Used by the model to determine whether or not to call the function.25732574 - `output_schema: optional map[unknown] or null`25752576 A JSON schema object describing the JSON value encoded in string outputs for this function.25772578 - `FileSearch object { type, vector_store_ids, filters, 2 more }`25792580 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).25812582 - `type: "file_search"`25832584 The type of the file search tool. Always `file_search`.25852586 - `"file_search"`25872588 - `vector_store_ids: array of string`25892590 The IDs of the vector stores to search.25912592 - `filters: optional ComparisonFilter or CompoundFilter or null`25932594 A filter to apply.25952596 - `ComparisonFilter object { key, type, value }`25972598 A filter used to compare a specified attribute key to a given value using a defined comparison operation.25992600 - `CompoundFilter object { filters, type }`26012602 Combine multiple filters using `and` or `or`.26032604 - `max_num_results: optional number`26052606 The maximum number of results to return. This number should be between 1 and 50 inclusive.26072608 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`26092610 Ranking options for search.26112612 - `hybrid_search: optional object { embedding_weight, text_weight }`26132614 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.26152616 - `embedding_weight: number`26172618 The weight of the embedding in the reciprocal ranking fusion.26192620 - `text_weight: number`26212622 The weight of the text in the reciprocal ranking fusion.26232624 - `ranker: optional "auto" or "default-2024-11-15"`26252626 The ranker to use for the file search.26272628 - `"auto"`26292630 - `"default-2024-11-15"`26312632 - `score_threshold: optional number`26332634 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.26352636 - `Computer object { type }`26372638 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).26392640 - `type: "computer"`26412642 The type of the computer tool. Always `computer`.26432644 - `"computer"`26452646 - `ComputerUsePreview object { display_height, display_width, environment, type }`26472648 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).26492650 - `display_height: number`26512652 The height of the computer display.26532654 - `display_width: number`26552656 The width of the computer display.26572658 - `environment: "windows" or "mac" or "linux" or 2 more`26592660 The type of computer environment to control.26612662 - `"windows"`26632664 - `"mac"`26652666 - `"linux"`26672668 - `"ubuntu"`26692670 - `"browser"`26712672 - `type: "computer_use_preview"`26732674 The type of the computer use tool. Always `computer_use_preview`.26752676 - `"computer_use_preview"`26772678 - `WebSearch object { type, external_web_access, filters, 2 more }`26792680 Search the Internet for sources related to the prompt. Learn more about the2681 [web search tool](/api/docs/guides/tools-web-search).26822683 - `type: "web_search" or "web_search_2025_08_26"`26842685 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.26862687 - `"web_search"`26882689 - `"web_search_2025_08_26"`26902691 - `external_web_access: optional boolean`26922693 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.26942695 - `filters: optional object { allowed_domains } or null`26962697 Filters for the search.26982699 - `allowed_domains: optional array of string or null`27002701 Allowed domains for the search. If not provided, all domains are allowed.2702 Subdomains of the provided domains are allowed as well.27032704 Example: `["pubmed.ncbi.nlm.nih.gov"]`27052706 - `search_context_size: optional "low" or "medium" or "high"`27072708 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.27092710 - `"low"`27112712 - `"medium"`27132714 - `"high"`27152716 - `user_location: optional object { city, country, region, 2 more } or null`27172718 The approximate location of the user.27192720 - `city: optional string or null`27212722 Free text input for the city of the user, e.g. `San Francisco`.27232724 - `country: optional string or null`27252726 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.27272728 - `region: optional string or null`27292730 Free text input for the region of the user, e.g. `California`.27312732 - `timezone: optional string or null`27332734 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.27352736 - `type: optional "approximate"`27372738 The type of location approximation. Always `approximate`.27392740 - `"approximate"`27412742 - `Mcp object { server_label, type, allowed_callers, 9 more }`27432744 Give the model access to additional tools via remote Model Context Protocol2745 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).27462747 - `server_label: string`27482749 A label for this MCP server, used to identify it in tool calls.27502751 - `type: "mcp"`27522753 The type of the MCP tool. Always `mcp`.27542755 - `"mcp"`27562757 - `allowed_callers: optional array of "direct" or "programmatic" or null`27582759 The tool invocation context(s).27602761 - `"direct"`27622763 - `"programmatic"`27642765 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`27662767 List of allowed tool names or a filter object.27682769 - `McpAllowedTools = array of string`27702771 A string array of allowed tool names27722773 - `McpToolFilter object { read_only, tool_names }`27742775 A filter object to specify which tools are allowed.27762777 - `read_only: optional boolean`27782779 Indicates whether or not a tool modifies data or is read-only. If an2780 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2781 it will match this filter.27822783 - `tool_names: optional array of string`27842785 List of allowed tool names.27862787 - `authorization: optional string`27882789 An OAuth access token that can be used with a remote MCP server, either2790 with a custom MCP server URL or a service connector. Your application2791 must handle the OAuth authorization flow and provide the token here.27922793 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`27942795 Identifier for service connectors, like those available in ChatGPT. One of2796 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more2797 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).27982799 This field is deprecated for models released after September 1, 2026.2800 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to2801 connect through a Secure MCP Tunnel.28022803 Currently supported `connector_id` values are:28042805 - Dropbox: `connector_dropbox`2806 - Gmail: `connector_gmail`2807 - Google Calendar: `connector_googlecalendar`2808 - Google Drive: `connector_googledrive`2809 - Microsoft Teams: `connector_microsoftteams`2810 - Outlook Calendar: `connector_outlookcalendar`2811 - Outlook Email: `connector_outlookemail`2812 - SharePoint: `connector_sharepoint`28132814 - `"connector_dropbox"`28152816 - `"connector_gmail"`28172818 - `"connector_googlecalendar"`28192820 - `"connector_googledrive"`28212822 - `"connector_microsoftteams"`28232824 - `"connector_outlookcalendar"`28252826 - `"connector_outlookemail"`28272828 - `"connector_sharepoint"`28292830 - `defer_loading: optional boolean`28312832 Whether this MCP tool is deferred and discovered via tool search.28332834 - `headers: optional map[string] or null`28352836 Optional HTTP headers to send to the MCP server. Use for authentication2837 or other purposes.28382839 - `require_approval: optional object { always, never } or "always" or "never" or null`28402841 Specify which of the MCP server's tools require approval.28422843 - `McpToolApprovalFilter object { always, never }`28442845 Specify which of the MCP server's tools require approval. Can be2846 `always`, `never`, or a filter object associated with tools2847 that require approval.28482849 - `always: optional object { read_only, tool_names }`28502851 A filter object to specify which tools are allowed.28522853 - `read_only: optional boolean`28542855 Indicates whether or not a tool modifies data or is read-only. If an2856 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2857 it will match this filter.28582859 - `tool_names: optional array of string`28602861 List of allowed tool names.28622863 - `never: optional object { read_only, tool_names }`28642865 A filter object to specify which tools are allowed.28662867 - `read_only: optional boolean`28682869 Indicates whether or not a tool modifies data or is read-only. If an2870 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2871 it will match this filter.28722873 - `tool_names: optional array of string`28742875 List of allowed tool names.28762877 - `McpToolApprovalSetting = "always" or "never"`28782879 Specify a single approval policy for all tools. One of `always` or2880 `never`. When set to `always`, all tools will require approval. When2881 set to `never`, all tools will not require approval.28822883 - `"always"`28842885 - `"never"`28862887 - `server_description: optional string`28882889 Optional description of the MCP server, used to provide more context.28902891 - `server_url: optional string`28922893 The URL for the MCP server. One of `server_url`, `connector_id`, or2894 `tunnel_id` must be provided.28952896 - `tunnel_id: optional string`28972898 The Secure MCP Tunnel ID to use instead of a direct server URL. One of2899 `server_url`, `connector_id`, or `tunnel_id` must be provided.29002901 - `CodeInterpreter object { container, type, allowed_callers }`29022903 A tool that runs Python code to help generate a response to a prompt.29042905 - `container: string or object { type, file_ids, memory_limit, network_policy }`29062907 The code interpreter container. Can be a container ID or an object that2908 specifies uploaded file IDs to make available to your code, along with an2909 optional `memory_limit` setting.29102911 - `string`29122913 The container ID.29142915 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`29162917 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.29182919 - `type: "auto"`29202921 Always `auto`.29222923 - `"auto"`29242925 - `file_ids: optional array of string`29262927 An optional list of uploaded files to make available to your code.29282929 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`29302931 The memory limit for the code interpreter container.29322933 - `"1g"`29342935 - `"4g"`29362937 - `"16g"`29382939 - `"64g"`29402941 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`29422943 Network access policy for the container.29442945 - `ContainerNetworkPolicyDisabled object { type }`29462947 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`29482949 - `type: "code_interpreter"`29502951 The type of the code interpreter tool. Always `code_interpreter`.29522953 - `"code_interpreter"`29542955 - `allowed_callers: optional array of "direct" or "programmatic" or null`29562957 The tool invocation context(s).29582959 - `"direct"`29602961 - `"programmatic"`29622963 - `ProgrammaticToolCalling object { type }`29642965 - `type: "programmatic_tool_calling"`29662967 The type of the tool. Always `programmatic_tool_calling`.29682969 - `"programmatic_tool_calling"`29702971 - `ImageGeneration object { type, action, background, 9 more }`29722973 A tool that generates images using the GPT image models.29742975 - `type: "image_generation"`29762977 The type of the image generation tool. Always `image_generation`.29782979 - `"image_generation"`29802981 - `action: optional "generate" or "edit" or "auto"`29822983 Whether to generate a new image or edit an existing image. Default: `auto`.29842985 - `"generate"`29862987 - `"edit"`29882989 - `"auto"`29902991 - `background: optional "transparent" or "opaque" or "auto"`29922993 Set the background of the generated image. One of `transparent`, `opaque`,2994 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including2995 their `2026-09-08` snapshots, support `opaque` and `transparent`2996 backgrounds. Transparent backgrounds are available for supported GPT Image2997 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in2998 preview. When using `transparent`, set the output format to `png` or `webp`.2999 Default: `auto`.30003001 - `"transparent"`30023003 - `"opaque"`30043005 - `"auto"`30063007 - `input_fidelity: optional "high" or "low" or null`30083009 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`.30103011 - `"high"`30123013 - `"low"`30143015 - `input_image_mask: optional object { file_id, image_url }`30163017 Optional mask for inpainting. Contains `image_url`3018 (string, optional) and `file_id` (string, optional).30193020 - `file_id: optional string`30213022 File ID for the mask image.30233024 - `image_url: optional string`30253026 Base64-encoded mask image.30273028 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`30293030 The image generation model to use. One of `gpt-image-1`,3031 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,3032 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3033 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3034 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3035 `gpt-image-1`.30363037 - `string`30383039 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`30403041 The image generation model to use. One of `gpt-image-1`,3042 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,3043 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3044 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3045 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3046 `gpt-image-1`.30473048 - `"gpt-image-1"`30493050 - `"gpt-image-1-mini"`30513052 - `"gpt-image-1.5"`30533054 - `"gpt-image-2"`30553056 - `"gpt-image-2-2026-04-21"`30573058 - `"gpt-image-2.5-sunburst"`30593060 - `"gpt-image-2.5-sunburst-2026-09-08"`30613062 - `"gpt-image-2.5-flare"`30633064 - `"gpt-image-2.5-flare-2026-09-08"`30653066 - `moderation: optional "auto" or "low"`30673068 Moderation level for the generated image. Default: `auto`.30693070 - `"auto"`30713072 - `"low"`30733074 - `output_compression: optional number`30753076 Compression level for the output image. Default: 100.30773078 - `output_format: optional "png" or "webp" or "jpeg"`30793080 The output format of the generated image. One of `png`, `webp`, or3081 `jpeg`. Default: `png`.30823083 - `"png"`30843085 - `"webp"`30863087 - `"jpeg"`30883089 - `partial_images: optional number`30903091 Number of partial images to generate in streaming mode, from 0 (default value) to 3.30923093 - `quality: optional "low" or "medium" or "high" or 3 more`30943095 The quality of the generated image. The GPT image models support `low`,3096 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,3097 including their `2026-09-08` snapshots, also support `xhigh` and `max`.3098 Default: `auto`.30993100 - `"low"`31013102 - `"medium"`31033104 - `"high"`31053106 - `"xhigh"`31073108 - `"max"`31093110 - `"auto"`31113112 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`31133114 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`.31153116 - `string`31173118 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`31193120 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`.31213122 - `"1024x1024"`31233124 - `"1024x1536"`31253126 - `"1536x1024"`31273128 - `"auto"`31293130 - `LocalShell object { type }`31313132 A tool that allows the model to execute shell commands in a local environment.31333134 - `type: "local_shell"`31353136 The type of the local shell tool. Always `local_shell`.31373138 - `"local_shell"`31393140 - `Shell object { type, allowed_callers, environment }`31413142 A tool that allows the model to execute shell commands.31433144 - `type: "shell"`31453146 The type of the shell tool. Always `shell`.31473148 - `"shell"`31493150 - `allowed_callers: optional array of "direct" or "programmatic" or null`31513152 The tool invocation context(s).31533154 - `"direct"`31553156 - `"programmatic"`31573158 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`31593160 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`31613162 - `LocalEnvironment object { type, skills }`31633164 - `ContainerReference object { container_id, type }`31653166 - `Custom object { name, type, allowed_callers, 4 more }`31673168 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)31693170 - `name: string`31713172 The name of the custom tool, used to identify it in tool calls.31733174 - `type: "custom"`31753176 The type of the custom tool. Always `custom`.31773178 - `"custom"`31793180 - `allowed_callers: optional array of "direct" or "programmatic" or null`31813182 The tool invocation context(s).31833184 - `"direct"`31853186 - `"programmatic"`31873188 - `async: optional boolean`31893190 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.31913192 - `defer_loading: optional boolean`31933194 Whether this tool should be deferred and discovered via tool search.31953196 - `description: optional string`31973198 Optional description of the custom tool, used to provide more context.31993200 - `format: optional CustomToolInputFormat`32013202 The input format for the custom tool. Default is unconstrained text.32033204 - `Namespace object { description, name, tools, type }`32053206 Groups function/custom tools under a shared namespace.32073208 - `description: string`32093210 A description of the namespace shown to the model.32113212 - `name: string`32133214 The namespace name used in tool calls (for example, `crm`).32153216 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`32173218 The function/custom tools available inside this namespace.32193220 - `Function object { name, type, allowed_callers, 6 more }`32213222 - `name: string`32233224 - `type: "function"`32253226 - `"function"`32273228 - `allowed_callers: optional array of "direct" or "programmatic" or null`32293230 The tool invocation context(s).32313232 - `"direct"`32333234 - `"programmatic"`32353236 - `async: optional boolean`32373238 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.32393240 - `defer_loading: optional boolean`32413242 Whether this function should be deferred and discovered via tool search.32433244 - `description: optional string or null`32453246 - `output_schema: optional map[unknown] or null`32473248 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.32493250 - `parameters: optional unknown or null`32513252 - `strict: optional boolean or null`32533254 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.32553256 - `Custom object { name, type, allowed_callers, 4 more }`32573258 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)32593260 - `name: string`32613262 The name of the custom tool, used to identify it in tool calls.32633264 - `type: "custom"`32653266 The type of the custom tool. Always `custom`.32673268 - `"custom"`32693270 - `allowed_callers: optional array of "direct" or "programmatic" or null`32713272 The tool invocation context(s).32733274 - `"direct"`32753276 - `"programmatic"`32773278 - `async: optional boolean`32793280 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.32813282 - `defer_loading: optional boolean`32833284 Whether this tool should be deferred and discovered via tool search.32853286 - `description: optional string`32873288 Optional description of the custom tool, used to provide more context.32893290 - `format: optional CustomToolInputFormat`32913292 The input format for the custom tool. Default is unconstrained text.32933294 - `type: "namespace"`32953296 The type of the tool. Always `namespace`.32973298 - `"namespace"`32993300 - `ToolSearch object { type, description, execution, parameters }`33013302 Hosted or BYOT tool search configuration for deferred tools.33033304 - `type: "tool_search"`33053306 The type of the tool. Always `tool_search`.33073308 - `"tool_search"`33093310 - `description: optional string or null`33113312 Description shown to the model for a client-executed tool search tool.33133314 - `execution: optional "server" or "client"`33153316 Whether tool search is executed by the server or by the client.33173318 - `"server"`33193320 - `"client"`33213322 - `parameters: optional unknown or null`33233324 Parameter schema for a client-executed tool search tool.33253326 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`33273328 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).33293330 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`33313332 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.33333334 - `"web_search_preview"`33353336 - `"web_search_preview_2025_03_11"`33373338 - `search_content_types: optional array of "text" or "image"`33393340 - `"text"`33413342 - `"image"`33433344 - `search_context_size: optional "low" or "medium" or "high"`33453346 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.33473348 - `"low"`33493350 - `"medium"`33513352 - `"high"`33533354 - `user_location: optional object { type, city, country, 2 more } or null`33553356 The user's location.33573358 - `type: "approximate"`33593360 The type of location approximation. Always `approximate`.33613362 - `"approximate"`33633364 - `city: optional string or null`33653366 Free text input for the city of the user, e.g. `San Francisco`.33673368 - `country: optional string or null`33693370 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.33713372 - `region: optional string or null`33733374 Free text input for the region of the user, e.g. `California`.33753376 - `timezone: optional string or null`33773378 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.33793380 - `ApplyPatch object { type, allowed_callers }`33813382 Allows the assistant to create, delete, or update files using unified diffs.33833384 - `type: "apply_patch"`33853386 The type of the tool. Always `apply_patch`.33873388 - `"apply_patch"`33893390 - `allowed_callers: optional array of "direct" or "programmatic" or null`33913392 The tool invocation context(s).33933394 - `"direct"`33953396 - `"programmatic"`33973398 - `type: "additional_tools"`33993400 The item type. Always `additional_tools`.34013402 - `"additional_tools"`34033404 - `id: optional string or null`34053406 The unique ID of this additional tools item.34073408 - `ConfigurationUpdate object { type, id, reasoning }`34093410 An update to the conversation's response configuration. The configuration3411 remains in effect for subsequent responses until it is replaced by another3412 configuration update.34133414 - `type: "configuration_update"`34153416 The item type. Always `configuration_update`.34173418 - `"configuration_update"`34193420 - `id: optional string or null`34213422 The unique ID of the configuration update item.34233424 - `reasoning: optional object { effort }`34253426 Updates to reasoning configuration. Only effort is supported.34273428 - `effort: optional ReasoningEffort or null`34293430 The reasoning effort to use for subsequent responses until another3431 configuration update replaces it.34323433 - `"none"`34343435 - `"minimal"`34363437 - `"low"`34383439 - `"medium"`34403441 - `"high"`34423443 - `"xhigh"`34443445 - `"max"`34463447 - `Reasoning object { id, summary, type, 3 more }`34483449 A description of the chain of thought used by a reasoning model while generating3450 a response. Be sure to include these items in your `input` to the Responses API3451 for subsequent turns of a conversation if you are manually3452 [managing context](/api/docs/guides/conversation-state).34533454 - `id: string`34553456 The unique identifier of the reasoning content.34573458 - `summary: array of SummaryTextContent`34593460 Reasoning summary content.34613462 - `text: string`34633464 A summary of the reasoning output from the model so far.34653466 - `type: "summary_text"`34673468 The type of the object. Always `summary_text`.34693470 - `"summary_text"`34713472 - `type: "reasoning"`34733474 The type of the object. Always `reasoning`.34753476 - `"reasoning"`34773478 - `content: optional array of object { text, type }`34793480 Reasoning text content.34813482 - `text: string`34833484 The reasoning text from the model.34853486 - `type: "reasoning_text"`34873488 The type of the reasoning text. Always `reasoning_text`.34893490 - `"reasoning_text"`34913492 - `encrypted_content: optional string or null`34933494 The encrypted content of the reasoning item. This is populated by default3495 for reasoning items returned by `POST /v1/responses` and WebSocket3496 `response.create` requests.34973498 When streaming, use the completed reasoning item and its3499 `encrypted_content` from the `response.output_item.done` event in3500 subsequent requests. The `encrypted_content` in3501 `response.output_item.added` may be incomplete. This is especially3502 important when `store` is `false` or when using Zero Data Retention.35033504 - `status: optional "in_progress" or "completed" or "incomplete"`35053506 The status of the item. One of `in_progress`, `completed`, or3507 `incomplete`. Populated when items are returned via API.35083509 - `"in_progress"`35103511 - `"completed"`35123513 - `"incomplete"`35143515 - `Compaction object { encrypted_content, type, id }`35163517 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).35183519 - `encrypted_content: string`35203521 The encrypted content of the compaction summary.35223523 - `type: "compaction"`35243525 The type of the item. Always `compaction`.35263527 - `"compaction"`35283529 - `id: optional string or null`35303531 The ID of the compaction item.35323533 - `ImageGenerationCall object { id, result, status, 7 more }`35343535 An image generation request made by the model.35363537 - `id: string`35383539 The unique ID of the image generation call.35403541 - `result: string or null`35423543 The generated image encoded in base64.35443545 - `status: "in_progress" or "completed" or "generating" or "failed"`35463547 The status of the image generation call.35483549 - `"in_progress"`35503551 - `"completed"`35523553 - `"generating"`35543555 - `"failed"`35563557 - `type: "image_generation_call"`35583559 The type of the image generation call. Always `image_generation_call`.35603561 - `"image_generation_call"`35623563 - `action: optional "generate" or "edit" or "auto" or null`35643565 The action used for image generation.35663567 - `"generate"`35683569 - `"edit"`35703571 - `"auto"`35723573 - `background: optional "transparent" or "opaque" or "auto" or null`35743575 The background setting used for generation.35763577 - `"transparent"`35783579 - `"opaque"`35803581 - `"auto"`35823583 - `output_format: optional "png" or "webp" or "jpeg" or null`35843585 The output format used for generation.35863587 - `"png"`35883589 - `"webp"`35903591 - `"jpeg"`35923593 - `quality: optional "low" or "medium" or "high" or 3 more or null`35943595 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.35963597 - `"low"`35983599 - `"medium"`36003601 - `"high"`36023603 - `"xhigh"`36043605 - `"max"`36063607 - `"auto"`36083609 - `revised_prompt: optional string or null`36103611 The prompt that was used after any model prompt rewriting.36123613 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`36143615 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.36163617 - `string`36183619 - `"1024x1024" or "1024x1536" or "1536x1024"`36203621 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.36223623 - `"1024x1024"`36243625 - `"1024x1536"`36263627 - `"1536x1024"`36283629 - `CodeInterpreterCall object { id, code, container_id, 3 more }`36303631 A tool call to run code.36323633 - `id: string`36343635 The unique ID of the code interpreter tool call.36363637 - `code: string or null`36383639 The code to run, or null if not available.36403641 - `container_id: string`36423643 The ID of the container used to run the code.36443645 - `outputs: array of object { logs, type } or object { type, url } or null`36463647 The outputs generated by the code interpreter, such as logs or images.3648 Can be null if no outputs are available.36493650 - `Logs object { logs, type }`36513652 The logs output from the code interpreter.36533654 - `logs: string`36553656 The logs output from the code interpreter.36573658 - `type: "logs"`36593660 The type of the output. Always `logs`.36613662 - `"logs"`36633664 - `Image object { type, url }`36653666 The image output from the code interpreter.36673668 - `type: "image"`36693670 The type of the output. Always `image`.36713672 - `"image"`36733674 - `url: string`36753676 The URL of the image output from the code interpreter.36773678 - `status: "in_progress" or "completed" or "incomplete" or 2 more`36793680 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.36813682 - `"in_progress"`36833684 - `"completed"`36853686 - `"incomplete"`36873688 - `"interpreting"`36893690 - `"failed"`36913692 - `type: "code_interpreter_call"`36933694 The type of the code interpreter tool call. Always `code_interpreter_call`.36953696 - `"code_interpreter_call"`36973698 - `LocalShellCall object { id, action, call_id, 2 more }`36993700 A tool call to run a command on the local shell.37013702 - `id: string`37033704 The unique ID of the local shell call.37053706 - `action: object { command, env, type, 3 more }`37073708 Execute a shell command on the server.37093710 - `command: array of string`37113712 The command to run.37133714 - `env: map[string]`37153716 Environment variables to set for the command.37173718 - `type: "exec"`37193720 The type of the local shell action. Always `exec`.37213722 - `"exec"`37233724 - `timeout_ms: optional number or null`37253726 Optional timeout in milliseconds for the command.37273728 - `user: optional string or null`37293730 Optional user to run the command as.37313732 - `working_directory: optional string or null`37333734 Optional working directory to run the command in.37353736 - `call_id: string`37373738 The unique ID of the local shell tool call generated by the model.37393740 - `status: "in_progress" or "completed" or "incomplete"`37413742 The status of the local shell call.37433744 - `"in_progress"`37453746 - `"completed"`37473748 - `"incomplete"`37493750 - `type: "local_shell_call"`37513752 The type of the local shell call. Always `local_shell_call`.37533754 - `"local_shell_call"`37553756 - `LocalShellCallOutput object { id, output, type, status }`37573758 The output of a local shell tool call.37593760 - `id: string`37613762 The unique ID of the local shell tool call generated by the model.37633764 - `output: string`37653766 A JSON string of the output of the local shell tool call.37673768 - `type: "local_shell_call_output"`37693770 The type of the local shell tool call output. Always `local_shell_call_output`.37713772 - `"local_shell_call_output"`37733774 - `status: optional "in_progress" or "completed" or "incomplete" or null`37753776 The status of the item. One of `in_progress`, `completed`, or `incomplete`.37773778 - `"in_progress"`37793780 - `"completed"`37813782 - `"incomplete"`37833784 - `ShellCall object { action, call_id, type, 4 more }`37853786 A tool representing a request to execute one or more shell commands.37873788 - `action: object { commands, max_output_length, timeout_ms }`37893790 The shell commands and limits that describe how to run the tool call.37913792 - `commands: array of string`37933794 Ordered shell commands for the execution environment to run.37953796 - `max_output_length: optional number or null`37973798 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.37993800 - `timeout_ms: optional number or null`38013802 Maximum wall-clock time in milliseconds to allow the shell commands to run.38033804 - `call_id: string`38053806 The unique ID of the shell tool call generated by the model.38073808 - `type: "shell_call"`38093810 The type of the item. Always `shell_call`.38113812 - `"shell_call"`38133814 - `id: optional string or null`38153816 The unique ID of the shell tool call. Populated when this item is returned via API.38173818 - `caller: optional object { type } or object { caller_id, type } or null`38193820 The execution context that produced this tool call.38213822 - `Direct object { type }`38233824 - `type: "direct"`38253826 The caller type. Always `direct`.38273828 - `"direct"`38293830 - `Program object { caller_id, type }`38313832 - `caller_id: string`38333834 The call ID of the program item that produced this tool call.38353836 - `type: "program"`38373838 The caller type. Always `program`.38393840 - `"program"`38413842 - `environment: optional LocalEnvironment or ContainerReference or null`38433844 The environment to execute the shell commands in.38453846 - `LocalEnvironment object { type, skills }`38473848 - `ContainerReference object { container_id, type }`38493850 - `status: optional "in_progress" or "completed" or "incomplete" or null`38513852 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.38533854 - `"in_progress"`38553856 - `"completed"`38573858 - `"incomplete"`38593860 - `ShellCallOutput object { call_id, output, type, 4 more }`38613862 The streamed output items emitted by a shell tool call.38633864 - `call_id: string`38653866 The unique ID of the shell tool call generated by the model.38673868 - `output: array of ResponseFunctionShellCallOutputContent`38693870 Captured chunks of stdout and stderr output, along with their associated outcomes.38713872 - `outcome: object { type } or object { exit_code, type }`38733874 The exit or timeout outcome associated with this shell call.38753876 - `Timeout object { type }`38773878 Indicates that the shell call exceeded its configured time limit.38793880 - `type: "timeout"`38813882 The outcome type. Always `timeout`.38833884 - `"timeout"`38853886 - `Exit object { exit_code, type }`38873888 Indicates that the shell commands finished and returned an exit code.38893890 - `exit_code: number`38913892 The exit code returned by the shell process.38933894 - `type: "exit"`38953896 The outcome type. Always `exit`.38973898 - `"exit"`38993900 - `stderr: string`39013902 Captured stderr output for the shell call.39033904 - `stdout: string`39053906 Captured stdout output for the shell call.39073908 - `type: "shell_call_output"`39093910 The type of the item. Always `shell_call_output`.39113912 - `"shell_call_output"`39133914 - `id: optional string or null`39153916 The unique ID of the shell tool call output. Populated when this item is returned via API.39173918 - `caller: optional object { type } or object { caller_id, type } or null`39193920 The execution context that produced this tool call.39213922 - `Direct object { type }`39233924 - `type: "direct"`39253926 The caller type. Always `direct`.39273928 - `"direct"`39293930 - `Program object { caller_id, type }`39313932 - `caller_id: string`39333934 The call ID of the program item that produced this tool call.39353936 - `type: "program"`39373938 The caller type. Always `program`.39393940 - `"program"`39413942 - `max_output_length: optional number or null`39433944 The maximum number of UTF-8 characters captured for this shell call's combined output.39453946 - `status: optional "in_progress" or "completed" or "incomplete" or null`39473948 The status of the shell call output.39493950 - `"in_progress"`39513952 - `"completed"`39533954 - `"incomplete"`39553956 - `ApplyPatchCall object { call_id, operation, status, 3 more }`39573958 A tool call representing a request to create, delete, or update files using diff patches.39593960 - `call_id: string`39613962 The unique ID of the apply patch tool call generated by the model.39633964 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`39653966 The specific create, delete, or update instruction for the apply_patch tool call.39673968 - `CreateFile object { diff, path, type }`39693970 Instruction for creating a new file via the apply_patch tool.39713972 - `diff: string`39733974 Unified diff content to apply when creating the file.39753976 - `path: string`39773978 Path of the file to create relative to the workspace root.39793980 - `type: "create_file"`39813982 The operation type. Always `create_file`.39833984 - `"create_file"`39853986 - `DeleteFile object { path, type }`39873988 Instruction for deleting an existing file via the apply_patch tool.39893990 - `path: string`39913992 Path of the file to delete relative to the workspace root.39933994 - `type: "delete_file"`39953996 The operation type. Always `delete_file`.39973998 - `"delete_file"`39994000 - `UpdateFile object { diff, path, type }`40014002 Instruction for updating an existing file via the apply_patch tool.40034004 - `diff: string`40054006 Unified diff content to apply to the existing file.40074008 - `path: string`40094010 Path of the file to update relative to the workspace root.40114012 - `type: "update_file"`40134014 The operation type. Always `update_file`.40154016 - `"update_file"`40174018 - `status: "in_progress" or "completed"`40194020 The status of the apply patch tool call. One of `in_progress` or `completed`.40214022 - `"in_progress"`40234024 - `"completed"`40254026 - `type: "apply_patch_call"`40274028 The type of the item. Always `apply_patch_call`.40294030 - `"apply_patch_call"`40314032 - `id: optional string or null`40334034 The unique ID of the apply patch tool call. Populated when this item is returned via API.40354036 - `caller: optional object { type } or object { caller_id, type } or null`40374038 The execution context that produced this tool call.40394040 - `Direct object { type }`40414042 - `type: "direct"`40434044 The caller type. Always `direct`.40454046 - `"direct"`40474048 - `Program object { caller_id, type }`40494050 - `caller_id: string`40514052 The call ID of the program item that produced this tool call.40534054 - `type: "program"`40554056 The caller type. Always `program`.40574058 - `"program"`40594060 - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`40614062 The streamed output emitted by an apply patch tool call.40634064 - `call_id: string`40654066 The unique ID of the apply patch tool call generated by the model.40674068 - `status: "completed" or "failed"`40694070 The status of the apply patch tool call output. One of `completed` or `failed`.40714072 - `"completed"`40734074 - `"failed"`40754076 - `type: "apply_patch_call_output"`40774078 The type of the item. Always `apply_patch_call_output`.40794080 - `"apply_patch_call_output"`40814082 - `id: optional string or null`40834084 The unique ID of the apply patch tool call output. Populated when this item is returned via API.40854086 - `caller: optional object { type } or object { caller_id, type } or null`40874088 The execution context that produced this tool call.40894090 - `Direct object { type }`40914092 - `type: "direct"`40934094 The caller type. Always `direct`.40954096 - `"direct"`40974098 - `Program object { caller_id, type }`40994100 - `caller_id: string`41014102 The call ID of the program item that produced this tool call.41034104 - `type: "program"`41054106 The caller type. Always `program`.41074108 - `"program"`41094110 - `output: optional string or null`41114112 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).41134114 - `McpListTools object { id, server_label, tools, 2 more }`41154116 A list of tools available on an MCP server.41174118 - `id: string`41194120 The unique ID of the list.41214122 - `server_label: string`41234124 The label of the MCP server.41254126 - `tools: array of object { input_schema, name, annotations, description }`41274128 The tools available on the server.41294130 - `input_schema: unknown`41314132 The JSON schema describing the tool's input.41334134 - `name: string`41354136 The name of the tool.41374138 - `annotations: optional unknown or null`41394140 Additional annotations about the tool.41414142 - `description: optional string or null`41434144 The description of the tool.41454146 - `type: "mcp_list_tools"`41474148 The type of the item. Always `mcp_list_tools`.41494150 - `"mcp_list_tools"`41514152 - `error: optional string or null`41534154 Error message if the server could not list tools.41554156 - `McpApprovalRequest object { id, arguments, name, 2 more }`41574158 A request for human approval of a tool invocation.41594160 - `id: string`41614162 The unique ID of the approval request.41634164 - `arguments: string`41654166 A JSON string of arguments for the tool.41674168 - `name: string`41694170 The name of the tool to run.41714172 - `server_label: string`41734174 The label of the MCP server making the request.41754176 - `type: "mcp_approval_request"`41774178 The type of the item. Always `mcp_approval_request`.41794180 - `"mcp_approval_request"`41814182 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`41834184 A response to an MCP approval request.41854186 - `approval_request_id: string`41874188 The ID of the approval request being answered.41894190 - `approve: boolean`41914192 Whether the request was approved.41934194 - `type: "mcp_approval_response"`41954196 The type of the item. Always `mcp_approval_response`.41974198 - `"mcp_approval_response"`41994200 - `id: optional string or null`42014202 The unique ID of the approval response42034204 - `reason: optional string or null`42054206 Optional reason for the decision.42074208 - `McpCall object { id, arguments, name, 6 more }`42094210 An invocation of a tool on an MCP server.42114212 - `id: string`42134214 The unique ID of the tool call.42154216 - `arguments: string`42174218 A JSON string of the arguments passed to the tool.42194220 - `name: string`42214222 The name of the tool that was run.42234224 - `server_label: string`42254226 The label of the MCP server running the tool.42274228 - `type: "mcp_call"`42294230 The type of the item. Always `mcp_call`.42314232 - `"mcp_call"`42334234 - `approval_request_id: optional string or null`42354236 Unique identifier for the MCP tool call approval request.4237 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.42384239 - `error: optional McpToolCallError or null`42404241 The error from the tool call, if any.42424243 - `McpProtocolError object { code, message, type }`42444245 - `code: number`42464247 - `message: string`42484249 - `type: "mcp_protocol_error"`42504251 - `"mcp_protocol_error"`42524253 - `McpToolExecutionError object { content, type }`42544255 - `content: unknown`42564257 - `type: "mcp_tool_execution_error"`42584259 - `"mcp_tool_execution_error"`42604261 - `HTTPError object { code, message, type }`42624263 - `code: number`42644265 - `message: string`42664267 - `type: "http_error"`42684269 - `"http_error"`42704271 - `output: optional string or null`42724273 The output from the tool call.42744275 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`42764277 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.42784279 - `"in_progress"`42804281 - `"completed"`42824283 - `"incomplete"`42844285 - `"calling"`42864287 - `"failed"`42884289 - `CustomToolCallOutput object { call_id, output, type, 2 more }`42904291 The output of a custom tool call from your code, being sent back to the model.42924293 - `call_id: string`42944295 The call ID, used to map this custom tool call output to a custom tool call.42964297 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`42984299 The output from the custom tool call generated by your code.4300 Can be a string or an list of output content.43014302 - `StringOutput = string`43034304 A string of the output of the custom tool call.43054306 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`43074308 Text, image, or file output of the custom tool call.43094310 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`43114312 A text input to the model.43134314 - `ResponseInputImage object { detail, type, file_id, 2 more }`43154316 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).43174318 - `ResponseInputFile object { type, detail, file_data, 4 more }`43194320 A file input to the model.43214322 - `type: "custom_tool_call_output"`43234324 The type of the custom tool call output. Always `custom_tool_call_output`.43254326 - `"custom_tool_call_output"`43274328 - `id: optional string`43294330 The unique ID of the custom tool call output in the OpenAI platform.43314332 - `caller: optional object { type } or object { caller_id, type } or null`43334334 The execution context that produced this tool call.43354336 - `Direct object { type }`43374338 - `type: "direct"`43394340 The caller type. Always `direct`.43414342 - `"direct"`43434344 - `Program object { caller_id, type }`43454346 - `caller_id: string`43474348 The call ID of the program item that produced this tool call.43494350 - `type: "program"`43514352 The caller type. Always `program`.43534354 - `"program"`43554356 - `CustomToolCall object { call_id, input, name, 5 more }`43574358 A call to a custom tool created by the model.43594360 - `call_id: string`43614362 An identifier used to map this custom tool call to a tool call output.43634364 - `input: string`43654366 The input for the custom tool call generated by the model.43674368 - `name: string`43694370 The name of the custom tool being called.43714372 - `type: "custom_tool_call"`43734374 The type of the custom tool call. Always `custom_tool_call`.43754376 - `"custom_tool_call"`43774378 - `id: optional string`43794380 The unique ID of the custom tool call in the OpenAI platform.43814382 - `async: optional boolean`43834384 Whether the custom tool call runs asynchronously.43854386 - `caller: optional object { type } or object { caller_id, type } or null`43874388 The execution context that produced this tool call.43894390 - `Direct object { type }`43914392 - `type: "direct"`43934394 - `"direct"`43954396 - `Program object { caller_id, type }`43974398 - `caller_id: string`43994400 The call ID of the program item that produced this tool call.44014402 - `type: "program"`44034404 - `"program"`44054406 - `namespace: optional string`44074408 The namespace of the custom tool being called.44094410 - `CompactionTrigger object { type, id }`44114412 Compacts the current context. Must be the final input item.44134414 - `type: "compaction_trigger"`44154416 The type of the item. Always `compaction_trigger`.44174418 - `"compaction_trigger"`44194420 - `id: optional string or null`44214422 The unique ID of this compaction trigger.44234424 - `ItemReference object { id, type }`44254426 An internal identifier for an item to reference.44274428 - `id: string`44294430 The ID of the item to reference.44314432 - `type: optional "item_reference" or null`44334434 The type of item to reference. Always `item_reference`.44354436 - `"item_reference"`44374438 - `Program object { id, call_id, code, 2 more }`44394440 - `id: string`44414442 The unique ID of this program item.44434444 - `call_id: string`44454446 The stable call ID of the program item.44474448 - `code: string`44494450 The JavaScript source executed by programmatic tool calling.44514452 - `fingerprint: string`44534454 Opaque program replay fingerprint that must be round-tripped.44554456 - `type: "program"`44574458 The item type. Always `program`.44594460 - `"program"`44614462 - `ProgramOutput object { id, call_id, result, 2 more }`44634464 - `id: string`44654466 The unique ID of this program output item.44674468 - `call_id: string`44694470 The call ID of the program item.44714472 - `result: string`44734474 The result produced by the program item.44754476 - `status: "completed" or "incomplete"`44774478 The terminal status of the program output.44794480 - `"completed"`44814482 - `"incomplete"`44834484 - `type: "program_output"`44854486 The item type. Always `program_output`.44874488 - `"program_output"`44894490 - `metadata: Metadata or null`44914492 Set of 16 key-value pairs that can be attached to an object. This can be4493 useful for storing additional information about the object in a structured4494 format, and querying for objects via API or the dashboard.44954496 Keys are strings with a maximum length of 64 characters. Values are strings4497 with a maximum length of 512 characters.44984499 - `model: ResponsesModel`45004501 Model ID used to generate the response, like `gpt-6-astra`. OpenAI4502 offers a wide range of models with different capabilities, performance4503 characteristics, and price points. Refer to the [model guide](/api/docs/models)4504 to browse and compare available models.45054506 - `string`45074508 - `"gpt-6-astra" or "gpt-5.6-sol" or "gpt-5.6-terra" or 82 more`45094510 - `"gpt-6-astra"`45114512 - `"gpt-5.6-sol"`45134514 - `"gpt-5.6-terra"`45154516 - `"gpt-5.6-luna"`45174518 - `"gpt-5.5"`45194520 - `"gpt-5.5-2026-04-23"`45214522 - `"gpt-5.4"`45234524 - `"gpt-5.4-mini"`45254526 - `"gpt-5.4-nano"`45274528 - `"gpt-5.4-mini-2026-03-17"`45294530 - `"gpt-5.4-nano-2026-03-17"`45314532 - `"gpt-5.3-chat-latest"`45334534 - `"gpt-5.2"`45354536 - `"gpt-5.2-2025-12-11"`45374538 - `"gpt-5.2-chat-latest"`45394540 - `"gpt-5.2-pro"`45414542 - `"gpt-5.2-pro-2025-12-11"`45434544 - `"gpt-5.1"`45454546 - `"gpt-5.1-2025-11-13"`45474548 - `"gpt-5.1-codex"`45494550 - `"gpt-5.1-chat-latest"`45514552 - `"gpt-5"`45534554 - `"gpt-5-mini"`45554556 - `"gpt-5-nano"`45574558 - `"gpt-5-2025-08-07"`45594560 - `"gpt-5-mini-2025-08-07"`45614562 - `"gpt-5-nano-2025-08-07"`45634564 - `"gpt-5-chat-latest"`45654566 - `"gpt-4.1"`45674568 - `"gpt-4.1-mini"`45694570 - `"gpt-4.1-nano"`45714572 - `"gpt-4.1-2025-04-14"`45734574 - `"gpt-4.1-mini-2025-04-14"`45754576 - `"gpt-4.1-nano-2025-04-14"`45774578 - `"o4-mini"`45794580 - `"o4-mini-2025-04-16"`45814582 - `"o3"`45834584 - `"o3-2025-04-16"`45854586 - `"o3-mini"`45874588 - `"o3-mini-2025-01-31"`45894590 - `"o1"`45914592 - `"o1-2024-12-17"`45934594 - `"o1-preview"`45954596 - `"o1-preview-2024-09-12"`45974598 - `"o1-mini"`45994600 - `"o1-mini-2024-09-12"`46014602 - `"gpt-4o"`46034604 - `"gpt-4o-2024-11-20"`46054606 - `"gpt-4o-2024-08-06"`46074608 - `"gpt-4o-2024-05-13"`46094610 - `"gpt-audio-mini"`46114612 - `"gpt-audio-mini-2025-12-15"`46134614 - `"gpt-4o-audio-preview"`46154616 - `"gpt-4o-audio-preview-2024-10-01"`46174618 - `"gpt-4o-audio-preview-2024-12-17"`46194620 - `"gpt-4o-audio-preview-2025-06-03"`46214622 - `"gpt-4o-mini-audio-preview"`46234624 - `"gpt-4o-mini-audio-preview-2024-12-17"`46254626 - `"gpt-4o-search-preview"`46274628 - `"gpt-4o-mini-search-preview"`46294630 - `"gpt-4o-search-preview-2025-03-11"`46314632 - `"gpt-4o-mini-search-preview-2025-03-11"`46334634 - `"chatgpt-4o-latest"`46354636 - `"codex-mini-latest"`46374638 - `"gpt-4o-mini"`46394640 - `"gpt-4o-mini-2024-07-18"`46414642 - `"gpt-4-turbo"`46434644 - `"gpt-4-turbo-2024-04-09"`46454646 - `"gpt-4-0125-preview"`46474648 - `"gpt-4-turbo-preview"`46494650 - `"gpt-4-1106-preview"`46514652 - `"gpt-4-vision-preview"`46534654 - `"gpt-4"`46554656 - `"gpt-4-0314"`46574658 - `"gpt-4-0613"`46594660 - `"gpt-4-32k"`46614662 - `"gpt-4-32k-0314"`46634664 - `"gpt-4-32k-0613"`46654666 - `"gpt-3.5-turbo"`46674668 - `"gpt-3.5-turbo-16k"`46694670 - `"gpt-3.5-turbo-0301"`46714672 - `"gpt-3.5-turbo-0613"`46734674 - `"gpt-3.5-turbo-1106"`46754676 - `"gpt-3.5-turbo-0125"`46774678 - `"gpt-3.5-turbo-16k-0613"`46794680 - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 16 more`46814682 - `"o1-pro"`46834684 - `"o1-pro-2025-03-19"`46854686 - `"o3-pro"`46874688 - `"o3-pro-2025-06-10"`46894690 - `"o3-deep-research"`46914692 - `"o3-deep-research-2025-06-26"`46934694 - `"o4-mini-deep-research"`46954696 - `"o4-mini-deep-research-2025-06-26"`46974698 - `"computer-use-preview"`46994700 - `"computer-use-preview-2025-03-11"`47014702 - `"gpt-5.5-pro"`47034704 - `"gpt-5.5-pro-2026-04-23"`47054706 - `"gpt-5-codex"`47074708 - `"gpt-5-pro"`47094710 - `"gpt-5-pro-2025-10-06"`47114712 - `"gpt-5.1-codex-max"`47134714 - `"gpt-daybreak-blue-latest"`47154716 - `"gpt-daybreak-red-latest"`47174718 - `"gpt-5.6-cyber"`47194720 - `object: "response"`47214722 The object type of this resource - always set to `response`.47234724 - `"response"`47254726 - `output: array of ResponseOutputItem`47274728 An array of content items generated by the model.47294730 - The length and order of items in the `output` array is dependent4731 on the model's response.4732 - Rather than accessing the first item in the `output` array and4733 assuming it's an `assistant` message with the content generated by4734 the model, you might consider using the `output_text` property where4735 supported in SDKs.47364737 - `ResponseOutputMessage object { id, content, role, 3 more }`47384739 An output message from the model.47404741 - `FileSearchCall object { id, queries, status, 2 more }`47424743 The results of a file search tool call. See the4744 [file search guide](/api/docs/guides/tools-file-search) for more information.47454746 - `id: string`47474748 The unique ID of the file search tool call.47494750 - `queries: array of string`47514752 The queries used to search for files.47534754 - `status: "in_progress" or "searching" or "completed" or 2 more`47554756 The status of the file search tool call. One of `in_progress`,4757 `searching`, `incomplete` or `failed`,47584759 - `"in_progress"`47604761 - `"searching"`47624763 - `"completed"`47644765 - `"incomplete"`47664767 - `"failed"`47684769 - `type: "file_search_call"`47704771 The type of the file search tool call. Always `file_search_call`.47724773 - `"file_search_call"`47744775 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`47764777 The results of the file search tool call.47784779 - `attributes: optional map[string or number or boolean] or null`47804781 Set of 16 key-value pairs that can be attached to an object. This can be4782 useful for storing additional information about the object in a structured4783 format, and querying for objects via API or the dashboard. Keys are strings4784 with a maximum length of 64 characters. Values are strings with a maximum4785 length of 512 characters, booleans, or numbers.47864787 - `string`47884789 - `number`47904791 - `boolean`47924793 - `file_id: optional string`47944795 The unique ID of the file.47964797 - `filename: optional string`47984799 The name of the file.48004801 - `score: optional number`48024803 The relevance score of the file - a value between 0 and 1.48044805 - `text: optional string`48064807 The text that was retrieved from the file.48084809 - `FunctionCall object { arguments, call_id, name, 6 more }`48104811 A tool call to run a function. See the4812 [function calling guide](/api/docs/guides/function-calling) for more information.48134814 - `arguments: string`48154816 A JSON string of the arguments to pass to the function.48174818 - `call_id: string`48194820 The unique ID of the function tool call generated by the model.48214822 - `name: string`48234824 The name of the function to run.48254826 - `type: "function_call"`48274828 The type of the function tool call. Always `function_call`.48294830 - `"function_call"`48314832 - `id: optional string`48334834 The unique ID of the function tool call.48354836 - `async: optional boolean`48374838 Whether the function tool call runs asynchronously.48394840 - `caller: optional object { type } or object { caller_id, type } or null`48414842 The execution context that produced this tool call.48434844 - `Direct object { type }`48454846 - `type: "direct"`48474848 - `"direct"`48494850 - `Program object { caller_id, type }`48514852 - `caller_id: string`48534854 The call ID of the program item that produced this tool call.48554856 - `type: "program"`48574858 - `"program"`48594860 - `namespace: optional string`48614862 The namespace of the function to run.48634864 - `status: optional "in_progress" or "completed" or "incomplete"`48654866 The status of the item. One of `in_progress`, `completed`, or4867 `incomplete`. Populated when items are returned via API.48684869 - `"in_progress"`48704871 - `"completed"`48724873 - `"incomplete"`48744875 - `FunctionCallOutput object { id, output, status, 6 more }`48764877 - `id: string`48784879 The unique ID of the function call tool output.48804881 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`48824883 The output from the function call generated by your code.4884 Can be a string or an list of output content.48854886 - `StringOutput = string`48874888 A string of the output of the function call.48894890 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`48914892 Text, image, or file output of the function call.48934894 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`48954896 A text input to the model.48974898 - `ResponseInputImage object { detail, type, file_id, 2 more }`48994900 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).49014902 - `ResponseInputFile object { type, detail, file_data, 4 more }`49034904 A file input to the model.49054906 - `status: "in_progress" or "completed" or "incomplete"`49074908 The status of the item. One of `in_progress`, `completed`, or4909 `incomplete`. Populated when items are returned via API.49104911 - `"in_progress"`49124913 - `"completed"`49144915 - `"incomplete"`49164917 - `type: "function_call_output"`49184919 The type of the function tool call output. Always `function_call_output`.49204921 - `"function_call_output"`49224923 - `call_id: optional string`49244925 The unique ID of the function tool call generated by the model.49264927 - `caller: optional object { type } or object { caller_id, type } or null`49284929 The execution context that produced this tool call.49304931 - `Direct object { type }`49324933 - `type: "direct"`49344935 The caller type. Always `direct`.49364937 - `"direct"`49384939 - `Program object { caller_id, type }`49404941 - `caller_id: string`49424943 The call ID of the program item that produced this tool call.49444945 - `type: "program"`49464947 The caller type. Always `program`.49484949 - `"program"`49504951 - `created_by: optional string`49524953 The identifier of the actor that created the item.49544955 - `name: optional string`49564957 The name of the tool that produced the output.49584959 - `namespace: optional string`49604961 The namespace of the tool that produced the output.49624963 - `WebSearchCall object { id, action, status, type }`49644965 The results of a web search tool call. See the4966 [web search guide](/api/docs/guides/tools-web-search) for more information.49674968 - `id: string`49694970 The unique ID of the web search tool call.49714972 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`49734974 An object describing the specific action taken in this web search call.4975 Includes details on how the model used the web (search, open_page, find_in_page).49764977 - `Search object { type, queries, query, sources }`49784979 Action type "search" - Performs a web search query.49804981 - `type: "search"`49824983 The action type.49844985 - `"search"`49864987 - `queries: optional array of string`49884989 The search queries.49904991 - `query: optional string`49924993 The search query.49944995 - `sources: optional array of object { type, url }`49964997 The sources used in the search.49984999 - `type: "url"`50005001 The type of source. Always `url`.50025003 - `"url"`50045005 - `url: string`50065007 The URL of the source.50085009 - `OpenPage object { type, url }`50105011 Action type "open_page" - Opens a specific URL from search results.50125013 - `type: "open_page"`50145015 The action type.50165017 - `"open_page"`50185019 - `url: optional string or null`50205021 The URL opened by the model.50225023 - `FindInPage object { pattern, type, url }`50245025 Action type "find_in_page": Searches for a pattern within a loaded page.50265027 - `pattern: string`50285029 The pattern or text to search for within the page.50305031 - `type: "find_in_page"`50325033 The action type.50345035 - `"find_in_page"`50365037 - `url: string`50385039 The URL of the page searched for the pattern.50405041 - `status: "in_progress" or "searching" or "completed" or 2 more`50425043 The status of the web search tool call.50445045 - `"in_progress"`50465047 - `"searching"`50485049 - `"completed"`50505051 - `"failed"`50525053 - `"incomplete"`50545055 - `type: "web_search_call"`50565057 The type of the web search tool call. Always `web_search_call`.50585059 - `"web_search_call"`50605061 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`50625063 A tool call to a computer use tool. See the5064 [computer use guide](/api/docs/guides/tools-computer-use) for more information.50655066 - `id: string`50675068 The unique ID of the computer call.50695070 - `call_id: string`50715072 An identifier used when responding to the tool call with output.50735074 - `pending_safety_checks: array of object { id, code, message }`50755076 The pending safety checks for the computer call.50775078 - `id: string`50795080 The ID of the pending safety check.50815082 - `code: optional string or null`50835084 The type of the pending safety check.50855086 - `message: optional string or null`50875088 Details about the pending safety check.50895090 - `status: "in_progress" or "completed" or "incomplete"`50915092 The status of the item. One of `in_progress`, `completed`, or5093 `incomplete`. Populated when items are returned via API.50945095 - `"in_progress"`50965097 - `"completed"`50985099 - `"incomplete"`51005101 - `type: "computer_call"`51025103 The type of the computer call. Always `computer_call`.51045105 - `"computer_call"`51065107 - `action: optional ComputerAction`51085109 A click action.51105111 - `actions: optional ComputerActionList`51125113 Flattened batched actions for `computer_use`. Each action includes an5114 `type` discriminator and action-specific fields.51155116 - `ComputerCallOutput object { id, call_id, output, 4 more }`51175118 - `id: string`51195120 The unique ID of the computer call tool output.51215122 - `call_id: string`51235124 The ID of the computer tool call that produced the output.51255126 - `output: ResponseComputerToolCallOutputScreenshot`51275128 A computer screenshot image used with the computer use tool.51295130 - `status: "completed" or "incomplete" or "failed" or "in_progress"`51315132 The status of the message input. One of `in_progress`, `completed`, or5133 `incomplete`. Populated when input items are returned via API.51345135 - `"completed"`51365137 - `"incomplete"`51385139 - `"failed"`51405141 - `"in_progress"`51425143 - `type: "computer_call_output"`51445145 The type of the computer tool call output. Always `computer_call_output`.51465147 - `"computer_call_output"`51485149 - `acknowledged_safety_checks: optional array of object { id, code, message }`51505151 The safety checks reported by the API that have been acknowledged by the5152 developer.51535154 - `id: string`51555156 The ID of the pending safety check.51575158 - `code: optional string or null`51595160 The type of the pending safety check.51615162 - `message: optional string or null`51635164 Details about the pending safety check.51655166 - `created_by: optional string`51675168 The identifier of the actor that created the item.51695170 - `Reasoning object { id, summary, type, 3 more }`51715172 A description of the chain of thought used by a reasoning model while generating5173 a response. Be sure to include these items in your `input` to the Responses API5174 for subsequent turns of a conversation if you are manually5175 [managing context](/api/docs/guides/conversation-state).51765177 - `id: string`51785179 The unique identifier of the reasoning content.51805181 - `summary: array of SummaryTextContent`51825183 Reasoning summary content.51845185 - `text: string`51865187 A summary of the reasoning output from the model so far.51885189 - `type: "summary_text"`51905191 The type of the object. Always `summary_text`.51925193 - `type: "reasoning"`51945195 The type of the object. Always `reasoning`.51965197 - `"reasoning"`51985199 - `content: optional array of object { text, type }`52005201 Reasoning text content.52025203 - `text: string`52045205 The reasoning text from the model.52065207 - `type: "reasoning_text"`52085209 The type of the reasoning text. Always `reasoning_text`.52105211 - `"reasoning_text"`52125213 - `encrypted_content: optional string or null`52145215 The encrypted content of the reasoning item. This is populated by default5216 for reasoning items returned by `POST /v1/responses` and WebSocket5217 `response.create` requests.52185219 When streaming, use the completed reasoning item and its5220 `encrypted_content` from the `response.output_item.done` event in5221 subsequent requests. The `encrypted_content` in5222 `response.output_item.added` may be incomplete. This is especially5223 important when `store` is `false` or when using Zero Data Retention.52245225 - `status: optional "in_progress" or "completed" or "incomplete"`52265227 The status of the item. One of `in_progress`, `completed`, or5228 `incomplete`. Populated when items are returned via API.52295230 - `"in_progress"`52315232 - `"completed"`52335234 - `"incomplete"`52355236 - `Program object { id, call_id, code, 2 more }`52375238 - `id: string`52395240 The unique ID of the program item.52415242 - `call_id: string`52435244 The stable call ID of the program item.52455246 - `code: string`52475248 The JavaScript source executed by programmatic tool calling.52495250 - `fingerprint: string`52515252 Opaque program replay fingerprint that must be round-tripped.52535254 - `type: "program"`52555256 The type of the item. Always `program`.52575258 - `"program"`52595260 - `ProgramOutput object { id, call_id, result, 2 more }`52615262 - `id: string`52635264 The unique ID of the program output item.52655266 - `call_id: string`52675268 The call ID of the program item.52695270 - `result: string`52715272 The result produced by the program item.52735274 - `status: "completed" or "incomplete"`52755276 The terminal status of the program output item.52775278 - `"completed"`52795280 - `"incomplete"`52815282 - `type: "program_output"`52835284 The type of the item. Always `program_output`.52855286 - `"program_output"`52875288 - `ToolSearchCall object { id, arguments, call_id, 4 more }`52895290 - `id: string`52915292 The unique ID of the tool search call item.52935294 - `arguments: unknown`52955296 Arguments used for the tool search call.52975298 - `call_id: string or null`52995300 The unique ID of the tool search call generated by the model.53015302 - `execution: "server" or "client"`53035304 Whether tool search was executed by the server or by the client.53055306 - `"server"`53075308 - `"client"`53095310 - `status: "in_progress" or "completed" or "incomplete"`53115312 The status of the tool search call item that was recorded.53135314 - `"in_progress"`53155316 - `"completed"`53175318 - `"incomplete"`53195320 - `type: "tool_search_call"`53215322 The type of the item. Always `tool_search_call`.53235324 - `"tool_search_call"`53255326 - `created_by: optional string`53275328 The identifier of the actor that created the item.53295330 - `ToolSearchOutput object { id, call_id, execution, 4 more }`53315332 - `id: string`53335334 The unique ID of the tool search output item.53355336 - `call_id: string or null`53375338 The unique ID of the tool search call generated by the model.53395340 - `execution: "server" or "client"`53415342 Whether tool search was executed by the server or by the client.53435344 - `"server"`53455346 - `"client"`53475348 - `status: "in_progress" or "completed" or "incomplete"`53495350 The status of the tool search output item that was recorded.53515352 - `"in_progress"`53535354 - `"completed"`53555356 - `"incomplete"`53575358 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`53595360 The loaded tool definitions returned by tool search.53615362 - `Function object { name, parameters, strict, 6 more }`53635364 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).53655366 - `name: string`53675368 The name of the function to call.53695370 - `parameters: map[unknown] or null`53715372 A JSON schema object describing the parameters of the function.53735374 - `strict: boolean or null`53755376 Whether strict parameter validation is enforced for this function tool.53775378 - `type: "function"`53795380 The type of the function tool. Always `function`.53815382 - `"function"`53835384 - `allowed_callers: optional array of "direct" or "programmatic" or null`53855386 The tool invocation context(s).53875388 - `"direct"`53895390 - `"programmatic"`53915392 - `async: optional boolean`53935394 - `defer_loading: optional boolean`53955396 Whether this function is deferred and loaded via tool search.53975398 - `description: optional string or null`53995400 A description of the function. Used by the model to determine whether or not to call the function.54015402 - `output_schema: optional map[unknown] or null`54035404 A JSON schema object describing the JSON value encoded in string outputs for this function.54055406 - `FileSearch object { type, vector_store_ids, filters, 2 more }`54075408 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).54095410 - `type: "file_search"`54115412 The type of the file search tool. Always `file_search`.54135414 - `"file_search"`54155416 - `vector_store_ids: array of string`54175418 The IDs of the vector stores to search.54195420 - `filters: optional ComparisonFilter or CompoundFilter or null`54215422 A filter to apply.54235424 - `ComparisonFilter object { key, type, value }`54255426 A filter used to compare a specified attribute key to a given value using a defined comparison operation.54275428 - `CompoundFilter object { filters, type }`54295430 Combine multiple filters using `and` or `or`.54315432 - `max_num_results: optional number`54335434 The maximum number of results to return. This number should be between 1 and 50 inclusive.54355436 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`54375438 Ranking options for search.54395440 - `hybrid_search: optional object { embedding_weight, text_weight }`54415442 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.54435444 - `embedding_weight: number`54455446 The weight of the embedding in the reciprocal ranking fusion.54475448 - `text_weight: number`54495450 The weight of the text in the reciprocal ranking fusion.54515452 - `ranker: optional "auto" or "default-2024-11-15"`54535454 The ranker to use for the file search.54555456 - `"auto"`54575458 - `"default-2024-11-15"`54595460 - `score_threshold: optional number`54615462 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.54635464 - `Computer object { type }`54655466 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).54675468 - `type: "computer"`54695470 The type of the computer tool. Always `computer`.54715472 - `"computer"`54735474 - `ComputerUsePreview object { display_height, display_width, environment, type }`54755476 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).54775478 - `display_height: number`54795480 The height of the computer display.54815482 - `display_width: number`54835484 The width of the computer display.54855486 - `environment: "windows" or "mac" or "linux" or 2 more`54875488 The type of computer environment to control.54895490 - `"windows"`54915492 - `"mac"`54935494 - `"linux"`54955496 - `"ubuntu"`54975498 - `"browser"`54995500 - `type: "computer_use_preview"`55015502 The type of the computer use tool. Always `computer_use_preview`.55035504 - `"computer_use_preview"`55055506 - `WebSearch object { type, external_web_access, filters, 2 more }`55075508 Search the Internet for sources related to the prompt. Learn more about the5509 [web search tool](/api/docs/guides/tools-web-search).55105511 - `type: "web_search" or "web_search_2025_08_26"`55125513 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.55145515 - `"web_search"`55165517 - `"web_search_2025_08_26"`55185519 - `external_web_access: optional boolean`55205521 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.55225523 - `filters: optional object { allowed_domains } or null`55245525 Filters for the search.55265527 - `allowed_domains: optional array of string or null`55285529 Allowed domains for the search. If not provided, all domains are allowed.5530 Subdomains of the provided domains are allowed as well.55315532 Example: `["pubmed.ncbi.nlm.nih.gov"]`55335534 - `search_context_size: optional "low" or "medium" or "high"`55355536 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.55375538 - `"low"`55395540 - `"medium"`55415542 - `"high"`55435544 - `user_location: optional object { city, country, region, 2 more } or null`55455546 The approximate location of the user.55475548 - `city: optional string or null`55495550 Free text input for the city of the user, e.g. `San Francisco`.55515552 - `country: optional string or null`55535554 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.55555556 - `region: optional string or null`55575558 Free text input for the region of the user, e.g. `California`.55595560 - `timezone: optional string or null`55615562 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.55635564 - `type: optional "approximate"`55655566 The type of location approximation. Always `approximate`.55675568 - `"approximate"`55695570 - `Mcp object { server_label, type, allowed_callers, 9 more }`55715572 Give the model access to additional tools via remote Model Context Protocol5573 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).55745575 - `server_label: string`55765577 A label for this MCP server, used to identify it in tool calls.55785579 - `type: "mcp"`55805581 The type of the MCP tool. Always `mcp`.55825583 - `"mcp"`55845585 - `allowed_callers: optional array of "direct" or "programmatic" or null`55865587 The tool invocation context(s).55885589 - `"direct"`55905591 - `"programmatic"`55925593 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`55945595 List of allowed tool names or a filter object.55965597 - `McpAllowedTools = array of string`55985599 A string array of allowed tool names56005601 - `McpToolFilter object { read_only, tool_names }`56025603 A filter object to specify which tools are allowed.56045605 - `read_only: optional boolean`56065607 Indicates whether or not a tool modifies data or is read-only. If an5608 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5609 it will match this filter.56105611 - `tool_names: optional array of string`56125613 List of allowed tool names.56145615 - `authorization: optional string`56165617 An OAuth access token that can be used with a remote MCP server, either5618 with a custom MCP server URL or a service connector. Your application5619 must handle the OAuth authorization flow and provide the token here.56205621 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`56225623 Identifier for service connectors, like those available in ChatGPT. One of5624 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more5625 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).56265627 This field is deprecated for models released after September 1, 2026.5628 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to5629 connect through a Secure MCP Tunnel.56305631 Currently supported `connector_id` values are:56325633 - Dropbox: `connector_dropbox`5634 - Gmail: `connector_gmail`5635 - Google Calendar: `connector_googlecalendar`5636 - Google Drive: `connector_googledrive`5637 - Microsoft Teams: `connector_microsoftteams`5638 - Outlook Calendar: `connector_outlookcalendar`5639 - Outlook Email: `connector_outlookemail`5640 - SharePoint: `connector_sharepoint`56415642 - `"connector_dropbox"`56435644 - `"connector_gmail"`56455646 - `"connector_googlecalendar"`56475648 - `"connector_googledrive"`56495650 - `"connector_microsoftteams"`56515652 - `"connector_outlookcalendar"`56535654 - `"connector_outlookemail"`56555656 - `"connector_sharepoint"`56575658 - `defer_loading: optional boolean`56595660 Whether this MCP tool is deferred and discovered via tool search.56615662 - `headers: optional map[string] or null`56635664 Optional HTTP headers to send to the MCP server. Use for authentication5665 or other purposes.56665667 - `require_approval: optional object { always, never } or "always" or "never" or null`56685669 Specify which of the MCP server's tools require approval.56705671 - `McpToolApprovalFilter object { always, never }`56725673 Specify which of the MCP server's tools require approval. Can be5674 `always`, `never`, or a filter object associated with tools5675 that require approval.56765677 - `always: optional object { read_only, tool_names }`56785679 A filter object to specify which tools are allowed.56805681 - `read_only: optional boolean`56825683 Indicates whether or not a tool modifies data or is read-only. If an5684 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5685 it will match this filter.56865687 - `tool_names: optional array of string`56885689 List of allowed tool names.56905691 - `never: optional object { read_only, tool_names }`56925693 A filter object to specify which tools are allowed.56945695 - `read_only: optional boolean`56965697 Indicates whether or not a tool modifies data or is read-only. If an5698 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5699 it will match this filter.57005701 - `tool_names: optional array of string`57025703 List of allowed tool names.57045705 - `McpToolApprovalSetting = "always" or "never"`57065707 Specify a single approval policy for all tools. One of `always` or5708 `never`. When set to `always`, all tools will require approval. When5709 set to `never`, all tools will not require approval.57105711 - `"always"`57125713 - `"never"`57145715 - `server_description: optional string`57165717 Optional description of the MCP server, used to provide more context.57185719 - `server_url: optional string`57205721 The URL for the MCP server. One of `server_url`, `connector_id`, or5722 `tunnel_id` must be provided.57235724 - `tunnel_id: optional string`57255726 The Secure MCP Tunnel ID to use instead of a direct server URL. One of5727 `server_url`, `connector_id`, or `tunnel_id` must be provided.57285729 - `CodeInterpreter object { container, type, allowed_callers }`57305731 A tool that runs Python code to help generate a response to a prompt.57325733 - `container: string or object { type, file_ids, memory_limit, network_policy }`57345735 The code interpreter container. Can be a container ID or an object that5736 specifies uploaded file IDs to make available to your code, along with an5737 optional `memory_limit` setting.57385739 - `string`57405741 The container ID.57425743 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`57445745 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.57465747 - `type: "auto"`57485749 Always `auto`.57505751 - `"auto"`57525753 - `file_ids: optional array of string`57545755 An optional list of uploaded files to make available to your code.57565757 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`57585759 The memory limit for the code interpreter container.57605761 - `"1g"`57625763 - `"4g"`57645765 - `"16g"`57665767 - `"64g"`57685769 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`57705771 Network access policy for the container.57725773 - `ContainerNetworkPolicyDisabled object { type }`57745775 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`57765777 - `type: "code_interpreter"`57785779 The type of the code interpreter tool. Always `code_interpreter`.57805781 - `"code_interpreter"`57825783 - `allowed_callers: optional array of "direct" or "programmatic" or null`57845785 The tool invocation context(s).57865787 - `"direct"`57885789 - `"programmatic"`57905791 - `ProgrammaticToolCalling object { type }`57925793 - `type: "programmatic_tool_calling"`57945795 The type of the tool. Always `programmatic_tool_calling`.57965797 - `"programmatic_tool_calling"`57985799 - `ImageGeneration object { type, action, background, 9 more }`58005801 A tool that generates images using the GPT image models.58025803 - `type: "image_generation"`58045805 The type of the image generation tool. Always `image_generation`.58065807 - `"image_generation"`58085809 - `action: optional "generate" or "edit" or "auto"`58105811 Whether to generate a new image or edit an existing image. Default: `auto`.58125813 - `"generate"`58145815 - `"edit"`58165817 - `"auto"`58185819 - `background: optional "transparent" or "opaque" or "auto"`58205821 Set the background of the generated image. One of `transparent`, `opaque`,5822 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including5823 their `2026-09-08` snapshots, support `opaque` and `transparent`5824 backgrounds. Transparent backgrounds are available for supported GPT Image5825 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in5826 preview. When using `transparent`, set the output format to `png` or `webp`.5827 Default: `auto`.58285829 - `"transparent"`58305831 - `"opaque"`58325833 - `"auto"`58345835 - `input_fidelity: optional "high" or "low" or null`58365837 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`.58385839 - `"high"`58405841 - `"low"`58425843 - `input_image_mask: optional object { file_id, image_url }`58445845 Optional mask for inpainting. Contains `image_url`5846 (string, optional) and `file_id` (string, optional).58475848 - `file_id: optional string`58495850 File ID for the mask image.58515852 - `image_url: optional string`58535854 Base64-encoded mask image.58555856 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`58575858 The image generation model to use. One of `gpt-image-1`,5859 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5860 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5861 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5862 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5863 `gpt-image-1`.58645865 - `string`58665867 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`58685869 The image generation model to use. One of `gpt-image-1`,5870 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5871 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5872 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5873 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5874 `gpt-image-1`.58755876 - `"gpt-image-1"`58775878 - `"gpt-image-1-mini"`58795880 - `"gpt-image-1.5"`58815882 - `"gpt-image-2"`58835884 - `"gpt-image-2-2026-04-21"`58855886 - `"gpt-image-2.5-sunburst"`58875888 - `"gpt-image-2.5-sunburst-2026-09-08"`58895890 - `"gpt-image-2.5-flare"`58915892 - `"gpt-image-2.5-flare-2026-09-08"`58935894 - `moderation: optional "auto" or "low"`58955896 Moderation level for the generated image. Default: `auto`.58975898 - `"auto"`58995900 - `"low"`59015902 - `output_compression: optional number`59035904 Compression level for the output image. Default: 100.59055906 - `output_format: optional "png" or "webp" or "jpeg"`59075908 The output format of the generated image. One of `png`, `webp`, or5909 `jpeg`. Default: `png`.59105911 - `"png"`59125913 - `"webp"`59145915 - `"jpeg"`59165917 - `partial_images: optional number`59185919 Number of partial images to generate in streaming mode, from 0 (default value) to 3.59205921 - `quality: optional "low" or "medium" or "high" or 3 more`59225923 The quality of the generated image. The GPT image models support `low`,5924 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,5925 including their `2026-09-08` snapshots, also support `xhigh` and `max`.5926 Default: `auto`.59275928 - `"low"`59295930 - `"medium"`59315932 - `"high"`59335934 - `"xhigh"`59355936 - `"max"`59375938 - `"auto"`59395940 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`59415942 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`.59435944 - `string`59455946 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`59475948 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`.59495950 - `"1024x1024"`59515952 - `"1024x1536"`59535954 - `"1536x1024"`59555956 - `"auto"`59575958 - `LocalShell object { type }`59595960 A tool that allows the model to execute shell commands in a local environment.59615962 - `type: "local_shell"`59635964 The type of the local shell tool. Always `local_shell`.59655966 - `"local_shell"`59675968 - `Shell object { type, allowed_callers, environment }`59695970 A tool that allows the model to execute shell commands.59715972 - `type: "shell"`59735974 The type of the shell tool. Always `shell`.59755976 - `"shell"`59775978 - `allowed_callers: optional array of "direct" or "programmatic" or null`59795980 The tool invocation context(s).59815982 - `"direct"`59835984 - `"programmatic"`59855986 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`59875988 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`59895990 - `LocalEnvironment object { type, skills }`59915992 - `ContainerReference object { container_id, type }`59935994 - `Custom object { name, type, allowed_callers, 4 more }`59955996 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)59975998 - `name: string`59996000 The name of the custom tool, used to identify it in tool calls.60016002 - `type: "custom"`60036004 The type of the custom tool. Always `custom`.60056006 - `"custom"`60076008 - `allowed_callers: optional array of "direct" or "programmatic" or null`60096010 The tool invocation context(s).60116012 - `"direct"`60136014 - `"programmatic"`60156016 - `async: optional boolean`60176018 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.60196020 - `defer_loading: optional boolean`60216022 Whether this tool should be deferred and discovered via tool search.60236024 - `description: optional string`60256026 Optional description of the custom tool, used to provide more context.60276028 - `format: optional CustomToolInputFormat`60296030 The input format for the custom tool. Default is unconstrained text.60316032 - `Namespace object { description, name, tools, type }`60336034 Groups function/custom tools under a shared namespace.60356036 - `description: string`60376038 A description of the namespace shown to the model.60396040 - `name: string`60416042 The namespace name used in tool calls (for example, `crm`).60436044 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`60456046 The function/custom tools available inside this namespace.60476048 - `Function object { name, type, allowed_callers, 6 more }`60496050 - `name: string`60516052 - `type: "function"`60536054 - `"function"`60556056 - `allowed_callers: optional array of "direct" or "programmatic" or null`60576058 The tool invocation context(s).60596060 - `"direct"`60616062 - `"programmatic"`60636064 - `async: optional boolean`60656066 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.60676068 - `defer_loading: optional boolean`60696070 Whether this function should be deferred and discovered via tool search.60716072 - `description: optional string or null`60736074 - `output_schema: optional map[unknown] or null`60756076 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.60776078 - `parameters: optional unknown or null`60796080 - `strict: optional boolean or null`60816082 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.60836084 - `Custom object { name, type, allowed_callers, 4 more }`60856086 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)60876088 - `name: string`60896090 The name of the custom tool, used to identify it in tool calls.60916092 - `type: "custom"`60936094 The type of the custom tool. Always `custom`.60956096 - `"custom"`60976098 - `allowed_callers: optional array of "direct" or "programmatic" or null`60996100 The tool invocation context(s).61016102 - `"direct"`61036104 - `"programmatic"`61056106 - `async: optional boolean`61076108 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.61096110 - `defer_loading: optional boolean`61116112 Whether this tool should be deferred and discovered via tool search.61136114 - `description: optional string`61156116 Optional description of the custom tool, used to provide more context.61176118 - `format: optional CustomToolInputFormat`61196120 The input format for the custom tool. Default is unconstrained text.61216122 - `type: "namespace"`61236124 The type of the tool. Always `namespace`.61256126 - `"namespace"`61276128 - `ToolSearch object { type, description, execution, parameters }`61296130 Hosted or BYOT tool search configuration for deferred tools.61316132 - `type: "tool_search"`61336134 The type of the tool. Always `tool_search`.61356136 - `"tool_search"`61376138 - `description: optional string or null`61396140 Description shown to the model for a client-executed tool search tool.61416142 - `execution: optional "server" or "client"`61436144 Whether tool search is executed by the server or by the client.61456146 - `"server"`61476148 - `"client"`61496150 - `parameters: optional unknown or null`61516152 Parameter schema for a client-executed tool search tool.61536154 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`61556156 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).61576158 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`61596160 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.61616162 - `"web_search_preview"`61636164 - `"web_search_preview_2025_03_11"`61656166 - `search_content_types: optional array of "text" or "image"`61676168 - `"text"`61696170 - `"image"`61716172 - `search_context_size: optional "low" or "medium" or "high"`61736174 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.61756176 - `"low"`61776178 - `"medium"`61796180 - `"high"`61816182 - `user_location: optional object { type, city, country, 2 more } or null`61836184 The user's location.61856186 - `type: "approximate"`61876188 The type of location approximation. Always `approximate`.61896190 - `"approximate"`61916192 - `city: optional string or null`61936194 Free text input for the city of the user, e.g. `San Francisco`.61956196 - `country: optional string or null`61976198 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.61996200 - `region: optional string or null`62016202 Free text input for the region of the user, e.g. `California`.62036204 - `timezone: optional string or null`62056206 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.62076208 - `ApplyPatch object { type, allowed_callers }`62096210 Allows the assistant to create, delete, or update files using unified diffs.62116212 - `type: "apply_patch"`62136214 The type of the tool. Always `apply_patch`.62156216 - `"apply_patch"`62176218 - `allowed_callers: optional array of "direct" or "programmatic" or null`62196220 The tool invocation context(s).62216222 - `"direct"`62236224 - `"programmatic"`62256226 - `type: "tool_search_output"`62276228 The type of the item. Always `tool_search_output`.62296230 - `"tool_search_output"`62316232 - `created_by: optional string`62336234 The identifier of the actor that created the item.62356236 - `AdditionalTools object { id, role, tools, type }`62376238 - `id: string`62396240 The unique ID of the additional tools item.62416242 - `role: "unknown" or "user" or "assistant" or 5 more`62436244 The role that provided the additional tools.62456246 - `"unknown"`62476248 - `"user"`62496250 - `"assistant"`62516252 - `"system"`62536254 - `"critic"`62556256 - `"discriminator"`62576258 - `"developer"`62596260 - `"tool"`62616262 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`62636264 The additional tool definitions made available at this item.62656266 - `Function object { name, parameters, strict, 6 more }`62676268 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).62696270 - `name: string`62716272 The name of the function to call.62736274 - `parameters: map[unknown] or null`62756276 A JSON schema object describing the parameters of the function.62776278 - `strict: boolean or null`62796280 Whether strict parameter validation is enforced for this function tool.62816282 - `type: "function"`62836284 The type of the function tool. Always `function`.62856286 - `"function"`62876288 - `allowed_callers: optional array of "direct" or "programmatic" or null`62896290 The tool invocation context(s).62916292 - `"direct"`62936294 - `"programmatic"`62956296 - `async: optional boolean`62976298 - `defer_loading: optional boolean`62996300 Whether this function is deferred and loaded via tool search.63016302 - `description: optional string or null`63036304 A description of the function. Used by the model to determine whether or not to call the function.63056306 - `output_schema: optional map[unknown] or null`63076308 A JSON schema object describing the JSON value encoded in string outputs for this function.63096310 - `FileSearch object { type, vector_store_ids, filters, 2 more }`63116312 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).63136314 - `type: "file_search"`63156316 The type of the file search tool. Always `file_search`.63176318 - `"file_search"`63196320 - `vector_store_ids: array of string`63216322 The IDs of the vector stores to search.63236324 - `filters: optional ComparisonFilter or CompoundFilter or null`63256326 A filter to apply.63276328 - `ComparisonFilter object { key, type, value }`63296330 A filter used to compare a specified attribute key to a given value using a defined comparison operation.63316332 - `CompoundFilter object { filters, type }`63336334 Combine multiple filters using `and` or `or`.63356336 - `max_num_results: optional number`63376338 The maximum number of results to return. This number should be between 1 and 50 inclusive.63396340 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`63416342 Ranking options for search.63436344 - `hybrid_search: optional object { embedding_weight, text_weight }`63456346 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.63476348 - `embedding_weight: number`63496350 The weight of the embedding in the reciprocal ranking fusion.63516352 - `text_weight: number`63536354 The weight of the text in the reciprocal ranking fusion.63556356 - `ranker: optional "auto" or "default-2024-11-15"`63576358 The ranker to use for the file search.63596360 - `"auto"`63616362 - `"default-2024-11-15"`63636364 - `score_threshold: optional number`63656366 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.63676368 - `Computer object { type }`63696370 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).63716372 - `type: "computer"`63736374 The type of the computer tool. Always `computer`.63756376 - `"computer"`63776378 - `ComputerUsePreview object { display_height, display_width, environment, type }`63796380 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).63816382 - `display_height: number`63836384 The height of the computer display.63856386 - `display_width: number`63876388 The width of the computer display.63896390 - `environment: "windows" or "mac" or "linux" or 2 more`63916392 The type of computer environment to control.63936394 - `"windows"`63956396 - `"mac"`63976398 - `"linux"`63996400 - `"ubuntu"`64016402 - `"browser"`64036404 - `type: "computer_use_preview"`64056406 The type of the computer use tool. Always `computer_use_preview`.64076408 - `"computer_use_preview"`64096410 - `WebSearch object { type, external_web_access, filters, 2 more }`64116412 Search the Internet for sources related to the prompt. Learn more about the6413 [web search tool](/api/docs/guides/tools-web-search).64146415 - `type: "web_search" or "web_search_2025_08_26"`64166417 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.64186419 - `"web_search"`64206421 - `"web_search_2025_08_26"`64226423 - `external_web_access: optional boolean`64246425 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.64266427 - `filters: optional object { allowed_domains } or null`64286429 Filters for the search.64306431 - `allowed_domains: optional array of string or null`64326433 Allowed domains for the search. If not provided, all domains are allowed.6434 Subdomains of the provided domains are allowed as well.64356436 Example: `["pubmed.ncbi.nlm.nih.gov"]`64376438 - `search_context_size: optional "low" or "medium" or "high"`64396440 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.64416442 - `"low"`64436444 - `"medium"`64456446 - `"high"`64476448 - `user_location: optional object { city, country, region, 2 more } or null`64496450 The approximate location of the user.64516452 - `city: optional string or null`64536454 Free text input for the city of the user, e.g. `San Francisco`.64556456 - `country: optional string or null`64576458 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.64596460 - `region: optional string or null`64616462 Free text input for the region of the user, e.g. `California`.64636464 - `timezone: optional string or null`64656466 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.64676468 - `type: optional "approximate"`64696470 The type of location approximation. Always `approximate`.64716472 - `"approximate"`64736474 - `Mcp object { server_label, type, allowed_callers, 9 more }`64756476 Give the model access to additional tools via remote Model Context Protocol6477 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).64786479 - `server_label: string`64806481 A label for this MCP server, used to identify it in tool calls.64826483 - `type: "mcp"`64846485 The type of the MCP tool. Always `mcp`.64866487 - `"mcp"`64886489 - `allowed_callers: optional array of "direct" or "programmatic" or null`64906491 The tool invocation context(s).64926493 - `"direct"`64946495 - `"programmatic"`64966497 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`64986499 List of allowed tool names or a filter object.65006501 - `McpAllowedTools = array of string`65026503 A string array of allowed tool names65046505 - `McpToolFilter object { read_only, tool_names }`65066507 A filter object to specify which tools are allowed.65086509 - `read_only: optional boolean`65106511 Indicates whether or not a tool modifies data or is read-only. If an6512 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6513 it will match this filter.65146515 - `tool_names: optional array of string`65166517 List of allowed tool names.65186519 - `authorization: optional string`65206521 An OAuth access token that can be used with a remote MCP server, either6522 with a custom MCP server URL or a service connector. Your application6523 must handle the OAuth authorization flow and provide the token here.65246525 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`65266527 Identifier for service connectors, like those available in ChatGPT. One of6528 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more6529 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).65306531 This field is deprecated for models released after September 1, 2026.6532 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to6533 connect through a Secure MCP Tunnel.65346535 Currently supported `connector_id` values are:65366537 - Dropbox: `connector_dropbox`6538 - Gmail: `connector_gmail`6539 - Google Calendar: `connector_googlecalendar`6540 - Google Drive: `connector_googledrive`6541 - Microsoft Teams: `connector_microsoftteams`6542 - Outlook Calendar: `connector_outlookcalendar`6543 - Outlook Email: `connector_outlookemail`6544 - SharePoint: `connector_sharepoint`65456546 - `"connector_dropbox"`65476548 - `"connector_gmail"`65496550 - `"connector_googlecalendar"`65516552 - `"connector_googledrive"`65536554 - `"connector_microsoftteams"`65556556 - `"connector_outlookcalendar"`65576558 - `"connector_outlookemail"`65596560 - `"connector_sharepoint"`65616562 - `defer_loading: optional boolean`65636564 Whether this MCP tool is deferred and discovered via tool search.65656566 - `headers: optional map[string] or null`65676568 Optional HTTP headers to send to the MCP server. Use for authentication6569 or other purposes.65706571 - `require_approval: optional object { always, never } or "always" or "never" or null`65726573 Specify which of the MCP server's tools require approval.65746575 - `McpToolApprovalFilter object { always, never }`65766577 Specify which of the MCP server's tools require approval. Can be6578 `always`, `never`, or a filter object associated with tools6579 that require approval.65806581 - `always: optional object { read_only, tool_names }`65826583 A filter object to specify which tools are allowed.65846585 - `read_only: optional boolean`65866587 Indicates whether or not a tool modifies data or is read-only. If an6588 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6589 it will match this filter.65906591 - `tool_names: optional array of string`65926593 List of allowed tool names.65946595 - `never: optional object { read_only, tool_names }`65966597 A filter object to specify which tools are allowed.65986599 - `read_only: optional boolean`66006601 Indicates whether or not a tool modifies data or is read-only. If an6602 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6603 it will match this filter.66046605 - `tool_names: optional array of string`66066607 List of allowed tool names.66086609 - `McpToolApprovalSetting = "always" or "never"`66106611 Specify a single approval policy for all tools. One of `always` or6612 `never`. When set to `always`, all tools will require approval. When6613 set to `never`, all tools will not require approval.66146615 - `"always"`66166617 - `"never"`66186619 - `server_description: optional string`66206621 Optional description of the MCP server, used to provide more context.66226623 - `server_url: optional string`66246625 The URL for the MCP server. One of `server_url`, `connector_id`, or6626 `tunnel_id` must be provided.66276628 - `tunnel_id: optional string`66296630 The Secure MCP Tunnel ID to use instead of a direct server URL. One of6631 `server_url`, `connector_id`, or `tunnel_id` must be provided.66326633 - `CodeInterpreter object { container, type, allowed_callers }`66346635 A tool that runs Python code to help generate a response to a prompt.66366637 - `container: string or object { type, file_ids, memory_limit, network_policy }`66386639 The code interpreter container. Can be a container ID or an object that6640 specifies uploaded file IDs to make available to your code, along with an6641 optional `memory_limit` setting.66426643 - `string`66446645 The container ID.66466647 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`66486649 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.66506651 - `type: "auto"`66526653 Always `auto`.66546655 - `"auto"`66566657 - `file_ids: optional array of string`66586659 An optional list of uploaded files to make available to your code.66606661 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`66626663 The memory limit for the code interpreter container.66646665 - `"1g"`66666667 - `"4g"`66686669 - `"16g"`66706671 - `"64g"`66726673 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`66746675 Network access policy for the container.66766677 - `ContainerNetworkPolicyDisabled object { type }`66786679 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`66806681 - `type: "code_interpreter"`66826683 The type of the code interpreter tool. Always `code_interpreter`.66846685 - `"code_interpreter"`66866687 - `allowed_callers: optional array of "direct" or "programmatic" or null`66886689 The tool invocation context(s).66906691 - `"direct"`66926693 - `"programmatic"`66946695 - `ProgrammaticToolCalling object { type }`66966697 - `type: "programmatic_tool_calling"`66986699 The type of the tool. Always `programmatic_tool_calling`.67006701 - `"programmatic_tool_calling"`67026703 - `ImageGeneration object { type, action, background, 9 more }`67046705 A tool that generates images using the GPT image models.67066707 - `type: "image_generation"`67086709 The type of the image generation tool. Always `image_generation`.67106711 - `"image_generation"`67126713 - `action: optional "generate" or "edit" or "auto"`67146715 Whether to generate a new image or edit an existing image. Default: `auto`.67166717 - `"generate"`67186719 - `"edit"`67206721 - `"auto"`67226723 - `background: optional "transparent" or "opaque" or "auto"`67246725 Set the background of the generated image. One of `transparent`, `opaque`,6726 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including6727 their `2026-09-08` snapshots, support `opaque` and `transparent`6728 backgrounds. Transparent backgrounds are available for supported GPT Image6729 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in6730 preview. When using `transparent`, set the output format to `png` or `webp`.6731 Default: `auto`.67326733 - `"transparent"`67346735 - `"opaque"`67366737 - `"auto"`67386739 - `input_fidelity: optional "high" or "low" or null`67406741 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`.67426743 - `"high"`67446745 - `"low"`67466747 - `input_image_mask: optional object { file_id, image_url }`67486749 Optional mask for inpainting. Contains `image_url`6750 (string, optional) and `file_id` (string, optional).67516752 - `file_id: optional string`67536754 File ID for the mask image.67556756 - `image_url: optional string`67576758 Base64-encoded mask image.67596760 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`67616762 The image generation model to use. One of `gpt-image-1`,6763 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,6764 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,6765 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,6766 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:6767 `gpt-image-1`.67686769 - `string`67706771 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`67726773 The image generation model to use. One of `gpt-image-1`,6774 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,6775 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,6776 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,6777 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:6778 `gpt-image-1`.67796780 - `"gpt-image-1"`67816782 - `"gpt-image-1-mini"`67836784 - `"gpt-image-1.5"`67856786 - `"gpt-image-2"`67876788 - `"gpt-image-2-2026-04-21"`67896790 - `"gpt-image-2.5-sunburst"`67916792 - `"gpt-image-2.5-sunburst-2026-09-08"`67936794 - `"gpt-image-2.5-flare"`67956796 - `"gpt-image-2.5-flare-2026-09-08"`67976798 - `moderation: optional "auto" or "low"`67996800 Moderation level for the generated image. Default: `auto`.68016802 - `"auto"`68036804 - `"low"`68056806 - `output_compression: optional number`68076808 Compression level for the output image. Default: 100.68096810 - `output_format: optional "png" or "webp" or "jpeg"`68116812 The output format of the generated image. One of `png`, `webp`, or6813 `jpeg`. Default: `png`.68146815 - `"png"`68166817 - `"webp"`68186819 - `"jpeg"`68206821 - `partial_images: optional number`68226823 Number of partial images to generate in streaming mode, from 0 (default value) to 3.68246825 - `quality: optional "low" or "medium" or "high" or 3 more`68266827 The quality of the generated image. The GPT image models support `low`,6828 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,6829 including their `2026-09-08` snapshots, also support `xhigh` and `max`.6830 Default: `auto`.68316832 - `"low"`68336834 - `"medium"`68356836 - `"high"`68376838 - `"xhigh"`68396840 - `"max"`68416842 - `"auto"`68436844 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`68456846 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`.68476848 - `string`68496850 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`68516852 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`.68536854 - `"1024x1024"`68556856 - `"1024x1536"`68576858 - `"1536x1024"`68596860 - `"auto"`68616862 - `LocalShell object { type }`68636864 A tool that allows the model to execute shell commands in a local environment.68656866 - `type: "local_shell"`68676868 The type of the local shell tool. Always `local_shell`.68696870 - `"local_shell"`68716872 - `Shell object { type, allowed_callers, environment }`68736874 A tool that allows the model to execute shell commands.68756876 - `type: "shell"`68776878 The type of the shell tool. Always `shell`.68796880 - `"shell"`68816882 - `allowed_callers: optional array of "direct" or "programmatic" or null`68836884 The tool invocation context(s).68856886 - `"direct"`68876888 - `"programmatic"`68896890 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`68916892 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`68936894 - `LocalEnvironment object { type, skills }`68956896 - `ContainerReference object { container_id, type }`68976898 - `Custom object { name, type, allowed_callers, 4 more }`68996900 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)69016902 - `name: string`69036904 The name of the custom tool, used to identify it in tool calls.69056906 - `type: "custom"`69076908 The type of the custom tool. Always `custom`.69096910 - `"custom"`69116912 - `allowed_callers: optional array of "direct" or "programmatic" or null`69136914 The tool invocation context(s).69156916 - `"direct"`69176918 - `"programmatic"`69196920 - `async: optional boolean`69216922 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.69236924 - `defer_loading: optional boolean`69256926 Whether this tool should be deferred and discovered via tool search.69276928 - `description: optional string`69296930 Optional description of the custom tool, used to provide more context.69316932 - `format: optional CustomToolInputFormat`69336934 The input format for the custom tool. Default is unconstrained text.69356936 - `Namespace object { description, name, tools, type }`69376938 Groups function/custom tools under a shared namespace.69396940 - `description: string`69416942 A description of the namespace shown to the model.69436944 - `name: string`69456946 The namespace name used in tool calls (for example, `crm`).69476948 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`69496950 The function/custom tools available inside this namespace.69516952 - `Function object { name, type, allowed_callers, 6 more }`69536954 - `name: string`69556956 - `type: "function"`69576958 - `"function"`69596960 - `allowed_callers: optional array of "direct" or "programmatic" or null`69616962 The tool invocation context(s).69636964 - `"direct"`69656966 - `"programmatic"`69676968 - `async: optional boolean`69696970 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.69716972 - `defer_loading: optional boolean`69736974 Whether this function should be deferred and discovered via tool search.69756976 - `description: optional string or null`69776978 - `output_schema: optional map[unknown] or null`69796980 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.69816982 - `parameters: optional unknown or null`69836984 - `strict: optional boolean or null`69856986 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.69876988 - `Custom object { name, type, allowed_callers, 4 more }`69896990 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)69916992 - `name: string`69936994 The name of the custom tool, used to identify it in tool calls.69956996 - `type: "custom"`69976998 The type of the custom tool. Always `custom`.69997000 - `"custom"`70017002 - `allowed_callers: optional array of "direct" or "programmatic" or null`70037004 The tool invocation context(s).70057006 - `"direct"`70077008 - `"programmatic"`70097010 - `async: optional boolean`70117012 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.70137014 - `defer_loading: optional boolean`70157016 Whether this tool should be deferred and discovered via tool search.70177018 - `description: optional string`70197020 Optional description of the custom tool, used to provide more context.70217022 - `format: optional CustomToolInputFormat`70237024 The input format for the custom tool. Default is unconstrained text.70257026 - `type: "namespace"`70277028 The type of the tool. Always `namespace`.70297030 - `"namespace"`70317032 - `ToolSearch object { type, description, execution, parameters }`70337034 Hosted or BYOT tool search configuration for deferred tools.70357036 - `type: "tool_search"`70377038 The type of the tool. Always `tool_search`.70397040 - `"tool_search"`70417042 - `description: optional string or null`70437044 Description shown to the model for a client-executed tool search tool.70457046 - `execution: optional "server" or "client"`70477048 Whether tool search is executed by the server or by the client.70497050 - `"server"`70517052 - `"client"`70537054 - `parameters: optional unknown or null`70557056 Parameter schema for a client-executed tool search tool.70577058 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`70597060 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).70617062 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`70637064 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.70657066 - `"web_search_preview"`70677068 - `"web_search_preview_2025_03_11"`70697070 - `search_content_types: optional array of "text" or "image"`70717072 - `"text"`70737074 - `"image"`70757076 - `search_context_size: optional "low" or "medium" or "high"`70777078 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.70797080 - `"low"`70817082 - `"medium"`70837084 - `"high"`70857086 - `user_location: optional object { type, city, country, 2 more } or null`70877088 The user's location.70897090 - `type: "approximate"`70917092 The type of location approximation. Always `approximate`.70937094 - `"approximate"`70957096 - `city: optional string or null`70977098 Free text input for the city of the user, e.g. `San Francisco`.70997100 - `country: optional string or null`71017102 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.71037104 - `region: optional string or null`71057106 Free text input for the region of the user, e.g. `California`.71077108 - `timezone: optional string or null`71097110 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.71117112 - `ApplyPatch object { type, allowed_callers }`71137114 Allows the assistant to create, delete, or update files using unified diffs.71157116 - `type: "apply_patch"`71177118 The type of the tool. Always `apply_patch`.71197120 - `"apply_patch"`71217122 - `allowed_callers: optional array of "direct" or "programmatic" or null`71237124 The tool invocation context(s).71257126 - `"direct"`71277128 - `"programmatic"`71297130 - `type: "additional_tools"`71317132 The type of the item. Always `additional_tools`.71337134 - `"additional_tools"`71357136 - `Compaction object { id, encrypted_content, type, created_by }`71377138 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).71397140 - `id: string`71417142 The unique ID of the compaction item.71437144 - `encrypted_content: string`71457146 The encrypted content that was produced by compaction.71477148 - `type: "compaction"`71497150 The type of the item. Always `compaction`.71517152 - `"compaction"`71537154 - `created_by: optional string`71557156 The identifier of the actor that created the item.71577158 - `ImageGenerationCall object { id, result, status, 7 more }`71597160 An image generation request made by the model.71617162 - `id: string`71637164 The unique ID of the image generation call.71657166 - `result: string or null`71677168 The generated image encoded in base64.71697170 - `status: "in_progress" or "completed" or "generating" or "failed"`71717172 The status of the image generation call.71737174 - `"in_progress"`71757176 - `"completed"`71777178 - `"generating"`71797180 - `"failed"`71817182 - `type: "image_generation_call"`71837184 The type of the image generation call. Always `image_generation_call`.71857186 - `"image_generation_call"`71877188 - `action: optional "generate" or "edit" or "auto" or null`71897190 The action used for image generation.71917192 - `"generate"`71937194 - `"edit"`71957196 - `"auto"`71977198 - `background: optional "transparent" or "opaque" or "auto" or null`71997200 The background setting used for generation.72017202 - `"transparent"`72037204 - `"opaque"`72057206 - `"auto"`72077208 - `output_format: optional "png" or "webp" or "jpeg" or null`72097210 The output format used for generation.72117212 - `"png"`72137214 - `"webp"`72157216 - `"jpeg"`72177218 - `quality: optional "low" or "medium" or "high" or 3 more or null`72197220 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.72217222 - `"low"`72237224 - `"medium"`72257226 - `"high"`72277228 - `"xhigh"`72297230 - `"max"`72317232 - `"auto"`72337234 - `revised_prompt: optional string or null`72357236 The prompt that was used after any model prompt rewriting.72377238 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`72397240 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.72417242 - `string`72437244 - `"1024x1024" or "1024x1536" or "1536x1024"`72457246 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.72477248 - `"1024x1024"`72497250 - `"1024x1536"`72517252 - `"1536x1024"`72537254 - `CodeInterpreterCall object { id, code, container_id, 3 more }`72557256 A tool call to run code.72577258 - `id: string`72597260 The unique ID of the code interpreter tool call.72617262 - `code: string or null`72637264 The code to run, or null if not available.72657266 - `container_id: string`72677268 The ID of the container used to run the code.72697270 - `outputs: array of object { logs, type } or object { type, url } or null`72717272 The outputs generated by the code interpreter, such as logs or images.7273 Can be null if no outputs are available.72747275 - `Logs object { logs, type }`72767277 The logs output from the code interpreter.72787279 - `logs: string`72807281 The logs output from the code interpreter.72827283 - `type: "logs"`72847285 The type of the output. Always `logs`.72867287 - `"logs"`72887289 - `Image object { type, url }`72907291 The image output from the code interpreter.72927293 - `type: "image"`72947295 The type of the output. Always `image`.72967297 - `"image"`72987299 - `url: string`73007301 The URL of the image output from the code interpreter.73027303 - `status: "in_progress" or "completed" or "incomplete" or 2 more`73047305 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.73067307 - `"in_progress"`73087309 - `"completed"`73107311 - `"incomplete"`73127313 - `"interpreting"`73147315 - `"failed"`73167317 - `type: "code_interpreter_call"`73187319 The type of the code interpreter tool call. Always `code_interpreter_call`.73207321 - `"code_interpreter_call"`73227323 - `LocalShellCall object { id, action, call_id, 2 more }`73247325 A tool call to run a command on the local shell.73267327 - `id: string`73287329 The unique ID of the local shell call.73307331 - `action: object { command, env, type, 3 more }`73327333 Execute a shell command on the server.73347335 - `command: array of string`73367337 The command to run.73387339 - `env: map[string]`73407341 Environment variables to set for the command.73427343 - `type: "exec"`73447345 The type of the local shell action. Always `exec`.73467347 - `"exec"`73487349 - `timeout_ms: optional number or null`73507351 Optional timeout in milliseconds for the command.73527353 - `user: optional string or null`73547355 Optional user to run the command as.73567357 - `working_directory: optional string or null`73587359 Optional working directory to run the command in.73607361 - `call_id: string`73627363 The unique ID of the local shell tool call generated by the model.73647365 - `status: "in_progress" or "completed" or "incomplete"`73667367 The status of the local shell call.73687369 - `"in_progress"`73707371 - `"completed"`73727373 - `"incomplete"`73747375 - `type: "local_shell_call"`73767377 The type of the local shell call. Always `local_shell_call`.73787379 - `"local_shell_call"`73807381 - `LocalShellCallOutput object { id, output, type, status }`73827383 The output of a local shell tool call.73847385 - `id: string`73867387 The unique ID of the local shell tool call generated by the model.73887389 - `output: string`73907391 A JSON string of the output of the local shell tool call.73927393 - `type: "local_shell_call_output"`73947395 The type of the local shell tool call output. Always `local_shell_call_output`.73967397 - `"local_shell_call_output"`73987399 - `status: optional "in_progress" or "completed" or "incomplete" or null`74007401 The status of the item. One of `in_progress`, `completed`, or `incomplete`.74027403 - `"in_progress"`74047405 - `"completed"`74067407 - `"incomplete"`74087409 - `ShellCall object { id, action, call_id, 5 more }`74107411 A tool call that executes one or more shell commands in a managed environment.74127413 - `id: string`74147415 The unique ID of the shell tool call. Populated when this item is returned via API.74167417 - `action: object { commands, max_output_length, timeout_ms }`74187419 The shell commands and limits that describe how to run the tool call.74207421 - `commands: array of string`74227423 - `max_output_length: number or null`74247425 Optional maximum number of characters to return from each command.74267427 - `timeout_ms: number or null`74287429 Optional timeout in milliseconds for the commands.74307431 - `call_id: string`74327433 The unique ID of the shell tool call generated by the model.74347435 - `environment: ResponseLocalEnvironment or ResponseContainerReference or null`74367437 Represents the use of a local environment to perform shell actions.74387439 - `ResponseLocalEnvironment object { type }`74407441 Represents the use of a local environment to perform shell actions.74427443 - `type: "local"`74447445 The environment type. Always `local`.74467447 - `"local"`74487449 - `ResponseContainerReference object { container_id, type }`74507451 Represents a container created with /v1/containers.74527453 - `container_id: string`74547455 - `type: "container_reference"`74567457 The environment type. Always `container_reference`.74587459 - `"container_reference"`74607461 - `status: "in_progress" or "completed" or "incomplete"`74627463 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.74647465 - `"in_progress"`74667467 - `"completed"`74687469 - `"incomplete"`74707471 - `type: "shell_call"`74727473 The type of the item. Always `shell_call`.74747475 - `"shell_call"`74767477 - `caller: optional object { type } or object { caller_id, type } or null`74787479 The execution context that produced this tool call.74807481 - `Direct object { type }`74827483 - `type: "direct"`74847485 - `"direct"`74867487 - `Program object { caller_id, type }`74887489 - `caller_id: string`74907491 The call ID of the program item that produced this tool call.74927493 - `type: "program"`74947495 - `"program"`74967497 - `created_by: optional string`74987499 The ID of the entity that created this tool call.75007501 - `ShellCallOutput object { id, call_id, max_output_length, 5 more }`75027503 The output of a shell tool call that was emitted.75047505 - `id: string`75067507 The unique ID of the shell call output. Populated when this item is returned via API.75087509 - `call_id: string`75107511 The unique ID of the shell tool call generated by the model.75127513 - `max_output_length: number or null`75147515 The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.75167517 - `output: array of object { outcome, stderr, stdout, created_by }`75187519 An array of shell call output contents75207521 - `outcome: object { type } or object { exit_code, type }`75227523 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.75247525 - `Timeout object { type }`75267527 Indicates that the shell call exceeded its configured time limit.75287529 - `type: "timeout"`75307531 The outcome type. Always `timeout`.75327533 - `"timeout"`75347535 - `Exit object { exit_code, type }`75367537 Indicates that the shell commands finished and returned an exit code.75387539 - `exit_code: number`75407541 Exit code from the shell process.75427543 - `type: "exit"`75447545 The outcome type. Always `exit`.75467547 - `"exit"`75487549 - `stderr: string`75507551 The standard error output that was captured.75527553 - `stdout: string`75547555 The standard output that was captured.75567557 - `created_by: optional string`75587559 The identifier of the actor that created the item.75607561 - `status: "in_progress" or "completed" or "incomplete"`75627563 The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.75647565 - `"in_progress"`75667567 - `"completed"`75687569 - `"incomplete"`75707571 - `type: "shell_call_output"`75727573 The type of the shell call output. Always `shell_call_output`.75747575 - `"shell_call_output"`75767577 - `caller: optional object { type } or object { caller_id, type } or null`75787579 The execution context that produced this tool call.75807581 - `Direct object { type }`75827583 - `type: "direct"`75847585 - `"direct"`75867587 - `Program object { caller_id, type }`75887589 - `caller_id: string`75907591 The call ID of the program item that produced this tool call.75927593 - `type: "program"`75947595 - `"program"`75967597 - `created_by: optional string`75987599 The identifier of the actor that created the item.76007601 - `ApplyPatchCall object { id, call_id, operation, 4 more }`76027603 A tool call that applies file diffs by creating, deleting, or updating files.76047605 - `id: string`76067607 The unique ID of the apply patch tool call. Populated when this item is returned via API.76087609 - `call_id: string`76107611 The unique ID of the apply patch tool call generated by the model.76127613 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`76147615 One of the create_file, delete_file, or update_file operations applied via apply_patch.76167617 - `CreateFile object { diff, path, type }`76187619 Instruction describing how to create a file via the apply_patch tool.76207621 - `diff: string`76227623 Diff to apply.76247625 - `path: string`76267627 Path of the file to create.76287629 - `type: "create_file"`76307631 Create a new file with the provided diff.76327633 - `"create_file"`76347635 - `DeleteFile object { path, type }`76367637 Instruction describing how to delete a file via the apply_patch tool.76387639 - `path: string`76407641 Path of the file to delete.76427643 - `type: "delete_file"`76447645 Delete the specified file.76467647 - `"delete_file"`76487649 - `UpdateFile object { diff, path, type }`76507651 Instruction describing how to update a file via the apply_patch tool.76527653 - `diff: string`76547655 Diff to apply.76567657 - `path: string`76587659 Path of the file to update.76607661 - `type: "update_file"`76627663 Update an existing file with the provided diff.76647665 - `"update_file"`76667667 - `status: "in_progress" or "completed"`76687669 The status of the apply patch tool call. One of `in_progress` or `completed`.76707671 - `"in_progress"`76727673 - `"completed"`76747675 - `type: "apply_patch_call"`76767677 The type of the item. Always `apply_patch_call`.76787679 - `"apply_patch_call"`76807681 - `caller: optional object { type } or object { caller_id, type } or null`76827683 The execution context that produced this tool call.76847685 - `Direct object { type }`76867687 - `type: "direct"`76887689 - `"direct"`76907691 - `Program object { caller_id, type }`76927693 - `caller_id: string`76947695 The call ID of the program item that produced this tool call.76967697 - `type: "program"`76987699 - `"program"`77007701 - `created_by: optional string`77027703 The ID of the entity that created this tool call.77047705 - `ApplyPatchCallOutput object { id, call_id, status, 4 more }`77067707 The output emitted by an apply patch tool call.77087709 - `id: string`77107711 The unique ID of the apply patch tool call output. Populated when this item is returned via API.77127713 - `call_id: string`77147715 The unique ID of the apply patch tool call generated by the model.77167717 - `status: "completed" or "failed"`77187719 The status of the apply patch tool call output. One of `completed` or `failed`.77207721 - `"completed"`77227723 - `"failed"`77247725 - `type: "apply_patch_call_output"`77267727 The type of the item. Always `apply_patch_call_output`.77287729 - `"apply_patch_call_output"`77307731 - `caller: optional object { type } or object { caller_id, type } or null`77327733 The execution context that produced this tool call.77347735 - `Direct object { type }`77367737 - `type: "direct"`77387739 - `"direct"`77407741 - `Program object { caller_id, type }`77427743 - `caller_id: string`77447745 The call ID of the program item that produced this tool call.77467747 - `type: "program"`77487749 - `"program"`77507751 - `created_by: optional string`77527753 The ID of the entity that created this tool call output.77547755 - `output: optional string or null`77567757 Optional textual output returned by the apply patch tool.77587759 - `McpCall object { id, arguments, name, 6 more }`77607761 An invocation of a tool on an MCP server.77627763 - `id: string`77647765 The unique ID of the tool call.77667767 - `arguments: string`77687769 A JSON string of the arguments passed to the tool.77707771 - `name: string`77727773 The name of the tool that was run.77747775 - `server_label: string`77767777 The label of the MCP server running the tool.77787779 - `type: "mcp_call"`77807781 The type of the item. Always `mcp_call`.77827783 - `"mcp_call"`77847785 - `approval_request_id: optional string or null`77867787 Unique identifier for the MCP tool call approval request.7788 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.77897790 - `error: optional McpToolCallError or null`77917792 The error from the tool call, if any.77937794 - `output: optional string or null`77957796 The output from the tool call.77977798 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`77997800 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.78017802 - `"in_progress"`78037804 - `"completed"`78057806 - `"incomplete"`78077808 - `"calling"`78097810 - `"failed"`78117812 - `McpListTools object { id, server_label, tools, 2 more }`78137814 A list of tools available on an MCP server.78157816 - `id: string`78177818 The unique ID of the list.78197820 - `server_label: string`78217822 The label of the MCP server.78237824 - `tools: array of object { input_schema, name, annotations, description }`78257826 The tools available on the server.78277828 - `input_schema: unknown`78297830 The JSON schema describing the tool's input.78317832 - `name: string`78337834 The name of the tool.78357836 - `annotations: optional unknown or null`78377838 Additional annotations about the tool.78397840 - `description: optional string or null`78417842 The description of the tool.78437844 - `type: "mcp_list_tools"`78457846 The type of the item. Always `mcp_list_tools`.78477848 - `"mcp_list_tools"`78497850 - `error: optional string or null`78517852 Error message if the server could not list tools.78537854 - `McpApprovalRequest object { id, arguments, name, 2 more }`78557856 A request for human approval of a tool invocation.78577858 - `id: string`78597860 The unique ID of the approval request.78617862 - `arguments: string`78637864 A JSON string of arguments for the tool.78657866 - `name: string`78677868 The name of the tool to run.78697870 - `server_label: string`78717872 The label of the MCP server making the request.78737874 - `type: "mcp_approval_request"`78757876 The type of the item. Always `mcp_approval_request`.78777878 - `"mcp_approval_request"`78797880 - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`78817882 A response to an MCP approval request.78837884 - `id: string`78857886 The unique ID of the approval response78877888 - `approval_request_id: string`78897890 The ID of the approval request being answered.78917892 - `approve: boolean`78937894 Whether the request was approved.78957896 - `type: "mcp_approval_response"`78977898 The type of the item. Always `mcp_approval_response`.78997900 - `"mcp_approval_response"`79017902 - `reason: optional string or null`79037904 Optional reason for the decision.79057906 - `CustomToolCall object { call_id, input, name, 5 more }`79077908 A call to a custom tool created by the model.79097910 - `call_id: string`79117912 An identifier used to map this custom tool call to a tool call output.79137914 - `input: string`79157916 The input for the custom tool call generated by the model.79177918 - `name: string`79197920 The name of the custom tool being called.79217922 - `type: "custom_tool_call"`79237924 The type of the custom tool call. Always `custom_tool_call`.79257926 - `"custom_tool_call"`79277928 - `id: optional string`79297930 The unique ID of the custom tool call in the OpenAI platform.79317932 - `async: optional boolean`79337934 Whether the custom tool call runs asynchronously.79357936 - `caller: optional object { type } or object { caller_id, type } or null`79377938 The execution context that produced this tool call.79397940 - `Direct object { type }`79417942 - `type: "direct"`79437944 - `"direct"`79457946 - `Program object { caller_id, type }`79477948 - `caller_id: string`79497950 The call ID of the program item that produced this tool call.79517952 - `type: "program"`79537954 - `"program"`79557956 - `namespace: optional string`79577958 The namespace of the custom tool being called.79597960 - `CustomToolCallOutput object { id, call_id, output, 4 more }`79617962 - `id: string`79637964 The unique ID of the custom tool call output item.79657966 - `call_id: string`79677968 The call ID, used to map this custom tool call output to a custom tool call.79697970 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`79717972 The output from the custom tool call generated by your code.7973 Can be a string or an list of output content.79747975 - `StringOutput = string`79767977 A string of the output of the custom tool call.79787979 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`79807981 Text, image, or file output of the custom tool call.79827983 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`79847985 A text input to the model.79867987 - `ResponseInputImage object { detail, type, file_id, 2 more }`79887989 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).79907991 - `ResponseInputFile object { type, detail, file_data, 4 more }`79927993 A file input to the model.79947995 - `status: "in_progress" or "completed" or "incomplete"`79967997 The status of the item. One of `in_progress`, `completed`, or7998 `incomplete`. Populated when items are returned via API.79998000 - `"in_progress"`80018002 - `"completed"`80038004 - `"incomplete"`80058006 - `type: "custom_tool_call_output"`80078008 The type of the custom tool call output. Always `custom_tool_call_output`.80098010 - `"custom_tool_call_output"`80118012 - `caller: optional object { type } or object { caller_id, type } or null`80138014 The execution context that produced this tool call.80158016 - `Direct object { type }`80178018 - `type: "direct"`80198020 The caller type. Always `direct`.80218022 - `"direct"`80238024 - `Program object { caller_id, type }`80258026 - `caller_id: string`80278028 The call ID of the program item that produced this tool call.80298030 - `type: "program"`80318032 The caller type. Always `program`.80338034 - `"program"`80358036 - `created_by: optional string`80378038 The identifier of the actor that created the item.80398040 - `parallel_tool_calls: boolean`80418042 Whether to allow the model to run tool calls in parallel.80438044 - `temperature: number or null`80458046 What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.8047 We generally recommend altering this or `top_p` but not both.80488049 - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 6 more`80508051 How the model should select which tool (or tools) to use when generating8052 a response. See the `tools` parameter to see how to specify which tools8053 the model can call.80548055 - `ToolChoiceOptions = "none" or "auto" or "required"`80568057 Controls which (if any) tool is called by the model.80588059 `none` means the model will not call any tool and instead generates a message.80608061 `auto` means the model can pick between generating a message or calling one or8062 more tools.80638064 `required` means the model must call one or more tools.80658066 - `"none"`80678068 - `"auto"`80698070 - `"required"`80718072 - `ToolChoiceAllowed object { mode, tools, type }`80738074 Constrains the tools available to the model to a pre-defined set.80758076 - `mode: "auto" or "required"`80778078 Constrains the tools available to the model to a pre-defined set.80798080 `auto` allows the model to pick from among the allowed tools and generate a8081 message.80828083 `required` requires the model to call one or more of the allowed tools.80848085 - `"auto"`80868087 - `"required"`80888089 - `tools: array of map[unknown]`80908091 A list of tool definitions that the model should be allowed to call.80928093 For the Responses API, the list of tool definitions might look like:80948095 ```json8096 [8097 { "type": "function", "name": "get_weather" },8098 { "type": "mcp", "server_label": "deepwiki" },8099 { "type": "image_generation" }8100 ]8101 ```81028103 - `type: "allowed_tools"`81048105 Allowed tool configuration type. Always `allowed_tools`.81068107 - `"allowed_tools"`81088109 - `ToolChoiceTypes object { type }`81108111 Indicates that the model should use a built-in tool to generate a response.8112 [Learn more about built-in tools](/api/docs/guides/tools).81138114 - `type: "file_search" or "web_search_preview" or "computer" or 5 more`81158116 The type of hosted tool the model should to use. Learn more about8117 [built-in tools](/api/docs/guides/tools).81188119 Allowed values are:81208121 - `file_search`8122 - `web_search_preview`8123 - `computer`8124 - `computer_use_preview`8125 - `computer_use`8126 - `code_interpreter`8127 - `image_generation`81288129 - `"file_search"`81308131 - `"web_search_preview"`81328133 - `"computer"`81348135 - `"computer_use_preview"`81368137 - `"computer_use"`81388139 - `"web_search_preview_2025_03_11"`81408141 - `"image_generation"`81428143 - `"code_interpreter"`81448145 - `ToolChoiceFunction object { name, type }`81468147 Use this option to force the model to call a specific function.81488149 - `name: string`81508151 The name of the function to call.81528153 - `type: "function"`81548155 For function calling, the type is always `function`.81568157 - `"function"`81588159 - `ToolChoiceMcp object { server_label, type, name }`81608161 Use this option to force the model to call a specific tool on a remote MCP server.81628163 - `server_label: string`81648165 The label of the MCP server to use.81668167 - `type: "mcp"`81688169 For MCP tools, the type is always `mcp`.81708171 - `"mcp"`81728173 - `name: optional string or null`81748175 The name of the tool to call on the server.81768177 - `ToolChoiceCustom object { name, type }`81788179 Use this option to force the model to call a specific custom tool.81808181 - `name: string`81828183 The name of the custom tool to call.81848185 - `type: "custom"`81868187 For custom tool calling, the type is always `custom`.81888189 - `"custom"`81908191 - `SpecificProgrammaticToolCallingParam object { type }`81928193 - `type: "programmatic_tool_calling"`81948195 The tool to call. Always `programmatic_tool_calling`.81968197 - `"programmatic_tool_calling"`81988199 - `ToolChoiceApplyPatch object { type }`82008201 Forces the model to call the apply_patch tool when executing a tool call.82028203 - `type: "apply_patch"`82048205 The tool to call. Always `apply_patch`.82068207 - `"apply_patch"`82088209 - `ToolChoiceShell object { type }`82108211 Forces the model to call the shell tool when a tool call is required.82128213 - `type: "shell"`82148215 The tool to call. Always `shell`.82168217 - `"shell"`82188219 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`82208221 An array of tools the model may call while generating a response. You8222 can specify which tool to use by setting the `tool_choice` parameter.82238224 We support the following categories of tools:82258226 - **Built-in tools**: Tools that are provided by OpenAI that extend the8227 model's capabilities, like [web search](/api/docs/guides/tools-web-search)8228 or [file search](/api/docs/guides/tools-file-search). Learn more about8229 [built-in tools](/api/docs/guides/tools).8230 - **MCP Tools**: Integrations with third-party systems via custom MCP servers8231 or predefined connectors such as Google Drive and SharePoint. Learn more about8232 [MCP Tools](/api/docs/guides/tools-connectors-mcp).8233 - **Function calls (custom tools)**: Functions that are defined by you,8234 enabling the model to call your own code with strongly typed arguments8235 and outputs. Learn more about8236 [function calling](/api/docs/guides/function-calling). You can also use8237 custom tools to call your own code.82388239 - `Function object { name, parameters, strict, 6 more }`82408241 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).82428243 - `name: string`82448245 The name of the function to call.82468247 - `parameters: map[unknown] or null`82488249 A JSON schema object describing the parameters of the function.82508251 - `strict: boolean or null`82528253 Whether strict parameter validation is enforced for this function tool.82548255 - `type: "function"`82568257 The type of the function tool. Always `function`.82588259 - `"function"`82608261 - `allowed_callers: optional array of "direct" or "programmatic" or null`82628263 The tool invocation context(s).82648265 - `"direct"`82668267 - `"programmatic"`82688269 - `async: optional boolean`82708271 - `defer_loading: optional boolean`82728273 Whether this function is deferred and loaded via tool search.82748275 - `description: optional string or null`82768277 A description of the function. Used by the model to determine whether or not to call the function.82788279 - `output_schema: optional map[unknown] or null`82808281 A JSON schema object describing the JSON value encoded in string outputs for this function.82828283 - `FileSearch object { type, vector_store_ids, filters, 2 more }`82848285 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).82868287 - `type: "file_search"`82888289 The type of the file search tool. Always `file_search`.82908291 - `"file_search"`82928293 - `vector_store_ids: array of string`82948295 The IDs of the vector stores to search.82968297 - `filters: optional ComparisonFilter or CompoundFilter or null`82988299 A filter to apply.83008301 - `ComparisonFilter object { key, type, value }`83028303 A filter used to compare a specified attribute key to a given value using a defined comparison operation.83048305 - `CompoundFilter object { filters, type }`83068307 Combine multiple filters using `and` or `or`.83088309 - `max_num_results: optional number`83108311 The maximum number of results to return. This number should be between 1 and 50 inclusive.83128313 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`83148315 Ranking options for search.83168317 - `hybrid_search: optional object { embedding_weight, text_weight }`83188319 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.83208321 - `embedding_weight: number`83228323 The weight of the embedding in the reciprocal ranking fusion.83248325 - `text_weight: number`83268327 The weight of the text in the reciprocal ranking fusion.83288329 - `ranker: optional "auto" or "default-2024-11-15"`83308331 The ranker to use for the file search.83328333 - `"auto"`83348335 - `"default-2024-11-15"`83368337 - `score_threshold: optional number`83388339 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.83408341 - `Computer object { type }`83428343 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).83448345 - `type: "computer"`83468347 The type of the computer tool. Always `computer`.83488349 - `"computer"`83508351 - `ComputerUsePreview object { display_height, display_width, environment, type }`83528353 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).83548355 - `display_height: number`83568357 The height of the computer display.83588359 - `display_width: number`83608361 The width of the computer display.83628363 - `environment: "windows" or "mac" or "linux" or 2 more`83648365 The type of computer environment to control.83668367 - `"windows"`83688369 - `"mac"`83708371 - `"linux"`83728373 - `"ubuntu"`83748375 - `"browser"`83768377 - `type: "computer_use_preview"`83788379 The type of the computer use tool. Always `computer_use_preview`.83808381 - `"computer_use_preview"`83828383 - `WebSearch object { type, external_web_access, filters, 2 more }`83848385 Search the Internet for sources related to the prompt. Learn more about the8386 [web search tool](/api/docs/guides/tools-web-search).83878388 - `type: "web_search" or "web_search_2025_08_26"`83898390 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.83918392 - `"web_search"`83938394 - `"web_search_2025_08_26"`83958396 - `external_web_access: optional boolean`83978398 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.83998400 - `filters: optional object { allowed_domains } or null`84018402 Filters for the search.84038404 - `allowed_domains: optional array of string or null`84058406 Allowed domains for the search. If not provided, all domains are allowed.8407 Subdomains of the provided domains are allowed as well.84088409 Example: `["pubmed.ncbi.nlm.nih.gov"]`84108411 - `search_context_size: optional "low" or "medium" or "high"`84128413 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.84148415 - `"low"`84168417 - `"medium"`84188419 - `"high"`84208421 - `user_location: optional object { city, country, region, 2 more } or null`84228423 The approximate location of the user.84248425 - `city: optional string or null`84268427 Free text input for the city of the user, e.g. `San Francisco`.84288429 - `country: optional string or null`84308431 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.84328433 - `region: optional string or null`84348435 Free text input for the region of the user, e.g. `California`.84368437 - `timezone: optional string or null`84388439 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.84408441 - `type: optional "approximate"`84428443 The type of location approximation. Always `approximate`.84448445 - `"approximate"`84468447 - `Mcp object { server_label, type, allowed_callers, 9 more }`84488449 Give the model access to additional tools via remote Model Context Protocol8450 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).84518452 - `server_label: string`84538454 A label for this MCP server, used to identify it in tool calls.84558456 - `type: "mcp"`84578458 The type of the MCP tool. Always `mcp`.84598460 - `"mcp"`84618462 - `allowed_callers: optional array of "direct" or "programmatic" or null`84638464 The tool invocation context(s).84658466 - `"direct"`84678468 - `"programmatic"`84698470 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`84718472 List of allowed tool names or a filter object.84738474 - `McpAllowedTools = array of string`84758476 A string array of allowed tool names84778478 - `McpToolFilter object { read_only, tool_names }`84798480 A filter object to specify which tools are allowed.84818482 - `read_only: optional boolean`84838484 Indicates whether or not a tool modifies data or is read-only. If an8485 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8486 it will match this filter.84878488 - `tool_names: optional array of string`84898490 List of allowed tool names.84918492 - `authorization: optional string`84938494 An OAuth access token that can be used with a remote MCP server, either8495 with a custom MCP server URL or a service connector. Your application8496 must handle the OAuth authorization flow and provide the token here.84978498 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`84998500 Identifier for service connectors, like those available in ChatGPT. One of8501 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more8502 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).85038504 This field is deprecated for models released after September 1, 2026.8505 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to8506 connect through a Secure MCP Tunnel.85078508 Currently supported `connector_id` values are:85098510 - Dropbox: `connector_dropbox`8511 - Gmail: `connector_gmail`8512 - Google Calendar: `connector_googlecalendar`8513 - Google Drive: `connector_googledrive`8514 - Microsoft Teams: `connector_microsoftteams`8515 - Outlook Calendar: `connector_outlookcalendar`8516 - Outlook Email: `connector_outlookemail`8517 - SharePoint: `connector_sharepoint`85188519 - `"connector_dropbox"`85208521 - `"connector_gmail"`85228523 - `"connector_googlecalendar"`85248525 - `"connector_googledrive"`85268527 - `"connector_microsoftteams"`85288529 - `"connector_outlookcalendar"`85308531 - `"connector_outlookemail"`85328533 - `"connector_sharepoint"`85348535 - `defer_loading: optional boolean`85368537 Whether this MCP tool is deferred and discovered via tool search.85388539 - `headers: optional map[string] or null`85408541 Optional HTTP headers to send to the MCP server. Use for authentication8542 or other purposes.85438544 - `require_approval: optional object { always, never } or "always" or "never" or null`85458546 Specify which of the MCP server's tools require approval.85478548 - `McpToolApprovalFilter object { always, never }`85498550 Specify which of the MCP server's tools require approval. Can be8551 `always`, `never`, or a filter object associated with tools8552 that require approval.85538554 - `always: optional object { read_only, tool_names }`85558556 A filter object to specify which tools are allowed.85578558 - `read_only: optional boolean`85598560 Indicates whether or not a tool modifies data or is read-only. If an8561 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8562 it will match this filter.85638564 - `tool_names: optional array of string`85658566 List of allowed tool names.85678568 - `never: optional object { read_only, tool_names }`85698570 A filter object to specify which tools are allowed.85718572 - `read_only: optional boolean`85738574 Indicates whether or not a tool modifies data or is read-only. If an8575 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8576 it will match this filter.85778578 - `tool_names: optional array of string`85798580 List of allowed tool names.85818582 - `McpToolApprovalSetting = "always" or "never"`85838584 Specify a single approval policy for all tools. One of `always` or8585 `never`. When set to `always`, all tools will require approval. When8586 set to `never`, all tools will not require approval.85878588 - `"always"`85898590 - `"never"`85918592 - `server_description: optional string`85938594 Optional description of the MCP server, used to provide more context.85958596 - `server_url: optional string`85978598 The URL for the MCP server. One of `server_url`, `connector_id`, or8599 `tunnel_id` must be provided.86008601 - `tunnel_id: optional string`86028603 The Secure MCP Tunnel ID to use instead of a direct server URL. One of8604 `server_url`, `connector_id`, or `tunnel_id` must be provided.86058606 - `CodeInterpreter object { container, type, allowed_callers }`86078608 A tool that runs Python code to help generate a response to a prompt.86098610 - `container: string or object { type, file_ids, memory_limit, network_policy }`86118612 The code interpreter container. Can be a container ID or an object that8613 specifies uploaded file IDs to make available to your code, along with an8614 optional `memory_limit` setting.86158616 - `string`86178618 The container ID.86198620 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`86218622 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.86238624 - `type: "auto"`86258626 Always `auto`.86278628 - `"auto"`86298630 - `file_ids: optional array of string`86318632 An optional list of uploaded files to make available to your code.86338634 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`86358636 The memory limit for the code interpreter container.86378638 - `"1g"`86398640 - `"4g"`86418642 - `"16g"`86438644 - `"64g"`86458646 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`86478648 Network access policy for the container.86498650 - `ContainerNetworkPolicyDisabled object { type }`86518652 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`86538654 - `type: "code_interpreter"`86558656 The type of the code interpreter tool. Always `code_interpreter`.86578658 - `"code_interpreter"`86598660 - `allowed_callers: optional array of "direct" or "programmatic" or null`86618662 The tool invocation context(s).86638664 - `"direct"`86658666 - `"programmatic"`86678668 - `ProgrammaticToolCalling object { type }`86698670 - `type: "programmatic_tool_calling"`86718672 The type of the tool. Always `programmatic_tool_calling`.86738674 - `"programmatic_tool_calling"`86758676 - `ImageGeneration object { type, action, background, 9 more }`86778678 A tool that generates images using the GPT image models.86798680 - `type: "image_generation"`86818682 The type of the image generation tool. Always `image_generation`.86838684 - `"image_generation"`86858686 - `action: optional "generate" or "edit" or "auto"`86878688 Whether to generate a new image or edit an existing image. Default: `auto`.86898690 - `"generate"`86918692 - `"edit"`86938694 - `"auto"`86958696 - `background: optional "transparent" or "opaque" or "auto"`86978698 Set the background of the generated image. One of `transparent`, `opaque`,8699 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including8700 their `2026-09-08` snapshots, support `opaque` and `transparent`8701 backgrounds. Transparent backgrounds are available for supported GPT Image8702 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in8703 preview. When using `transparent`, set the output format to `png` or `webp`.8704 Default: `auto`.87058706 - `"transparent"`87078708 - `"opaque"`87098710 - `"auto"`87118712 - `input_fidelity: optional "high" or "low" or null`87138714 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`.87158716 - `"high"`87178718 - `"low"`87198720 - `input_image_mask: optional object { file_id, image_url }`87218722 Optional mask for inpainting. Contains `image_url`8723 (string, optional) and `file_id` (string, optional).87248725 - `file_id: optional string`87268727 File ID for the mask image.87288729 - `image_url: optional string`87308731 Base64-encoded mask image.87328733 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`87348735 The image generation model to use. One of `gpt-image-1`,8736 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,8737 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,8738 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,8739 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:8740 `gpt-image-1`.87418742 - `string`87438744 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`87458746 The image generation model to use. One of `gpt-image-1`,8747 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,8748 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,8749 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,8750 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:8751 `gpt-image-1`.87528753 - `"gpt-image-1"`87548755 - `"gpt-image-1-mini"`87568757 - `"gpt-image-1.5"`87588759 - `"gpt-image-2"`87608761 - `"gpt-image-2-2026-04-21"`87628763 - `"gpt-image-2.5-sunburst"`87648765 - `"gpt-image-2.5-sunburst-2026-09-08"`87668767 - `"gpt-image-2.5-flare"`87688769 - `"gpt-image-2.5-flare-2026-09-08"`87708771 - `moderation: optional "auto" or "low"`87728773 Moderation level for the generated image. Default: `auto`.87748775 - `"auto"`87768777 - `"low"`87788779 - `output_compression: optional number`87808781 Compression level for the output image. Default: 100.87828783 - `output_format: optional "png" or "webp" or "jpeg"`87848785 The output format of the generated image. One of `png`, `webp`, or8786 `jpeg`. Default: `png`.87878788 - `"png"`87898790 - `"webp"`87918792 - `"jpeg"`87938794 - `partial_images: optional number`87958796 Number of partial images to generate in streaming mode, from 0 (default value) to 3.87978798 - `quality: optional "low" or "medium" or "high" or 3 more`87998800 The quality of the generated image. The GPT image models support `low`,8801 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,8802 including their `2026-09-08` snapshots, also support `xhigh` and `max`.8803 Default: `auto`.88048805 - `"low"`88068807 - `"medium"`88088809 - `"high"`88108811 - `"xhigh"`88128813 - `"max"`88148815 - `"auto"`88168817 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`88188819 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`.88208821 - `string`88228823 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`88248825 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`.88268827 - `"1024x1024"`88288829 - `"1024x1536"`88308831 - `"1536x1024"`88328833 - `"auto"`88348835 - `LocalShell object { type }`88368837 A tool that allows the model to execute shell commands in a local environment.88388839 - `type: "local_shell"`88408841 The type of the local shell tool. Always `local_shell`.88428843 - `"local_shell"`88448845 - `Shell object { type, allowed_callers, environment }`88468847 A tool that allows the model to execute shell commands.88488849 - `type: "shell"`88508851 The type of the shell tool. Always `shell`.88528853 - `"shell"`88548855 - `allowed_callers: optional array of "direct" or "programmatic" or null`88568857 The tool invocation context(s).88588859 - `"direct"`88608861 - `"programmatic"`88628863 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`88648865 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`88668867 - `LocalEnvironment object { type, skills }`88688869 - `ContainerReference object { container_id, type }`88708871 - `Custom object { name, type, allowed_callers, 4 more }`88728873 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)88748875 - `name: string`88768877 The name of the custom tool, used to identify it in tool calls.88788879 - `type: "custom"`88808881 The type of the custom tool. Always `custom`.88828883 - `"custom"`88848885 - `allowed_callers: optional array of "direct" or "programmatic" or null`88868887 The tool invocation context(s).88888889 - `"direct"`88908891 - `"programmatic"`88928893 - `async: optional boolean`88948895 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.88968897 - `defer_loading: optional boolean`88988899 Whether this tool should be deferred and discovered via tool search.89008901 - `description: optional string`89028903 Optional description of the custom tool, used to provide more context.89048905 - `format: optional CustomToolInputFormat`89068907 The input format for the custom tool. Default is unconstrained text.89088909 - `Namespace object { description, name, tools, type }`89108911 Groups function/custom tools under a shared namespace.89128913 - `description: string`89148915 A description of the namespace shown to the model.89168917 - `name: string`89188919 The namespace name used in tool calls (for example, `crm`).89208921 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`89228923 The function/custom tools available inside this namespace.89248925 - `Function object { name, type, allowed_callers, 6 more }`89268927 - `name: string`89288929 - `type: "function"`89308931 - `"function"`89328933 - `allowed_callers: optional array of "direct" or "programmatic" or null`89348935 The tool invocation context(s).89368937 - `"direct"`89388939 - `"programmatic"`89408941 - `async: optional boolean`89428943 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.89448945 - `defer_loading: optional boolean`89468947 Whether this function should be deferred and discovered via tool search.89488949 - `description: optional string or null`89508951 - `output_schema: optional map[unknown] or null`89528953 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.89548955 - `parameters: optional unknown or null`89568957 - `strict: optional boolean or null`89588959 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.89608961 - `Custom object { name, type, allowed_callers, 4 more }`89628963 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)89648965 - `name: string`89668967 The name of the custom tool, used to identify it in tool calls.89688969 - `type: "custom"`89708971 The type of the custom tool. Always `custom`.89728973 - `"custom"`89748975 - `allowed_callers: optional array of "direct" or "programmatic" or null`89768977 The tool invocation context(s).89788979 - `"direct"`89808981 - `"programmatic"`89828983 - `async: optional boolean`89848985 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.89868987 - `defer_loading: optional boolean`89888989 Whether this tool should be deferred and discovered via tool search.89908991 - `description: optional string`89928993 Optional description of the custom tool, used to provide more context.89948995 - `format: optional CustomToolInputFormat`89968997 The input format for the custom tool. Default is unconstrained text.89988999 - `type: "namespace"`90009001 The type of the tool. Always `namespace`.90029003 - `"namespace"`90049005 - `ToolSearch object { type, description, execution, parameters }`90069007 Hosted or BYOT tool search configuration for deferred tools.90089009 - `type: "tool_search"`90109011 The type of the tool. Always `tool_search`.90129013 - `"tool_search"`90149015 - `description: optional string or null`90169017 Description shown to the model for a client-executed tool search tool.90189019 - `execution: optional "server" or "client"`90209021 Whether tool search is executed by the server or by the client.90229023 - `"server"`90249025 - `"client"`90269027 - `parameters: optional unknown or null`90289029 Parameter schema for a client-executed tool search tool.90309031 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`90329033 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).90349035 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`90369037 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.90389039 - `"web_search_preview"`90409041 - `"web_search_preview_2025_03_11"`90429043 - `search_content_types: optional array of "text" or "image"`90449045 - `"text"`90469047 - `"image"`90489049 - `search_context_size: optional "low" or "medium" or "high"`90509051 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.90529053 - `"low"`90549055 - `"medium"`90569057 - `"high"`90589059 - `user_location: optional object { type, city, country, 2 more } or null`90609061 The user's location.90629063 - `type: "approximate"`90649065 The type of location approximation. Always `approximate`.90669067 - `"approximate"`90689069 - `city: optional string or null`90709071 Free text input for the city of the user, e.g. `San Francisco`.90729073 - `country: optional string or null`90749075 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.90769077 - `region: optional string or null`90789079 Free text input for the region of the user, e.g. `California`.90809081 - `timezone: optional string or null`90829083 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.90849085 - `ApplyPatch object { type, allowed_callers }`90869087 Allows the assistant to create, delete, or update files using unified diffs.90889089 - `type: "apply_patch"`90909091 The type of the tool. Always `apply_patch`.90929093 - `"apply_patch"`90949095 - `allowed_callers: optional array of "direct" or "programmatic" or null`90969097 The tool invocation context(s).90989099 - `"direct"`91009101 - `"programmatic"`91029103 - `top_p: number or null`91049105 An alternative to sampling with temperature, called nucleus sampling,9106 where the model considers the results of the tokens with top_p probability9107 mass. So 0.1 means only the tokens comprising the top 10% probability mass9108 are considered.91099110 We generally recommend altering this or `temperature` but not both.91119112 - `background: optional boolean or null`91139114 Whether to run the model response in the background.9115 [Learn more](/api/docs/guides/background).91169117 - `completed_at: optional number or null`91189119 Unix timestamp (in seconds) of when this Response was completed.9120 Only present when the status is `completed`.91219122 - `conversation: optional object { id } or null`91239124 The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.91259126 - `id: string`91279128 The unique ID of the conversation that this response was associated with.91299130 - `max_output_tokens: optional number or null`91319132 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).91339134 - `max_tool_calls: optional number or null`91359136 The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.91379138 - `moderation: optional object { input, output } or null`91399140 Moderation results for the response input and output, if moderated completions were requested.91419142 - `input: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }`91439144 Moderation for the response input.91459146 - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }`91479148 A moderation result produced for the response input or output.91499150 - `categories: map[boolean]`91519152 A dictionary of moderation categories to booleans, True if the input is flagged under this category.91539154 - `category_applied_input_types: map[array of "text" or "image"]`91559156 Which modalities of input are reflected by the score for each category.91579158 - `"text"`91599160 - `"image"`91619162 - `category_scores: map[number]`91639164 A dictionary of moderation categories to scores.91659166 - `flagged: boolean`91679168 A boolean indicating whether the content was flagged by any category.91699170 - `model: string`91719172 The moderation model that produced this result.91739174 - `type: "moderation_result"`91759176 The object type, which was always `moderation_result` for successful moderation results.91779178 - `"moderation_result"`91799180 - `Error object { code, message, type }`91819182 An error produced while attempting moderation for the response input or output.91839184 - `code: string`91859186 The error code.91879188 - `message: string`91899190 The error message.91919192 - `type: "error"`91939194 The object type, which was always `error` for moderation failures.91959196 - `"error"`91979198 - `output: object { categories, category_applied_input_types, category_scores, 3 more } or object { code, message, type }`91999200 Moderation for the response output.92019202 - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }`92039204 A moderation result produced for the response input or output.92059206 - `categories: map[boolean]`92079208 A dictionary of moderation categories to booleans, True if the input is flagged under this category.92099210 - `category_applied_input_types: map[array of "text" or "image"]`92119212 Which modalities of input are reflected by the score for each category.92139214 - `"text"`92159216 - `"image"`92179218 - `category_scores: map[number]`92199220 A dictionary of moderation categories to scores.92219222 - `flagged: boolean`92239224 A boolean indicating whether the content was flagged by any category.92259226 - `model: string`92279228 The moderation model that produced this result.92299230 - `type: "moderation_result"`92319232 The object type, which was always `moderation_result` for successful moderation results.92339234 - `"moderation_result"`92359236 - `Error object { code, message, type }`92379238 An error produced while attempting moderation for the response input or output.92399240 - `code: string`92419242 The error code.92439244 - `message: string`92459246 The error message.92479248 - `type: "error"`92499250 The object type, which was always `error` for moderation failures.92519252 - `"error"`92539254 - `output_text: optional string or null`92559256 SDK-only convenience property that contains the aggregated text output9257 from all `output_text` items in the `output` array, if any are present.9258 Supported in the Python and JavaScript SDKs.92599260 - `previous_response_id: optional string or null`92619262 The unique ID of the previous response to the model. Use this to9263 create multi-turn conversations. Learn more about9264 [conversation state](/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.92659266 - `prompt: optional ResponsePrompt or null`92679268 Reference to a prompt template and its variables.9269 [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).92709271 - `id: string`92729273 The unique identifier of the prompt template to use.92749275 - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`92769277 Optional map of values to substitute in for variables in your9278 prompt. The substitution values can either be strings, or other9279 Response input types like images or files.92809281 - `string`92829283 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`92849285 A text input to the model.92869287 - `ResponseInputImage object { detail, type, file_id, 2 more }`92889289 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).92909291 - `ResponseInputFile object { type, detail, file_data, 4 more }`92929293 A file input to the model.92949295 - `version: optional string or null`92969297 Optional version of the prompt template.92989299 - `prompt_cache_diagnostics: optional object { cache_missed_tokens, reason, type, comparison_reusable_tokens } or object { type } or object { type } or object { type }`93009301 Prompt cache diagnostics requested for this response.93029303 - `CacheMiss object { cache_missed_tokens, reason, type, comparison_reusable_tokens }`93049305 - `cache_missed_tokens: number`93069307 The estimated number of input tokens affected after the first detected divergence.93089309 - `reason: "model_changed" or "prompt_cache_key_changed" or "tools_changed" or 6 more`93109311 The reason prompt cache reuse did not occur.93129313 - `"model_changed"`93149315 - `"prompt_cache_key_changed"`93169317 - `"tools_changed"`93189319 - `"text_format_changed"`93209321 - `"reasoning_effort_changed"`93229323 - `"verbosity_changed"`93249325 - `"context_compacted"`93269327 - `"input_changed"`93289329 - `"service_tier_changed"`93309331 - `type: "cache_miss"`93329333 - `"cache_miss"`93349335 - `comparison_reusable_tokens: optional number`93369337 The raw token count of the reusable prefix in the compared response.93389339 - `CacheHit object { type }`93409341 - `type: "cache_hit"`93429343 - `"cache_hit"`93449345 - `ComparisonResponseNotFound object { type }`93469347 - `type: "comparison_response_not_found"`93489349 - `"comparison_response_not_found"`93509351 - `Unavailable object { type }`93529353 - `type: "unavailable"`93549355 - `"unavailable"`93569357 - `prompt_cache_key: optional string or null`93589359 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/api/docs/guides/prompt-caching).93609361 - `prompt_cache_options: optional object { mode, ttl, comparison_response_id }`93629363 The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.93649365 - `mode: "implicit" or "explicit"`93669367 Whether implicit prompt-cache breakpoints were enabled.93689369 - `"implicit"`93709371 - `"explicit"`93729373 - `ttl: "30m"`93749375 The minimum lifetime applied to each cache breakpoint.93769377 - `"30m"`93789379 - `comparison_response_id: optional string or null`93809381 The response ID supplied as the prompt cache diagnostics comparison.93829383 - `prompt_cache_retention: optional "in_memory" or "24h" or null`93849385 Deprecated. Use `prompt_cache_options.ttl` instead.93869387 The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/api/docs/guides/prompt-caching#prompt-cache-retention).9388 This field expresses a maximum retention policy, while9389 `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two9390 fields are independent and do not interact.9391 For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.93929393 For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:93949395 - Organizations without ZDR enabled default to `24h`.9396 - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.93979398 - `"in_memory"`93999400 - `"24h"`94019402 - `reasoning: optional Reasoning or null`94039404 Configuration options for9405 [reasoning models](/api/docs/guides/reasoning).94069407 - `context: optional "auto" or "current_turn" or "all_turns" or null`94089409 Controls which reasoning items are rendered back to the model on later turns.9410 If omitted or set to `auto`, the model determines the context mode. The9411 `gpt-5.6` model family defaults to `all_turns`; earlier models default to9412 `current_turn`.94139414 When returned on a response, this is the effective reasoning context mode9415 used for the response.94169417 - `"auto"`94189419 - `"current_turn"`94209421 - `"all_turns"`94229423 - `effort: optional ReasoningEffort or null`94249425 Constrains effort on reasoning for reasoning models. Currently supported9426 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.9427 Reducing reasoning effort can result in faster responses and fewer tokens9428 used on reasoning in a response. Not all reasoning models support every9429 value. See the9430 [reasoning guide](/api/docs/guides/reasoning)9431 for model-specific support.94329433 - `generate_summary: optional "auto" or "concise" or "detailed" or null`94349435 **Deprecated:** use `summary` instead.94369437 A summary of the reasoning performed by the model. This can be9438 useful for debugging and understanding the model's reasoning process.9439 One of `auto`, `concise`, or `detailed`.94409441 - `"auto"`94429443 - `"concise"`94449445 - `"detailed"`94469447 - `mode: optional string or "standard" or "pro"`94489449 Controls the reasoning execution mode for the request.94509451 When returned on a response, this is the effective execution mode.94529453 - `string`94549455 - `"standard" or "pro"`94569457 Controls the reasoning execution mode for the request.94589459 When returned on a response, this is the effective execution mode.94609461 - `"standard"`94629463 - `"pro"`94649465 - `summary: optional "auto" or "concise" or "detailed" or null`94669467 A summary of the reasoning performed by the model. This can be9468 useful for debugging and understanding the model's reasoning process.9469 One of `auto`, `concise`, or `detailed`.94709471 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.94729473 - `"auto"`94749475 - `"concise"`94769477 - `"detailed"`94789479 - `safety_identifier: optional string or null`94809481 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.9482 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).94839484 - `service_tier: optional ServiceTier or null`94859486 Specifies the processing type used for serving the request.94879488 - 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'.9489 - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.9490 - If set to '[flex](/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier.9491 - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request.9492 - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`.9493 - When not set, the default behavior is 'auto'.94949495 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.94969497 - `"auto"`94989499 - `"default"`95009501 - `"flex"`95029503 - `"scale"`95049505 - `"priority"`95069507 - `"fast"`95089509 - `"ultrafast"`95109511 - `status: optional ResponseStatus`95129513 The status of the response generation. One of `completed`, `failed`,9514 `in_progress`, `cancelled`, `queued`, or `incomplete`.95159516 - `"completed"`95179518 - `"failed"`95199520 - `"in_progress"`95219522 - `"cancelled"`95239524 - `"queued"`95259526 - `"incomplete"`95279528 - `text: optional ResponseTextConfig`95299530 Configuration options for a text response from the model. Can be plain9531 text or structured JSON data. Learn more:95329533 - [Text inputs and outputs](/api/docs/guides/text)9534 - [Structured Outputs](/api/docs/guides/structured-outputs)95359536 - `format: optional ResponseFormatTextConfig`95379538 An object specifying the format that the model must output.95399540 Configuring `{ "type": "json_schema" }` enables Structured Outputs,9541 which ensures the model will match your supplied JSON schema. Learn more in the9542 [Structured Outputs guide](/api/docs/guides/structured-outputs).95439544 The default format is `{ "type": "text" }` with no additional options.95459546 **Not recommended for gpt-4o and newer models:**95479548 Setting to `{ "type": "json_object" }` enables the older JSON mode, which9549 ensures the message the model generates is valid JSON. Using `json_schema`9550 is preferred for models that support it.95519552 - `ResponseFormatText object { type }`95539554 Default response format. Used to generate text responses.95559556 - `type: "text"`95579558 The type of response format being defined. Always `text`.95599560 - `"text"`95619562 - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`95639564 JSON Schema response format. Used to generate structured JSON responses.9565 Learn more about [Structured Outputs](/api/docs/guides/structured-outputs).95669567 - `name: string`95689569 The name of the response format. Must be a-z, A-Z, 0-9, or contain9570 underscores and dashes, with a maximum length of 64.95719572 - `schema: map[unknown]`95739574 The schema for the response format, described as a JSON Schema object.9575 Learn how to build JSON schemas [here](https://json-schema.org/).95769577 - `type: "json_schema"`95789579 The type of response format being defined. Always `json_schema`.95809581 - `"json_schema"`95829583 - `description: optional string`95849585 A description of what the response format is for, used by the model to9586 determine how to respond in the format.95879588 - `strict: optional boolean or null`95899590 Whether to enable strict schema adherence when generating the output.9591 If set to true, the model will always follow the exact schema defined9592 in the `schema` field. Only a subset of JSON Schema is supported when9593 `strict` is `true`. To learn more, read the [Structured Outputs9594 guide](/api/docs/guides/structured-outputs).95959596 - `ResponseFormatJSONObject object { type }`95979598 JSON object response format. An older method of generating JSON responses.9599 Using `json_schema` is recommended for models that support it. Note that the9600 model will not generate JSON without a system or user message instructing it9601 to do so.96029603 - `type: "json_object"`96049605 The type of response format being defined. Always `json_object`.96069607 - `"json_object"`96089609 - `verbosity: optional "low" or "medium" or "high" or null`96109611 Constrains the verbosity of the model's response. Lower values will result in9612 more concise responses, while higher values will result in more verbose responses.9613 Currently supported values are `low`, `medium`, and `high`. The default is9614 `medium`.96159616 - `"low"`96179618 - `"medium"`96199620 - `"high"`96219622 - `top_logprobs: optional number or null`96239624 An integer between 0 and 20 specifying the maximum number of most likely9625 tokens to return at each token position, each with an associated log9626 probability. In some cases, the number of returned tokens may be fewer than9627 requested.96289629 - `truncation: optional "auto" or "disabled" or null`96309631 The truncation strategy to use for the model response.96329633 - `auto`: If the input to this Response exceeds9634 the model's context window size, the model will truncate the9635 response to fit the context window by dropping items from the beginning of the conversation.9636 - `disabled` (default): If the input size will exceed the context window9637 size for a model, the request will fail with a 400 error.96389639 - `"auto"`96409641 - `"disabled"`96429643 - `usage: optional ResponseUsage`96449645 Represents token usage details including input tokens, output tokens,9646 a breakdown of output tokens, and the total tokens used.96479648 - `input_tokens: number`96499650 The number of input tokens.96519652 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`96539654 A detailed breakdown of the input tokens.96559656 - `cache_write_tokens: number`96579658 The number of input tokens that were written to the cache.96599660 - `cached_tokens: number`96619662 The number of tokens that were retrieved from the cache.9663 [More on prompt caching](/api/docs/guides/prompt-caching).96649665 - `output_tokens: number`96669667 The number of output tokens.96689669 - `output_tokens_details: object { reasoning_tokens }`96709671 A detailed breakdown of the output tokens.96729673 - `reasoning_tokens: number`96749675 The number of reasoning tokens.96769677 - `total_tokens: number`96789679 The total number of tokens used.96809681 - `user: optional string`96829683 This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.9684 A stable identifier for your end-users.9685 Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).96869687### Example96889689```http9690curl https://api.openai.com/v1/responses/$RESPONSE_ID \9691 -H "Authorization: Bearer $OPENAI_API_KEY"9692```96939694#### Response96959696```json9697{9698 "id": "id",9699 "created_at": 0,9700 "error": {9701 "code": "server_error",9702 "message": "message",9703 "misalignment": {9704 "detailed_explanation": "detailed_explanation",9705 "error_type": "potentially_unintended_data_transfer",9706 "steer": {9707 "message": "message"9708 }9709 }9710 },9711 "incomplete_details": {9712 "reason": "max_output_tokens"9713 },9714 "instructions": "string",9715 "metadata": {9716 "foo": "string"9717 },9718 "model": "gpt-6-astra",9719 "object": "response",9720 "output": [9721 {9722 "id": "id",9723 "content": [9724 {9725 "annotations": [9726 {9727 "file_id": "file_id",9728 "filename": "filename",9729 "index": 0,9730 "type": "file_citation"9731 }9732 ],9733 "logprobs": [9734 {9735 "token": "token",9736 "bytes": [9737 09738 ],9739 "logprob": 0,9740 "top_logprobs": [9741 {9742 "token": "token",9743 "bytes": [9744 09745 ],9746 "logprob": 09747 }9748 ]9749 }9750 ],9751 "text": "text",9752 "type": "output_text"9753 }9754 ],9755 "role": "assistant",9756 "status": "in_progress",9757 "type": "message",9758 "phase": "commentary"9759 }9760 ],9761 "parallel_tool_calls": true,9762 "temperature": 1,9763 "tool_choice": "none",9764 "tools": [9765 {9766 "name": "name",9767 "parameters": {9768 "foo": "bar"9769 },9770 "strict": true,9771 "type": "function",9772 "allowed_callers": [9773 "direct"9774 ],9775 "async": true,9776 "defer_loading": true,9777 "description": "description",9778 "output_schema": {9779 "foo": "bar"9780 }9781 }9782 ],9783 "top_p": 1,9784 "background": true,9785 "completed_at": 0,9786 "conversation": {9787 "id": "id"9788 },9789 "max_output_tokens": 0,9790 "max_tool_calls": 0,9791 "moderation": {9792 "input": {9793 "categories": {9794 "foo": true9795 },9796 "category_applied_input_types": {9797 "foo": [9798 "text"9799 ]9800 },9801 "category_scores": {9802 "foo": 09803 },9804 "flagged": true,9805 "model": "model",9806 "type": "moderation_result"9807 },9808 "output": {9809 "categories": {9810 "foo": true9811 },9812 "category_applied_input_types": {9813 "foo": [9814 "text"9815 ]9816 },9817 "category_scores": {9818 "foo": 09819 },9820 "flagged": true,9821 "model": "model",9822 "type": "moderation_result"9823 }9824 },9825 "output_text": "output_text",9826 "previous_response_id": "previous_response_id",9827 "prompt": {9828 "id": "id",9829 "variables": {9830 "foo": "string"9831 },9832 "version": "version"9833 },9834 "prompt_cache_diagnostics": {9835 "cache_missed_tokens": 0,9836 "reason": "model_changed",9837 "type": "cache_miss",9838 "comparison_reusable_tokens": 09839 },9840 "prompt_cache_key": "prompt-cache-key-1234",9841 "prompt_cache_options": {9842 "mode": "implicit",9843 "ttl": "30m",9844 "comparison_response_id": "comparison_response_id"9845 },9846 "prompt_cache_retention": "in_memory",9847 "reasoning": {9848 "context": "auto",9849 "effort": "none",9850 "generate_summary": "auto",9851 "mode": "standard",9852 "summary": "auto"9853 },9854 "safety_identifier": "safety-identifier-1234",9855 "service_tier": "auto",9856 "status": "completed",9857 "text": {9858 "format": {9859 "type": "text"9860 },9861 "verbosity": "low"9862 },9863 "top_logprobs": 0,9864 "truncation": "auto",9865 "usage": {9866 "input_tokens": 0,9867 "input_tokens_details": {9868 "cache_write_tokens": 0,9869 "cached_tokens": 09870 },9871 "output_tokens": 0,9872 "output_tokens_details": {9873 "reasoning_tokens": 09874 },9875 "total_tokens": 09876 },9877 "user": "user-1234"9878}9879```98809881### Example98829883```http9884curl https://api.openai.com/v1/responses/resp_123 \9885 -H "Content-Type: application/json" \9886 -H "Authorization: Bearer $OPENAI_API_KEY"9887```98889889#### Response98909891```json9892{9893 "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44",9894 "object": "response",9895 "created_at": 1741386163,9896 "status": "completed",9897 "completed_at": 1741386164,9898 "error": null,9899 "incomplete_details": null,9900 "instructions": null,9901 "max_output_tokens": null,9902 "model": "gpt-6-astra",9903 "output": [9904 {9905 "type": "message",9906 "id": "msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44",9907 "status": "completed",9908 "role": "assistant",9909 "content": [9910 {9911 "type": "output_text",9912 "text": "Silent circuits hum, \nThoughts emerge in data streams— \nDigital dawn breaks.",9913 "annotations": []9914 }9915 ]9916 }9917 ],9918 "parallel_tool_calls": true,9919 "previous_response_id": null,9920 "reasoning": {9921 "effort": null,9922 "summary": null9923 },9924 "store": true,9925 "temperature": 1.0,9926 "text": {9927 "format": {9928 "type": "text"9929 }9930 },9931 "tool_choice": "auto",9932 "tools": [],9933 "top_p": 1.0,9934 "truncation": "disabled",9935 "usage": {9936 "input_tokens": 32,9937 "input_tokens_details": {9938 "cached_tokens": 0,9939 "cache_write_tokens": 09940 },9941 "output_tokens": 18,9942 "output_tokens_details": {9943 "reasoning_tokens": 09944 },9945 "total_tokens": 509946 },9947 "user": null,9948 "metadata": {}9949}9950```9951