SPB Git

Repository Public

cancel.md 289.3 KB 9,898 lines markdown

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## Cancel a response45**post** `/responses/{response_id}/cancel`67Cancels a model response with the given ID. Only responses created with8the `background` parameter set to `true` can be cancelled.9[Learn more](/api/docs/guides/background).1011### Path Parameters1213- `response_id: string`1415### Returns1617- `Response object { id, created_at, error, 33 more }`1819  - `id: string`2021    Unique identifier for this Response.2223  - `created_at: number`2425    Unix timestamp (in seconds) of when this Response was created.2627  - `error: ResponseError or null`2829    An error object returned when the model fails to generate a Response.3031    - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 18 more`3233      The error code for the response.3435      - `"server_error"`3637      - `"rate_limit_exceeded"`3839      - `"invalid_prompt"`4041      - `"data_residency_mismatch"`4243      - `"bio_policy"`4445      - `"misalignment_policy_violation"`4647      - `"vector_store_timeout"`4849      - `"invalid_image"`5051      - `"invalid_image_format"`5253      - `"invalid_base64_image"`5455      - `"invalid_image_url"`5657      - `"image_too_large"`5859      - `"image_too_small"`6061      - `"image_parse_error"`6263      - `"image_content_policy_violation"`6465      - `"invalid_image_mode"`6667      - `"image_file_too_large"`6869      - `"unsupported_image_media_type"`7071      - `"empty_image_file"`7273      - `"failed_to_download_image"`7475      - `"image_file_not_found"`7677    - `message: string`7879      A human-readable description of the error.8081    - `misalignment: optional object { detailed_explanation, error_type, steer }`8283      - `detailed_explanation: optional string`8485        The public explanation for this block.8687      - `error_type: optional string or "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`8889        An optional classification; clients must accept additional values.9091        - `string`9293        - `SafetyAlertErrorType = "potentially_unintended_data_transfer" or "potentially_unintended_data_access" or "potentially_unintended_destructive_activity" or "other"`9495          An optional classification; clients must accept additional values.9697          - `"potentially_unintended_data_transfer"`9899          - `"potentially_unintended_data_access"`100101          - `"potentially_unintended_destructive_activity"`102103          - `"other"`104105      - `steer: optional object { message }`106107        An optional public continuation instruction.108109        - `message: string`110111          The public continuation instruction.112113  - `incomplete_details: object { reason }  or null`114115    Details about why the response is incomplete.116117    - `reason: optional "max_output_tokens" or "max_messages" or "content_filter" or "steered"`118119      The reason why the response is incomplete. `steered` means120      the response stopped at a safe output boundary after a121      WebSocket `response.steer` event. The server can then create122      a successor response automatically with the queued input.123124      - `"max_output_tokens"`125126      - `"max_messages"`127128      - `"content_filter"`129130      - `"steered"`131132  - `instructions: string or array of EasyInputMessage or object { content, role, status, type }  or ResponseOutputMessage or 30 more or null`133134    A system (or developer) message inserted into the model's context.135136    When using along with `previous_response_id`, the instructions from a previous137    response will not be carried over to the next response. This makes it simple138    to swap out system (or developer) messages in new responses.139140    - `string`141142      A text input to the model, equivalent to a text input with the143      `developer` role.144145    - `InputItemList = array of EasyInputMessage or object { content, role, status, type }  or ResponseOutputMessage or 30 more`146147      A list of one or many input items to the model, containing148      different content types.149150      - `EasyInputMessage object { content, role, phase, type }`151152        A message input to the model with a role indicating instruction following153        hierarchy. Instructions given with the `developer` or `system` role take154        precedence over instructions given with the `user` role. Messages with the155        `assistant` role are presumed to have been generated by the model in previous156        interactions.157158        - `content: string or ResponseInputMessageContentList`159160          Text, image, or audio input to the model, used to generate a response.161          Can also contain previous assistant responses.162163          - `TextInput = string`164165            A text input to the model.166167          - `ResponseInputMessageContentList = array of ResponseInputContent`168169            A list of one or many input items to the model, containing different content170            types.171172            - `ResponseInputText object { text, type, prompt_cache_breakpoint }`173174              A text input to the model.175176              - `text: string`177178                The text input to the model.179180              - `type: "input_text"`181182                The type of the input item. Always `input_text`.183184                - `"input_text"`185186              - `prompt_cache_breakpoint: optional object { mode }`187188                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.189190                - `mode: "explicit"`191192                  The breakpoint mode. Always `explicit`.193194                  - `"explicit"`195196            - `ResponseInputImage object { detail, type, file_id, 2 more }`197198              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).199200              - `detail: ImageDetail`201202                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.203204                - `"low"`205206                - `"high"`207208                - `"auto"`209210                - `"original"`211212              - `type: "input_image"`213214                The type of the input item. Always `input_image`.215216                - `"input_image"`217218              - `file_id: optional string or null`219220                The ID of the file to be sent to the model.221222              - `image_url: optional string or null`223224                The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.225226              - `prompt_cache_breakpoint: optional object { mode }`227228                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.229230                - `mode: "explicit"`231232                  The breakpoint mode. Always `explicit`.233234                  - `"explicit"`235236            - `ResponseInputFile object { type, detail, file_data, 4 more }`237238              A file input to the model.239240              - `type: "input_file"`241242                The type of the input item. Always `input_file`.243244                - `"input_file"`245246              - `detail: optional "auto" or "low" or "high"`247248                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`.249250                - `"auto"`251252                - `"low"`253254                - `"high"`255256              - `file_data: optional string`257258                The content of the file to be sent to the model.259260              - `file_id: optional string or null`261262                The ID of the file to be sent to the model.263264              - `file_url: optional string`265266                The URL of the file to be sent to the model.267268              - `filename: optional string`269270                The name of the file to be sent to the model.271272              - `prompt_cache_breakpoint: optional object { mode }`273274                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.275276                - `mode: "explicit"`277278                  The breakpoint mode. Always `explicit`.279280                  - `"explicit"`281282        - `role: "user" or "assistant" or "system" or "developer"`283284          The role of the message input. One of `user`, `assistant`, `system`, or285          `developer`.286287          - `"user"`288289          - `"assistant"`290291          - `"system"`292293          - `"developer"`294295        - `phase: optional "commentary" or "final_answer" or null`296297          Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).298          For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend299          phase on all assistant messages — dropping it can degrade performance. Not used for user messages.300301          - `"commentary"`302303          - `"final_answer"`304305        - `type: optional "message"`306307          The type of the message input. Always `message`.308309          - `"message"`310311      - `Message object { content, role, status, type }`312313        A message input to the model with a role indicating instruction following314        hierarchy. Instructions given with the `developer` or `system` role take315        precedence over instructions given with the `user` role.316317        - `content: ResponseInputMessageContentList`318319          A list of one or many input items to the model, containing different content320          types.321322        - `role: "user" or "system" or "developer"`323324          The role of the message input. One of `user`, `system`, or `developer`.325326          - `"user"`327328          - `"system"`329330          - `"developer"`331332        - `status: optional "in_progress" or "completed" or "incomplete"`333334          The status of item. One of `in_progress`, `completed`, or335          `incomplete`. Populated when items are returned via API.336337          - `"in_progress"`338339          - `"completed"`340341          - `"incomplete"`342343        - `type: optional "message"`344345          The type of the message input. Always set to `message`.346347          - `"message"`348349      - `ResponseOutputMessage object { id, content, role, 3 more }`350351        An output message from the model.352353        - `id: string`354355          The unique ID of the output message.356357        - `content: array of ResponseOutputText or ResponseOutputRefusal`358359          The content of the output message.360361          - `ResponseOutputText object { annotations, logprobs, text, type }`362363            A text output from the model.364365            - `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 }`366367              The annotations of the text output.368369              - `FileCitation object { file_id, filename, index, type }`370371                A citation to a file.372373                - `file_id: string`374375                  The ID of the file.376377                - `filename: string`378379                  The filename of the file cited.380381                - `index: number`382383                  The index of the file in the list of files.384385                - `type: "file_citation"`386387                  The type of the file citation. Always `file_citation`.388389                  - `"file_citation"`390391              - `URLCitation object { end_index, start_index, title, 2 more }`392393                A citation for a web resource used to generate a model response.394395                - `end_index: number`396397                  The index of the last character of the URL citation in the message.398399                - `start_index: number`400401                  The index of the first character of the URL citation in the message.402403                - `title: string`404405                  The title of the web resource.406407                - `type: "url_citation"`408409                  The type of the URL citation. Always `url_citation`.410411                  - `"url_citation"`412413                - `url: string`414415                  The URL of the web resource.416417              - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`418419                A citation for a container file used to generate a model response.420421                - `container_id: string`422423                  The ID of the container file.424425                - `end_index: number`426427                  The index of the last character of the container file citation in the message.428429                - `file_id: string`430431                  The ID of the file.432433                - `filename: string`434435                  The filename of the container file cited.436437                - `start_index: number`438439                  The index of the first character of the container file citation in the message.440441                - `type: "container_file_citation"`442443                  The type of the container file citation. Always `container_file_citation`.444445                  - `"container_file_citation"`446447              - `FilePath object { file_id, index, type }`448449                A path to a file.450451                - `file_id: string`452453                  The ID of the file.454455                - `index: number`456457                  The index of the file in the list of files.458459                - `type: "file_path"`460461                  The type of the file path. Always `file_path`.462463                  - `"file_path"`464465            - `logprobs: array of object { token, bytes, logprob, top_logprobs }`466467              - `token: string`468469              - `bytes: array of number`470471              - `logprob: number`472473              - `top_logprobs: array of object { token, bytes, logprob }`474475                - `token: string`476477                - `bytes: array of number`478479                - `logprob: number`480481            - `text: string`482483              The text output from the model.484485            - `type: "output_text"`486487              The type of the output text. Always `output_text`.488489              - `"output_text"`490491          - `ResponseOutputRefusal object { refusal, type }`492493            A refusal from the model.494495            - `refusal: string`496497              The refusal explanation from the model.498499            - `type: "refusal"`500501              The type of the refusal. Always `refusal`.502503              - `"refusal"`504505        - `role: "assistant"`506507          The role of the output message. Always `assistant`.508509          - `"assistant"`510511        - `status: "in_progress" or "completed" or "incomplete"`512513          The status of the message input. One of `in_progress`, `completed`, or514          `incomplete`. Populated when input items are returned via API.515516          - `"in_progress"`517518          - `"completed"`519520          - `"incomplete"`521522        - `type: "message"`523524          The type of the output message. Always `message`.525526          - `"message"`527528        - `phase: optional "commentary" or "final_answer" or null`529530          Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).531          For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend532          phase on all assistant messages — dropping it can degrade performance. Not used for user messages.533534          - `"commentary"`535536          - `"final_answer"`537538      - `FileSearchCall object { id, queries, status, 2 more }`539540        The results of a file search tool call. See the541        [file search guide](/api/docs/guides/tools-file-search) for more information.542543        - `id: string`544545          The unique ID of the file search tool call.546547        - `queries: array of string`548549          The queries used to search for files.550551        - `status: "in_progress" or "searching" or "completed" or 2 more`552553          The status of the file search tool call. One of `in_progress`,554          `searching`, `incomplete` or `failed`,555556          - `"in_progress"`557558          - `"searching"`559560          - `"completed"`561562          - `"incomplete"`563564          - `"failed"`565566        - `type: "file_search_call"`567568          The type of the file search tool call. Always `file_search_call`.569570          - `"file_search_call"`571572        - `results: optional array of object { attributes, file_id, filename, 2 more }  or null`573574          The results of the file search tool call.575576          - `attributes: optional map[string or number or boolean] or null`577578            Set of 16 key-value pairs that can be attached to an object. This can be579            useful for storing additional information about the object in a structured580            format, and querying for objects via API or the dashboard. Keys are strings581            with a maximum length of 64 characters. Values are strings with a maximum582            length of 512 characters, booleans, or numbers.583584            - `string`585586            - `number`587588            - `boolean`589590          - `file_id: optional string`591592            The unique ID of the file.593594          - `filename: optional string`595596            The name of the file.597598          - `score: optional number`599600            The relevance score of the file - a value between 0 and 1.601602          - `text: optional string`603604            The text that was retrieved from the file.605606      - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`607608        A tool call to a computer use tool. See the609        [computer use guide](/api/docs/guides/tools-computer-use) for more information.610611        - `id: string`612613          The unique ID of the computer call.614615        - `call_id: string`616617          An identifier used when responding to the tool call with output.618619        - `pending_safety_checks: array of object { id, code, message }`620621          The pending safety checks for the computer call.622623          - `id: string`624625            The ID of the pending safety check.626627          - `code: optional string or null`628629            The type of the pending safety check.630631          - `message: optional string or null`632633            Details about the pending safety check.634635        - `status: "in_progress" or "completed" or "incomplete"`636637          The status of the item. One of `in_progress`, `completed`, or638          `incomplete`. Populated when items are returned via API.639640          - `"in_progress"`641642          - `"completed"`643644          - `"incomplete"`645646        - `type: "computer_call"`647648          The type of the computer call. Always `computer_call`.649650          - `"computer_call"`651652        - `action: optional ComputerAction`653654          A click action.655656          - `Click object { button, type, x, 2 more }`657658            A click action.659660            - `button: "left" or "right" or "wheel" or 2 more`661662              Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.663664              - `"left"`665666              - `"right"`667668              - `"wheel"`669670              - `"back"`671672              - `"forward"`673674            - `type: "click"`675676              Specifies the event type. For a click action, this property is always `click`.677678              - `"click"`679680            - `x: number`681682              The x-coordinate where the click occurred.683684            - `y: number`685686              The y-coordinate where the click occurred.687688            - `keys: optional array of string or null`689690              The keys being held while clicking.691692          - `DoubleClick object { keys, type, x, y }`693694            A double click action.695696            - `keys: array of string or null`697698              The keys being held while double-clicking.699700            - `type: "double_click"`701702              Specifies the event type. For a double click action, this property is always set to `double_click`.703704              - `"double_click"`705706            - `x: number`707708              The x-coordinate where the double click occurred.709710            - `y: number`711712              The y-coordinate where the double click occurred.713714          - `Drag object { path, type, keys }`715716            A drag action.717718            - `path: array of object { x, y }`719720              An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg721722              ```723              [724                { x: 100, y: 200 },725                { x: 200, y: 300 }726              ]727              ```728729              - `x: number`730731                The x-coordinate.732733              - `y: number`734735                The y-coordinate.736737            - `type: "drag"`738739              Specifies the event type. For a drag action, this property is always set to `drag`.740741              - `"drag"`742743            - `keys: optional array of string or null`744745              The keys being held while dragging the mouse.746747          - `Keypress object { keys, type }`748749            A collection of keypresses the model would like to perform.750751            - `keys: array of string`752753              The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.754755            - `type: "keypress"`756757              Specifies the event type. For a keypress action, this property is always set to `keypress`.758759              - `"keypress"`760761          - `Move object { type, x, y, keys }`762763            A mouse move action.764765            - `type: "move"`766767              Specifies the event type. For a move action, this property is always set to `move`.768769              - `"move"`770771            - `x: number`772773              The x-coordinate to move to.774775            - `y: number`776777              The y-coordinate to move to.778779            - `keys: optional array of string or null`780781              The keys being held while moving the mouse.782783          - `Screenshot object { type }`784785            A screenshot action.786787            - `type: "screenshot"`788789              Specifies the event type. For a screenshot action, this property is always set to `screenshot`.790791              - `"screenshot"`792793          - `Scroll object { scroll_x, scroll_y, type, 3 more }`794795            A scroll action.796797            - `scroll_x: number`798799              The horizontal scroll distance.800801            - `scroll_y: number`802803              The vertical scroll distance.804805            - `type: "scroll"`806807              Specifies the event type. For a scroll action, this property is always set to `scroll`.808809              - `"scroll"`810811            - `x: number`812813              The x-coordinate where the scroll occurred.814815            - `y: number`816817              The y-coordinate where the scroll occurred.818819            - `keys: optional array of string or null`820821              The keys being held while scrolling.822823          - `Type object { text, type }`824825            An action to type in text.826827            - `text: string`828829              The text to type.830831            - `type: "type"`832833              Specifies the event type. For a type action, this property is always set to `type`.834835              - `"type"`836837          - `Wait object { type }`838839            A wait action.840841            - `type: "wait"`842843              Specifies the event type. For a wait action, this property is always set to `wait`.844845              - `"wait"`846847        - `actions: optional ComputerActionList`848849          Flattened batched actions for `computer_use`. Each action includes an850          `type` discriminator and action-specific fields.851852          - `Click object { button, type, x, 2 more }`853854            A click action.855856          - `DoubleClick object { keys, type, x, y }`857858            A double click action.859860          - `Drag object { path, type, keys }`861862            A drag action.863864          - `Keypress object { keys, type }`865866            A collection of keypresses the model would like to perform.867868          - `Move object { type, x, y, keys }`869870            A mouse move action.871872          - `Screenshot object { type }`873874            A screenshot action.875876          - `Scroll object { scroll_x, scroll_y, type, 3 more }`877878            A scroll action.879880          - `Type object { text, type }`881882            An action to type in text.883884          - `Wait object { type }`885886            A wait action.887888      - `ComputerCallOutput object { call_id, output, type, 3 more }`889890        The output of a computer tool call.891892        - `call_id: string`893894          The ID of the computer tool call that produced the output.895896        - `output: ResponseComputerToolCallOutputScreenshot`897898          A computer screenshot image used with the computer use tool.899900          - `type: "computer_screenshot"`901902            Specifies the event type. For a computer screenshot, this property is903            always set to `computer_screenshot`.904905            - `"computer_screenshot"`906907          - `file_id: optional string`908909            The identifier of an uploaded file that contains the screenshot.910911          - `image_url: optional string`912913            The URL of the screenshot image.914915        - `type: "computer_call_output"`916917          The type of the computer tool call output. Always `computer_call_output`.918919          - `"computer_call_output"`920921        - `id: optional string or null`922923          The ID of the computer tool call output.924925        - `acknowledged_safety_checks: optional array of object { id, code, message }  or null`926927          The safety checks reported by the API that have been acknowledged by the developer.928929          - `id: string`930931            The ID of the pending safety check.932933          - `code: optional string or null`934935            The type of the pending safety check.936937          - `message: optional string or null`938939            Details about the pending safety check.940941        - `status: optional "in_progress" or "completed" or "incomplete" or null`942943          The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.944945          - `"in_progress"`946947          - `"completed"`948949          - `"incomplete"`950951      - `WebSearchCall object { id, action, status, type }`952953        The results of a web search tool call. See the954        [web search guide](/api/docs/guides/tools-web-search) for more information.955956        - `id: string`957958          The unique ID of the web search tool call.959960        - `action: object { type, queries, query, sources }  or object { type, url }  or object { pattern, type, url }`961962          An object describing the specific action taken in this web search call.963          Includes details on how the model used the web (search, open_page, find_in_page).964965          - `Search object { type, queries, query, sources }`966967            Action type "search" - Performs a web search query.968969            - `type: "search"`970971              The action type.972973              - `"search"`974975            - `queries: optional array of string`976977              The search queries.978979            - `query: optional string`980981              The search query.982983            - `sources: optional array of object { type, url }`984985              The sources used in the search.986987              - `type: "url"`988989                The type of source. Always `url`.990991                - `"url"`992993              - `url: string`994995                The URL of the source.996997          - `OpenPage object { type, url }`998999            Action type "open_page" - Opens a specific URL from search results.10001001            - `type: "open_page"`10021003              The action type.10041005              - `"open_page"`10061007            - `url: optional string or null`10081009              The URL opened by the model.10101011          - `FindInPage object { pattern, type, url }`10121013            Action type "find_in_page": Searches for a pattern within a loaded page.10141015            - `pattern: string`10161017              The pattern or text to search for within the page.10181019            - `type: "find_in_page"`10201021              The action type.10221023              - `"find_in_page"`10241025            - `url: string`10261027              The URL of the page searched for the pattern.10281029        - `status: "in_progress" or "searching" or "completed" or 2 more`10301031          The status of the web search tool call.10321033          - `"in_progress"`10341035          - `"searching"`10361037          - `"completed"`10381039          - `"failed"`10401041          - `"incomplete"`10421043        - `type: "web_search_call"`10441045          The type of the web search tool call. Always `web_search_call`.10461047          - `"web_search_call"`10481049      - `FunctionCall object { arguments, call_id, name, 6 more }`10501051        A tool call to run a function. See the1052        [function calling guide](/api/docs/guides/function-calling) for more information.10531054        - `arguments: string`10551056          A JSON string of the arguments to pass to the function.10571058        - `call_id: string`10591060          The unique ID of the function tool call generated by the model.10611062        - `name: string`10631064          The name of the function to run.10651066        - `type: "function_call"`10671068          The type of the function tool call. Always `function_call`.10691070          - `"function_call"`10711072        - `id: optional string`10731074          The unique ID of the function tool call.10751076        - `async: optional boolean`10771078          Whether the function tool call runs asynchronously.10791080        - `caller: optional object { type }  or object { caller_id, type }  or null`10811082          The execution context that produced this tool call.10831084          - `Direct object { type }`10851086            - `type: "direct"`10871088              - `"direct"`10891090          - `Program object { caller_id, type }`10911092            - `caller_id: string`10931094              The call ID of the program item that produced this tool call.10951096            - `type: "program"`10971098              - `"program"`10991100        - `namespace: optional string`11011102          The namespace of the function to run.11031104        - `status: optional "in_progress" or "completed" or "incomplete"`11051106          The status of the item. One of `in_progress`, `completed`, or1107          `incomplete`. Populated when items are returned via API.11081109          - `"in_progress"`11101111          - `"completed"`11121113          - `"incomplete"`11141115      - `FunctionCallOutput object { output, type, id, 5 more }`11161117        The output of a function tool call.11181119        - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`11201121          Text, image, or file output of the function tool call.11221123          - `string`11241125            A JSON string of the output of the function tool call.11261127          - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`11281129            An array of content outputs (text, image, file) for the function tool call.11301131            - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`11321133              A text input to the model.11341135              - `text: string`11361137                The text input to the model.11381139              - `type: "input_text"`11401141                The type of the input item. Always `input_text`.11421143                - `"input_text"`11441145              - `prompt_cache_breakpoint: optional object { mode }  or null`11461147                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.11481149                - `mode: "explicit"`11501151                  The breakpoint mode. Always `explicit`.11521153                  - `"explicit"`11541155            - `ResponseInputImageContent object { type, detail, file_id, 2 more }`11561157              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)11581159              - `type: "input_image"`11601161                The type of the input item. Always `input_image`.11621163                - `"input_image"`11641165              - `detail: optional ImageDetail or null`11661167                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.11681169              - `file_id: optional string or null`11701171                The ID of the file to be sent to the model.11721173              - `image_url: optional string or null`11741175                The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.11761177              - `prompt_cache_breakpoint: optional object { mode }  or null`11781179                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.11801181                - `mode: "explicit"`11821183                  The breakpoint mode. Always `explicit`.11841185                  - `"explicit"`11861187            - `ResponseInputFileContent object { type, detail, file_data, 4 more }`11881189              A file input to the model.11901191              - `type: "input_file"`11921193                The type of the input item. Always `input_file`.11941195                - `"input_file"`11961197              - `detail: optional "auto" or "low" or "high"`11981199                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`.12001201                - `"auto"`12021203                - `"low"`12041205                - `"high"`12061207              - `file_data: optional string or null`12081209                The base64-encoded data of the file to be sent to the model.12101211              - `file_id: optional string or null`12121213                The ID of the file to be sent to the model.12141215              - `file_url: optional string or null`12161217                The URL of the file to be sent to the model.12181219              - `filename: optional string or null`12201221                The name of the file to be sent to the model.12221223              - `prompt_cache_breakpoint: optional object { mode }  or null`12241225                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.12261227                - `mode: "explicit"`12281229                  The breakpoint mode. Always `explicit`.12301231                  - `"explicit"`12321233        - `type: "function_call_output"`12341235          The type of the function tool call output. Always `function_call_output`.12361237          - `"function_call_output"`12381239        - `id: optional string or null`12401241          The unique ID of the function tool call output. Populated when this item is returned via API.12421243        - `call_id: optional string or null`12441245          The unique ID of the function tool call generated by the model.12461247        - `caller: optional object { type }  or object { caller_id, type }  or null`12481249          The execution context that produced this tool call.12501251          - `Direct object { type }`12521253            - `type: "direct"`12541255              The caller type. Always `direct`.12561257              - `"direct"`12581259          - `Program object { caller_id, type }`12601261            - `caller_id: string`12621263              The call ID of the program item that produced this tool call.12641265            - `type: "program"`12661267              The caller type. Always `program`.12681269              - `"program"`12701271        - `name: optional string or null`12721273          The name of the tool that produced the output.12741275        - `namespace: optional string or null`12761277          The namespace of the tool that produced the output.12781279        - `status: optional "in_progress" or "completed" or "incomplete" or null`12801281          The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.12821283          - `"in_progress"`12841285          - `"completed"`12861287          - `"incomplete"`12881289      - `ToolSearchCall object { arguments, type, id, 3 more }`12901291        - `arguments: unknown`12921293          The arguments supplied to the tool search call.12941295        - `type: "tool_search_call"`12961297          The item type. Always `tool_search_call`.12981299          - `"tool_search_call"`13001301        - `id: optional string or null`13021303          The unique ID of this tool search call.13041305        - `call_id: optional string or null`13061307          The unique ID of the tool search call generated by the model.13081309        - `execution: optional "server" or "client"`13101311          Whether tool search was executed by the server or by the client.13121313          - `"server"`13141315          - `"client"`13161317        - `status: optional "in_progress" or "completed" or "incomplete" or null`13181319          The status of the tool search call.13201321          - `"in_progress"`13221323          - `"completed"`13241325          - `"incomplete"`13261327      - `ToolSearchOutput object { tools, type, id, 3 more }`13281329        - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`13301331          The loaded tool definitions returned by the tool search output.13321333          - `Function object { name, parameters, strict, 6 more }`13341335            Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).13361337            - `name: string`13381339              The name of the function to call.13401341            - `parameters: map[unknown] or null`13421343              A JSON schema object describing the parameters of the function.13441345            - `strict: boolean or null`13461347              Whether strict parameter validation is enforced for this function tool.13481349            - `type: "function"`13501351              The type of the function tool. Always `function`.13521353              - `"function"`13541355            - `allowed_callers: optional array of "direct" or "programmatic" or null`13561357              The tool invocation context(s).13581359              - `"direct"`13601361              - `"programmatic"`13621363            - `async: optional boolean`13641365            - `defer_loading: optional boolean`13661367              Whether this function is deferred and loaded via tool search.13681369            - `description: optional string or null`13701371              A description of the function. Used by the model to determine whether or not to call the function.13721373            - `output_schema: optional map[unknown] or null`13741375              A JSON schema object describing the JSON value encoded in string outputs for this function.13761377          - `FileSearch object { type, vector_store_ids, filters, 2 more }`13781379            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).13801381            - `type: "file_search"`13821383              The type of the file search tool. Always `file_search`.13841385              - `"file_search"`13861387            - `vector_store_ids: array of string`13881389              The IDs of the vector stores to search.13901391            - `filters: optional ComparisonFilter or CompoundFilter or null`13921393              A filter to apply.13941395              - `ComparisonFilter object { key, type, value }`13961397                A filter used to compare a specified attribute key to a given value using a defined comparison operation.13981399                - `key: string`14001401                  The key to compare against the value.14021403                - `type: "eq" or "ne" or "gt" or 5 more`14041405                  Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.14061407                  - `eq`: equals1408                  - `ne`: not equal1409                  - `gt`: greater than1410                  - `gte`: greater than or equal1411                  - `lt`: less than1412                  - `lte`: less than or equal1413                  - `in`: in1414                  - `nin`: not in14151416                  - `"eq"`14171418                  - `"ne"`14191420                  - `"gt"`14211422                  - `"gte"`14231424                  - `"lt"`14251426                  - `"lte"`14271428                  - `"in"`14291430                  - `"nin"`14311432                - `value: string or number or boolean or array of string or number`14331434                  The value to compare against the attribute key; supports string, number, or boolean types.14351436                  - `string`14371438                  - `number`14391440                  - `boolean`14411442                  - `array of string or number`14431444                    - `string`14451446                    - `number`14471448              - `CompoundFilter object { filters, type }`14491450                Combine multiple filters using `and` or `or`.14511452                - `filters: array of ComparisonFilter or unknown`14531454                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.14551456                  - `ComparisonFilter object { key, type, value }`14571458                    A filter used to compare a specified attribute key to a given value using a defined comparison operation.14591460                  - `unknown`14611462                - `type: "and" or "or"`14631464                  Type of operation: `and` or `or`.14651466                  - `"and"`14671468                  - `"or"`14691470            - `max_num_results: optional number`14711472              The maximum number of results to return. This number should be between 1 and 50 inclusive.14731474            - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`14751476              Ranking options for search.14771478              - `hybrid_search: optional object { embedding_weight, text_weight }`14791480                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.14811482                - `embedding_weight: number`14831484                  The weight of the embedding in the reciprocal ranking fusion.14851486                - `text_weight: number`14871488                  The weight of the text in the reciprocal ranking fusion.14891490              - `ranker: optional "auto" or "default-2024-11-15"`14911492                The ranker to use for the file search.14931494                - `"auto"`14951496                - `"default-2024-11-15"`14971498              - `score_threshold: optional number`14991500                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.15011502          - `Computer object { type }`15031504            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).15051506            - `type: "computer"`15071508              The type of the computer tool. Always `computer`.15091510              - `"computer"`15111512          - `ComputerUsePreview object { display_height, display_width, environment, type }`15131514            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).15151516            - `display_height: number`15171518              The height of the computer display.15191520            - `display_width: number`15211522              The width of the computer display.15231524            - `environment: "windows" or "mac" or "linux" or 2 more`15251526              The type of computer environment to control.15271528              - `"windows"`15291530              - `"mac"`15311532              - `"linux"`15331534              - `"ubuntu"`15351536              - `"browser"`15371538            - `type: "computer_use_preview"`15391540              The type of the computer use tool. Always `computer_use_preview`.15411542              - `"computer_use_preview"`15431544          - `WebSearch object { type, external_web_access, filters, 2 more }`15451546            Search the Internet for sources related to the prompt. Learn more about the1547            [web search tool](/api/docs/guides/tools-web-search).15481549            - `type: "web_search" or "web_search_2025_08_26"`15501551              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.15521553              - `"web_search"`15541555              - `"web_search_2025_08_26"`15561557            - `external_web_access: optional boolean`15581559              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.15601561            - `filters: optional object { allowed_domains }  or null`15621563              Filters for the search.15641565              - `allowed_domains: optional array of string or null`15661567                Allowed domains for the search. If not provided, all domains are allowed.1568                Subdomains of the provided domains are allowed as well.15691570                Example: `["pubmed.ncbi.nlm.nih.gov"]`15711572            - `search_context_size: optional "low" or "medium" or "high"`15731574              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.15751576              - `"low"`15771578              - `"medium"`15791580              - `"high"`15811582            - `user_location: optional object { city, country, region, 2 more }  or null`15831584              The approximate location of the user.15851586              - `city: optional string or null`15871588                Free text input for the city of the user, e.g. `San Francisco`.15891590              - `country: optional string or null`15911592                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.15931594              - `region: optional string or null`15951596                Free text input for the region of the user, e.g. `California`.15971598              - `timezone: optional string or null`15991600                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.16011602              - `type: optional "approximate"`16031604                The type of location approximation. Always `approximate`.16051606                - `"approximate"`16071608          - `Mcp object { server_label, type, allowed_callers, 9 more }`16091610            Give the model access to additional tools via remote Model Context Protocol1611            (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).16121613            - `server_label: string`16141615              A label for this MCP server, used to identify it in tool calls.16161617            - `type: "mcp"`16181619              The type of the MCP tool. Always `mcp`.16201621              - `"mcp"`16221623            - `allowed_callers: optional array of "direct" or "programmatic" or null`16241625              The tool invocation context(s).16261627              - `"direct"`16281629              - `"programmatic"`16301631            - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`16321633              List of allowed tool names or a filter object.16341635              - `McpAllowedTools = array of string`16361637                A string array of allowed tool names16381639              - `McpToolFilter object { read_only, tool_names }`16401641                A filter object to specify which tools are allowed.16421643                - `read_only: optional boolean`16441645                  Indicates whether or not a tool modifies data or is read-only. If an1646                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1647                  it will match this filter.16481649                - `tool_names: optional array of string`16501651                  List of allowed tool names.16521653            - `authorization: optional string`16541655              An OAuth access token that can be used with a remote MCP server, either1656              with a custom MCP server URL or a service connector. Your application1657              must handle the OAuth authorization flow and provide the token here.16581659            - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`16601661              Identifier for service connectors, like those available in ChatGPT. One of1662              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more1663              about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).16641665              This field is deprecated for models released after September 1, 2026.1666              Use `server_url` to connect to a remote MCP server, or `tunnel_id` to1667              connect through a Secure MCP Tunnel.16681669              Currently supported `connector_id` values are:16701671              - Dropbox: `connector_dropbox`1672              - Gmail: `connector_gmail`1673              - Google Calendar: `connector_googlecalendar`1674              - Google Drive: `connector_googledrive`1675              - Microsoft Teams: `connector_microsoftteams`1676              - Outlook Calendar: `connector_outlookcalendar`1677              - Outlook Email: `connector_outlookemail`1678              - SharePoint: `connector_sharepoint`16791680              - `"connector_dropbox"`16811682              - `"connector_gmail"`16831684              - `"connector_googlecalendar"`16851686              - `"connector_googledrive"`16871688              - `"connector_microsoftteams"`16891690              - `"connector_outlookcalendar"`16911692              - `"connector_outlookemail"`16931694              - `"connector_sharepoint"`16951696            - `defer_loading: optional boolean`16971698              Whether this MCP tool is deferred and discovered via tool search.16991700            - `headers: optional map[string] or null`17011702              Optional HTTP headers to send to the MCP server. Use for authentication1703              or other purposes.17041705            - `require_approval: optional object { always, never }  or "always" or "never" or null`17061707              Specify which of the MCP server's tools require approval.17081709              - `McpToolApprovalFilter object { always, never }`17101711                Specify which of the MCP server's tools require approval. Can be1712                `always`, `never`, or a filter object associated with tools1713                that require approval.17141715                - `always: optional object { read_only, tool_names }`17161717                  A filter object to specify which tools are allowed.17181719                  - `read_only: optional boolean`17201721                    Indicates whether or not a tool modifies data or is read-only. If an1722                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1723                    it will match this filter.17241725                  - `tool_names: optional array of string`17261727                    List of allowed tool names.17281729                - `never: optional object { read_only, tool_names }`17301731                  A filter object to specify which tools are allowed.17321733                  - `read_only: optional boolean`17341735                    Indicates whether or not a tool modifies data or is read-only. If an1736                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1737                    it will match this filter.17381739                  - `tool_names: optional array of string`17401741                    List of allowed tool names.17421743              - `McpToolApprovalSetting = "always" or "never"`17441745                Specify a single approval policy for all tools. One of `always` or1746                `never`. When set to `always`, all tools will require approval. When1747                set to `never`, all tools will not require approval.17481749                - `"always"`17501751                - `"never"`17521753            - `server_description: optional string`17541755              Optional description of the MCP server, used to provide more context.17561757            - `server_url: optional string`17581759              The URL for the MCP server. One of `server_url`, `connector_id`, or1760              `tunnel_id` must be provided.17611762            - `tunnel_id: optional string`17631764              The Secure MCP Tunnel ID to use instead of a direct server URL. One of1765              `server_url`, `connector_id`, or `tunnel_id` must be provided.17661767          - `CodeInterpreter object { container, type, allowed_callers }`17681769            A tool that runs Python code to help generate a response to a prompt.17701771            - `container: string or object { type, file_ids, memory_limit, network_policy }`17721773              The code interpreter container. Can be a container ID or an object that1774              specifies uploaded file IDs to make available to your code, along with an1775              optional `memory_limit` setting.17761777              - `string`17781779                The container ID.17801781              - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`17821783                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.17841785                - `type: "auto"`17861787                  Always `auto`.17881789                  - `"auto"`17901791                - `file_ids: optional array of string`17921793                  An optional list of uploaded files to make available to your code.17941795                - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`17961797                  The memory limit for the code interpreter container.17981799                  - `"1g"`18001801                  - `"4g"`18021803                  - `"16g"`18041805                  - `"64g"`18061807                - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`18081809                  Network access policy for the container.18101811                  - `ContainerNetworkPolicyDisabled object { type }`18121813                    - `type: "disabled"`18141815                      Disable outbound network access. Always `disabled`.18161817                      - `"disabled"`18181819                  - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`18201821                    - `allowed_domains: array of string`18221823                      A list of allowed domains when type is `allowlist`.18241825                    - `type: "allowlist"`18261827                      Allow outbound network access only to specified domains. Always `allowlist`.18281829                      - `"allowlist"`18301831                    - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`18321833                      Optional domain-scoped secrets for allowlisted domains.18341835                      - `domain: string`18361837                        The domain associated with the secret.18381839                      - `name: string`18401841                        The name of the secret to inject for the domain.18421843                      - `value: string`18441845                        The secret value to inject for the domain.18461847            - `type: "code_interpreter"`18481849              The type of the code interpreter tool. Always `code_interpreter`.18501851              - `"code_interpreter"`18521853            - `allowed_callers: optional array of "direct" or "programmatic" or null`18541855              The tool invocation context(s).18561857              - `"direct"`18581859              - `"programmatic"`18601861          - `ProgrammaticToolCalling object { type }`18621863            - `type: "programmatic_tool_calling"`18641865              The type of the tool. Always `programmatic_tool_calling`.18661867              - `"programmatic_tool_calling"`18681869          - `ImageGeneration object { type, action, background, 9 more }`18701871            A tool that generates images using the GPT image models.18721873            - `type: "image_generation"`18741875              The type of the image generation tool. Always `image_generation`.18761877              - `"image_generation"`18781879            - `action: optional "generate" or "edit" or "auto"`18801881              Whether to generate a new image or edit an existing image. Default: `auto`.18821883              - `"generate"`18841885              - `"edit"`18861887              - `"auto"`18881889            - `background: optional "transparent" or "opaque" or "auto"`18901891              Set the background of the generated image. One of `transparent`, `opaque`,1892              or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including1893              their `2026-09-08` snapshots, support `opaque` and `transparent`1894              backgrounds. Transparent backgrounds are available for supported GPT Image1895              models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in1896              preview. When using `transparent`, set the output format to `png` or `webp`.1897              Default: `auto`.18981899              - `"transparent"`19001901              - `"opaque"`19021903              - `"auto"`19041905            - `input_fidelity: optional "high" or "low" or null`19061907              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`.19081909              - `"high"`19101911              - `"low"`19121913            - `input_image_mask: optional object { file_id, image_url }`19141915              Optional mask for inpainting. Contains `image_url`1916              (string, optional) and `file_id` (string, optional).19171918              - `file_id: optional string`19191920                File ID for the mask image.19211922              - `image_url: optional string`19231924                Base64-encoded mask image.19251926            - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`19271928              The image generation model to use. One of `gpt-image-1`,1929              `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1930              `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1931              `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1932              `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1933              `gpt-image-1`.19341935              - `string`19361937              - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`19381939                The image generation model to use. One of `gpt-image-1`,1940                `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1941                `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1942                `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1943                `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1944                `gpt-image-1`.19451946                - `"gpt-image-1"`19471948                - `"gpt-image-1-mini"`19491950                - `"gpt-image-1.5"`19511952                - `"gpt-image-2"`19531954                - `"gpt-image-2-2026-04-21"`19551956                - `"gpt-image-2.5-sunburst"`19571958                - `"gpt-image-2.5-sunburst-2026-09-08"`19591960                - `"gpt-image-2.5-flare"`19611962                - `"gpt-image-2.5-flare-2026-09-08"`19631964            - `moderation: optional "auto" or "low"`19651966              Moderation level for the generated image. Default: `auto`.19671968              - `"auto"`19691970              - `"low"`19711972            - `output_compression: optional number`19731974              Compression level for the output image. Default: 100.19751976            - `output_format: optional "png" or "webp" or "jpeg"`19771978              The output format of the generated image. One of `png`, `webp`, or1979              `jpeg`. Default: `png`.19801981              - `"png"`19821983              - `"webp"`19841985              - `"jpeg"`19861987            - `partial_images: optional number`19881989              Number of partial images to generate in streaming mode, from 0 (default value) to 3.19901991            - `quality: optional "low" or "medium" or "high" or 3 more`19921993              The quality of the generated image. The GPT image models support `low`,1994              `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,1995              including their `2026-09-08` snapshots, also support `xhigh` and `max`.1996              Default: `auto`.19971998              - `"low"`19992000              - `"medium"`20012002              - `"high"`20032004              - `"xhigh"`20052006              - `"max"`20072008              - `"auto"`20092010            - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`20112012              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`.20132014              - `string`20152016              - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`20172018                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`.20192020                - `"1024x1024"`20212022                - `"1024x1536"`20232024                - `"1536x1024"`20252026                - `"auto"`20272028          - `LocalShell object { type }`20292030            A tool that allows the model to execute shell commands in a local environment.20312032            - `type: "local_shell"`20332034              The type of the local shell tool. Always `local_shell`.20352036              - `"local_shell"`20372038          - `Shell object { type, allowed_callers, environment }`20392040            A tool that allows the model to execute shell commands.20412042            - `type: "shell"`20432044              The type of the shell tool. Always `shell`.20452046              - `"shell"`20472048            - `allowed_callers: optional array of "direct" or "programmatic" or null`20492050              The tool invocation context(s).20512052              - `"direct"`20532054              - `"programmatic"`20552056            - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`20572058              - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`20592060                - `type: "container_auto"`20612062                  Automatically creates a container for this request20632064                  - `"container_auto"`20652066                - `file_ids: optional array of string`20672068                  An optional list of uploaded files to make available to your code.20692070                - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`20712072                  The memory limit for the container.20732074                  - `"1g"`20752076                  - `"4g"`20772078                  - `"16g"`20792080                  - `"64g"`20812082                - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`20832084                  Network access policy for the container.20852086                  - `ContainerNetworkPolicyDisabled object { type }`20872088                  - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`20892090                - `skills: optional array of SkillReference or InlineSkill`20912092                  An optional list of skills referenced by id or inline data.20932094                  - `SkillReference object { skill_id, type, version }`20952096                    - `skill_id: string`20972098                      The ID of the referenced skill.20992100                    - `type: "skill_reference"`21012102                      References a skill created with the /v1/skills endpoint.21032104                      - `"skill_reference"`21052106                    - `version: optional string`21072108                      Optional skill version. Use a positive integer or 'latest'. Omit for default.21092110                  - `InlineSkill object { description, name, source, type }`21112112                    - `description: string`21132114                      The description of the skill.21152116                    - `name: string`21172118                      The name of the skill.21192120                    - `source: InlineSkillSource`21212122                      Inline skill payload21232124                      - `data: string`21252126                        Base64-encoded skill zip bundle.21272128                      - `media_type: "application/zip"`21292130                        The media type of the inline skill payload. Must be `application/zip`.21312132                        - `"application/zip"`21332134                      - `type: "base64"`21352136                        The type of the inline skill source. Must be `base64`.21372138                        - `"base64"`21392140                    - `type: "inline"`21412142                      Defines an inline skill for this request.21432144                      - `"inline"`21452146              - `LocalEnvironment object { type, skills }`21472148                - `type: "local"`21492150                  Use a local computer environment.21512152                  - `"local"`21532154                - `skills: optional array of LocalSkill`21552156                  An optional list of skills.21572158                  - `description: string`21592160                    The description of the skill.21612162                  - `name: string`21632164                    The name of the skill.21652166                  - `path: string`21672168                    The path to the directory containing the skill.21692170              - `ContainerReference object { container_id, type }`21712172                - `container_id: string`21732174                  The ID of the referenced container.21752176                - `type: "container_reference"`21772178                  References a container created with the /v1/containers endpoint21792180                  - `"container_reference"`21812182          - `Custom object { name, type, allowed_callers, 4 more }`21832184            A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)21852186            - `name: string`21872188              The name of the custom tool, used to identify it in tool calls.21892190            - `type: "custom"`21912192              The type of the custom tool. Always `custom`.21932194              - `"custom"`21952196            - `allowed_callers: optional array of "direct" or "programmatic" or null`21972198              The tool invocation context(s).21992200              - `"direct"`22012202              - `"programmatic"`22032204            - `async: optional boolean`22052206              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.22072208            - `defer_loading: optional boolean`22092210              Whether this tool should be deferred and discovered via tool search.22112212            - `description: optional string`22132214              Optional description of the custom tool, used to provide more context.22152216            - `format: optional CustomToolInputFormat`22172218              The input format for the custom tool. Default is unconstrained text.22192220              - `Text object { type }`22212222                Unconstrained free-form text.22232224                - `type: "text"`22252226                  Unconstrained text format. Always `text`.22272228                  - `"text"`22292230              - `Grammar object { definition, syntax, type }`22312232                A grammar defined by the user.22332234                - `definition: string`22352236                  The grammar definition.22372238                - `syntax: "lark" or "regex"`22392240                  The syntax of the grammar definition. One of `lark` or `regex`.22412242                  - `"lark"`22432244                  - `"regex"`22452246                - `type: "grammar"`22472248                  Grammar format. Always `grammar`.22492250                  - `"grammar"`22512252          - `Namespace object { description, name, tools, type }`22532254            Groups function/custom tools under a shared namespace.22552256            - `description: string`22572258              A description of the namespace shown to the model.22592260            - `name: string`22612262              The namespace name used in tool calls (for example, `crm`).22632264            - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`22652266              The function/custom tools available inside this namespace.22672268              - `Function object { name, type, allowed_callers, 6 more }`22692270                - `name: string`22712272                - `type: "function"`22732274                  - `"function"`22752276                - `allowed_callers: optional array of "direct" or "programmatic" or null`22772278                  The tool invocation context(s).22792280                  - `"direct"`22812282                  - `"programmatic"`22832284                - `async: optional boolean`22852286                  Whether the tool response can be returned asynchronously versus immediately returned on next response creation.22872288                - `defer_loading: optional boolean`22892290                  Whether this function should be deferred and discovered via tool search.22912292                - `description: optional string or null`22932294                - `output_schema: optional map[unknown] or null`22952296                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.22972298                - `parameters: optional unknown or null`22992300                - `strict: optional boolean or null`23012302                  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.23032304              - `Custom object { name, type, allowed_callers, 4 more }`23052306                A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)23072308                - `name: string`23092310                  The name of the custom tool, used to identify it in tool calls.23112312                - `type: "custom"`23132314                  The type of the custom tool. Always `custom`.23152316                  - `"custom"`23172318                - `allowed_callers: optional array of "direct" or "programmatic" or null`23192320                  The tool invocation context(s).23212322                  - `"direct"`23232324                  - `"programmatic"`23252326                - `async: optional boolean`23272328                  Whether the tool response can be returned asynchronously versus immediately returned on next response creation.23292330                - `defer_loading: optional boolean`23312332                  Whether this tool should be deferred and discovered via tool search.23332334                - `description: optional string`23352336                  Optional description of the custom tool, used to provide more context.23372338                - `format: optional CustomToolInputFormat`23392340                  The input format for the custom tool. Default is unconstrained text.23412342            - `type: "namespace"`23432344              The type of the tool. Always `namespace`.23452346              - `"namespace"`23472348          - `ToolSearch object { type, description, execution, parameters }`23492350            Hosted or BYOT tool search configuration for deferred tools.23512352            - `type: "tool_search"`23532354              The type of the tool. Always `tool_search`.23552356              - `"tool_search"`23572358            - `description: optional string or null`23592360              Description shown to the model for a client-executed tool search tool.23612362            - `execution: optional "server" or "client"`23632364              Whether tool search is executed by the server or by the client.23652366              - `"server"`23672368              - `"client"`23692370            - `parameters: optional unknown or null`23712372              Parameter schema for a client-executed tool search tool.23732374          - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`23752376            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).23772378            - `type: "web_search_preview" or "web_search_preview_2025_03_11"`23792380              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.23812382              - `"web_search_preview"`23832384              - `"web_search_preview_2025_03_11"`23852386            - `search_content_types: optional array of "text" or "image"`23872388              - `"text"`23892390              - `"image"`23912392            - `search_context_size: optional "low" or "medium" or "high"`23932394              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.23952396              - `"low"`23972398              - `"medium"`23992400              - `"high"`24012402            - `user_location: optional object { type, city, country, 2 more }  or null`24032404              The user's location.24052406              - `type: "approximate"`24072408                The type of location approximation. Always `approximate`.24092410                - `"approximate"`24112412              - `city: optional string or null`24132414                Free text input for the city of the user, e.g. `San Francisco`.24152416              - `country: optional string or null`24172418                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.24192420              - `region: optional string or null`24212422                Free text input for the region of the user, e.g. `California`.24232424              - `timezone: optional string or null`24252426                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.24272428          - `ApplyPatch object { type, allowed_callers }`24292430            Allows the assistant to create, delete, or update files using unified diffs.24312432            - `type: "apply_patch"`24332434              The type of the tool. Always `apply_patch`.24352436              - `"apply_patch"`24372438            - `allowed_callers: optional array of "direct" or "programmatic" or null`24392440              The tool invocation context(s).24412442              - `"direct"`24432444              - `"programmatic"`24452446        - `type: "tool_search_output"`24472448          The item type. Always `tool_search_output`.24492450          - `"tool_search_output"`24512452        - `id: optional string or null`24532454          The unique ID of this tool search output.24552456        - `call_id: optional string or null`24572458          The unique ID of the tool search call generated by the model.24592460        - `execution: optional "server" or "client"`24612462          Whether tool search was executed by the server or by the client.24632464          - `"server"`24652466          - `"client"`24672468        - `status: optional "in_progress" or "completed" or "incomplete" or null`24692470          The status of the tool search output.24712472          - `"in_progress"`24732474          - `"completed"`24752476          - `"incomplete"`24772478      - `AdditionalTools object { role, tools, type, id }`24792480        - `role: "developer"`24812482          The role that provided the additional tools. Only `developer` is supported.24832484          - `"developer"`24852486        - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`24872488          A list of additional tools made available at this item.24892490          - `Function object { name, parameters, strict, 6 more }`24912492            Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).24932494            - `name: string`24952496              The name of the function to call.24972498            - `parameters: map[unknown] or null`24992500              A JSON schema object describing the parameters of the function.25012502            - `strict: boolean or null`25032504              Whether strict parameter validation is enforced for this function tool.25052506            - `type: "function"`25072508              The type of the function tool. Always `function`.25092510              - `"function"`25112512            - `allowed_callers: optional array of "direct" or "programmatic" or null`25132514              The tool invocation context(s).25152516              - `"direct"`25172518              - `"programmatic"`25192520            - `async: optional boolean`25212522            - `defer_loading: optional boolean`25232524              Whether this function is deferred and loaded via tool search.25252526            - `description: optional string or null`25272528              A description of the function. Used by the model to determine whether or not to call the function.25292530            - `output_schema: optional map[unknown] or null`25312532              A JSON schema object describing the JSON value encoded in string outputs for this function.25332534          - `FileSearch object { type, vector_store_ids, filters, 2 more }`25352536            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).25372538            - `type: "file_search"`25392540              The type of the file search tool. Always `file_search`.25412542              - `"file_search"`25432544            - `vector_store_ids: array of string`25452546              The IDs of the vector stores to search.25472548            - `filters: optional ComparisonFilter or CompoundFilter or null`25492550              A filter to apply.25512552              - `ComparisonFilter object { key, type, value }`25532554                A filter used to compare a specified attribute key to a given value using a defined comparison operation.25552556              - `CompoundFilter object { filters, type }`25572558                Combine multiple filters using `and` or `or`.25592560            - `max_num_results: optional number`25612562              The maximum number of results to return. This number should be between 1 and 50 inclusive.25632564            - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`25652566              Ranking options for search.25672568              - `hybrid_search: optional object { embedding_weight, text_weight }`25692570                Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.25712572                - `embedding_weight: number`25732574                  The weight of the embedding in the reciprocal ranking fusion.25752576                - `text_weight: number`25772578                  The weight of the text in the reciprocal ranking fusion.25792580              - `ranker: optional "auto" or "default-2024-11-15"`25812582                The ranker to use for the file search.25832584                - `"auto"`25852586                - `"default-2024-11-15"`25872588              - `score_threshold: optional number`25892590                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.25912592          - `Computer object { type }`25932594            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).25952596            - `type: "computer"`25972598              The type of the computer tool. Always `computer`.25992600              - `"computer"`26012602          - `ComputerUsePreview object { display_height, display_width, environment, type }`26032604            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).26052606            - `display_height: number`26072608              The height of the computer display.26092610            - `display_width: number`26112612              The width of the computer display.26132614            - `environment: "windows" or "mac" or "linux" or 2 more`26152616              The type of computer environment to control.26172618              - `"windows"`26192620              - `"mac"`26212622              - `"linux"`26232624              - `"ubuntu"`26252626              - `"browser"`26272628            - `type: "computer_use_preview"`26292630              The type of the computer use tool. Always `computer_use_preview`.26312632              - `"computer_use_preview"`26332634          - `WebSearch object { type, external_web_access, filters, 2 more }`26352636            Search the Internet for sources related to the prompt. Learn more about the2637            [web search tool](/api/docs/guides/tools-web-search).26382639            - `type: "web_search" or "web_search_2025_08_26"`26402641              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.26422643              - `"web_search"`26442645              - `"web_search_2025_08_26"`26462647            - `external_web_access: optional boolean`26482649              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.26502651            - `filters: optional object { allowed_domains }  or null`26522653              Filters for the search.26542655              - `allowed_domains: optional array of string or null`26562657                Allowed domains for the search. If not provided, all domains are allowed.2658                Subdomains of the provided domains are allowed as well.26592660                Example: `["pubmed.ncbi.nlm.nih.gov"]`26612662            - `search_context_size: optional "low" or "medium" or "high"`26632664              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.26652666              - `"low"`26672668              - `"medium"`26692670              - `"high"`26712672            - `user_location: optional object { city, country, region, 2 more }  or null`26732674              The approximate location of the user.26752676              - `city: optional string or null`26772678                Free text input for the city of the user, e.g. `San Francisco`.26792680              - `country: optional string or null`26812682                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.26832684              - `region: optional string or null`26852686                Free text input for the region of the user, e.g. `California`.26872688              - `timezone: optional string or null`26892690                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.26912692              - `type: optional "approximate"`26932694                The type of location approximation. Always `approximate`.26952696                - `"approximate"`26972698          - `Mcp object { server_label, type, allowed_callers, 9 more }`26992700            Give the model access to additional tools via remote Model Context Protocol2701            (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).27022703            - `server_label: string`27042705              A label for this MCP server, used to identify it in tool calls.27062707            - `type: "mcp"`27082709              The type of the MCP tool. Always `mcp`.27102711              - `"mcp"`27122713            - `allowed_callers: optional array of "direct" or "programmatic" or null`27142715              The tool invocation context(s).27162717              - `"direct"`27182719              - `"programmatic"`27202721            - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`27222723              List of allowed tool names or a filter object.27242725              - `McpAllowedTools = array of string`27262727                A string array of allowed tool names27282729              - `McpToolFilter object { read_only, tool_names }`27302731                A filter object to specify which tools are allowed.27322733                - `read_only: optional boolean`27342735                  Indicates whether or not a tool modifies data or is read-only. If an2736                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2737                  it will match this filter.27382739                - `tool_names: optional array of string`27402741                  List of allowed tool names.27422743            - `authorization: optional string`27442745              An OAuth access token that can be used with a remote MCP server, either2746              with a custom MCP server URL or a service connector. Your application2747              must handle the OAuth authorization flow and provide the token here.27482749            - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`27502751              Identifier for service connectors, like those available in ChatGPT. One of2752              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more2753              about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).27542755              This field is deprecated for models released after September 1, 2026.2756              Use `server_url` to connect to a remote MCP server, or `tunnel_id` to2757              connect through a Secure MCP Tunnel.27582759              Currently supported `connector_id` values are:27602761              - Dropbox: `connector_dropbox`2762              - Gmail: `connector_gmail`2763              - Google Calendar: `connector_googlecalendar`2764              - Google Drive: `connector_googledrive`2765              - Microsoft Teams: `connector_microsoftteams`2766              - Outlook Calendar: `connector_outlookcalendar`2767              - Outlook Email: `connector_outlookemail`2768              - SharePoint: `connector_sharepoint`27692770              - `"connector_dropbox"`27712772              - `"connector_gmail"`27732774              - `"connector_googlecalendar"`27752776              - `"connector_googledrive"`27772778              - `"connector_microsoftteams"`27792780              - `"connector_outlookcalendar"`27812782              - `"connector_outlookemail"`27832784              - `"connector_sharepoint"`27852786            - `defer_loading: optional boolean`27872788              Whether this MCP tool is deferred and discovered via tool search.27892790            - `headers: optional map[string] or null`27912792              Optional HTTP headers to send to the MCP server. Use for authentication2793              or other purposes.27942795            - `require_approval: optional object { always, never }  or "always" or "never" or null`27962797              Specify which of the MCP server's tools require approval.27982799              - `McpToolApprovalFilter object { always, never }`28002801                Specify which of the MCP server's tools require approval. Can be2802                `always`, `never`, or a filter object associated with tools2803                that require approval.28042805                - `always: optional object { read_only, tool_names }`28062807                  A filter object to specify which tools are allowed.28082809                  - `read_only: optional boolean`28102811                    Indicates whether or not a tool modifies data or is read-only. If an2812                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2813                    it will match this filter.28142815                  - `tool_names: optional array of string`28162817                    List of allowed tool names.28182819                - `never: optional object { read_only, tool_names }`28202821                  A filter object to specify which tools are allowed.28222823                  - `read_only: optional boolean`28242825                    Indicates whether or not a tool modifies data or is read-only. If an2826                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2827                    it will match this filter.28282829                  - `tool_names: optional array of string`28302831                    List of allowed tool names.28322833              - `McpToolApprovalSetting = "always" or "never"`28342835                Specify a single approval policy for all tools. One of `always` or2836                `never`. When set to `always`, all tools will require approval. When2837                set to `never`, all tools will not require approval.28382839                - `"always"`28402841                - `"never"`28422843            - `server_description: optional string`28442845              Optional description of the MCP server, used to provide more context.28462847            - `server_url: optional string`28482849              The URL for the MCP server. One of `server_url`, `connector_id`, or2850              `tunnel_id` must be provided.28512852            - `tunnel_id: optional string`28532854              The Secure MCP Tunnel ID to use instead of a direct server URL. One of2855              `server_url`, `connector_id`, or `tunnel_id` must be provided.28562857          - `CodeInterpreter object { container, type, allowed_callers }`28582859            A tool that runs Python code to help generate a response to a prompt.28602861            - `container: string or object { type, file_ids, memory_limit, network_policy }`28622863              The code interpreter container. Can be a container ID or an object that2864              specifies uploaded file IDs to make available to your code, along with an2865              optional `memory_limit` setting.28662867              - `string`28682869                The container ID.28702871              - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`28722873                Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.28742875                - `type: "auto"`28762877                  Always `auto`.28782879                  - `"auto"`28802881                - `file_ids: optional array of string`28822883                  An optional list of uploaded files to make available to your code.28842885                - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`28862887                  The memory limit for the code interpreter container.28882889                  - `"1g"`28902891                  - `"4g"`28922893                  - `"16g"`28942895                  - `"64g"`28962897                - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`28982899                  Network access policy for the container.29002901                  - `ContainerNetworkPolicyDisabled object { type }`29022903                  - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`29042905            - `type: "code_interpreter"`29062907              The type of the code interpreter tool. Always `code_interpreter`.29082909              - `"code_interpreter"`29102911            - `allowed_callers: optional array of "direct" or "programmatic" or null`29122913              The tool invocation context(s).29142915              - `"direct"`29162917              - `"programmatic"`29182919          - `ProgrammaticToolCalling object { type }`29202921            - `type: "programmatic_tool_calling"`29222923              The type of the tool. Always `programmatic_tool_calling`.29242925              - `"programmatic_tool_calling"`29262927          - `ImageGeneration object { type, action, background, 9 more }`29282929            A tool that generates images using the GPT image models.29302931            - `type: "image_generation"`29322933              The type of the image generation tool. Always `image_generation`.29342935              - `"image_generation"`29362937            - `action: optional "generate" or "edit" or "auto"`29382939              Whether to generate a new image or edit an existing image. Default: `auto`.29402941              - `"generate"`29422943              - `"edit"`29442945              - `"auto"`29462947            - `background: optional "transparent" or "opaque" or "auto"`29482949              Set the background of the generated image. One of `transparent`, `opaque`,2950              or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including2951              their `2026-09-08` snapshots, support `opaque` and `transparent`2952              backgrounds. Transparent backgrounds are available for supported GPT Image2953              models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in2954              preview. When using `transparent`, set the output format to `png` or `webp`.2955              Default: `auto`.29562957              - `"transparent"`29582959              - `"opaque"`29602961              - `"auto"`29622963            - `input_fidelity: optional "high" or "low" or null`29642965              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`.29662967              - `"high"`29682969              - `"low"`29702971            - `input_image_mask: optional object { file_id, image_url }`29722973              Optional mask for inpainting. Contains `image_url`2974              (string, optional) and `file_id` (string, optional).29752976              - `file_id: optional string`29772978                File ID for the mask image.29792980              - `image_url: optional string`29812982                Base64-encoded mask image.29832984            - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`29852986              The image generation model to use. One of `gpt-image-1`,2987              `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2988              `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2989              `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2990              `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2991              `gpt-image-1`.29922993              - `string`29942995              - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`29962997                The image generation model to use. One of `gpt-image-1`,2998                `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2999                `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3000                `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3001                `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3002                `gpt-image-1`.30033004                - `"gpt-image-1"`30053006                - `"gpt-image-1-mini"`30073008                - `"gpt-image-1.5"`30093010                - `"gpt-image-2"`30113012                - `"gpt-image-2-2026-04-21"`30133014                - `"gpt-image-2.5-sunburst"`30153016                - `"gpt-image-2.5-sunburst-2026-09-08"`30173018                - `"gpt-image-2.5-flare"`30193020                - `"gpt-image-2.5-flare-2026-09-08"`30213022            - `moderation: optional "auto" or "low"`30233024              Moderation level for the generated image. Default: `auto`.30253026              - `"auto"`30273028              - `"low"`30293030            - `output_compression: optional number`30313032              Compression level for the output image. Default: 100.30333034            - `output_format: optional "png" or "webp" or "jpeg"`30353036              The output format of the generated image. One of `png`, `webp`, or3037              `jpeg`. Default: `png`.30383039              - `"png"`30403041              - `"webp"`30423043              - `"jpeg"`30443045            - `partial_images: optional number`30463047              Number of partial images to generate in streaming mode, from 0 (default value) to 3.30483049            - `quality: optional "low" or "medium" or "high" or 3 more`30503051              The quality of the generated image. The GPT image models support `low`,3052              `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,3053              including their `2026-09-08` snapshots, also support `xhigh` and `max`.3054              Default: `auto`.30553056              - `"low"`30573058              - `"medium"`30593060              - `"high"`30613062              - `"xhigh"`30633064              - `"max"`30653066              - `"auto"`30673068            - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`30693070              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`.30713072              - `string`30733074              - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`30753076                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`.30773078                - `"1024x1024"`30793080                - `"1024x1536"`30813082                - `"1536x1024"`30833084                - `"auto"`30853086          - `LocalShell object { type }`30873088            A tool that allows the model to execute shell commands in a local environment.30893090            - `type: "local_shell"`30913092              The type of the local shell tool. Always `local_shell`.30933094              - `"local_shell"`30953096          - `Shell object { type, allowed_callers, environment }`30973098            A tool that allows the model to execute shell commands.30993100            - `type: "shell"`31013102              The type of the shell tool. Always `shell`.31033104              - `"shell"`31053106            - `allowed_callers: optional array of "direct" or "programmatic" or null`31073108              The tool invocation context(s).31093110              - `"direct"`31113112              - `"programmatic"`31133114            - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`31153116              - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`31173118              - `LocalEnvironment object { type, skills }`31193120              - `ContainerReference object { container_id, type }`31213122          - `Custom object { name, type, allowed_callers, 4 more }`31233124            A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)31253126            - `name: string`31273128              The name of the custom tool, used to identify it in tool calls.31293130            - `type: "custom"`31313132              The type of the custom tool. Always `custom`.31333134              - `"custom"`31353136            - `allowed_callers: optional array of "direct" or "programmatic" or null`31373138              The tool invocation context(s).31393140              - `"direct"`31413142              - `"programmatic"`31433144            - `async: optional boolean`31453146              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.31473148            - `defer_loading: optional boolean`31493150              Whether this tool should be deferred and discovered via tool search.31513152            - `description: optional string`31533154              Optional description of the custom tool, used to provide more context.31553156            - `format: optional CustomToolInputFormat`31573158              The input format for the custom tool. Default is unconstrained text.31593160          - `Namespace object { description, name, tools, type }`31613162            Groups function/custom tools under a shared namespace.31633164            - `description: string`31653166              A description of the namespace shown to the model.31673168            - `name: string`31693170              The namespace name used in tool calls (for example, `crm`).31713172            - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`31733174              The function/custom tools available inside this namespace.31753176              - `Function object { name, type, allowed_callers, 6 more }`31773178                - `name: string`31793180                - `type: "function"`31813182                  - `"function"`31833184                - `allowed_callers: optional array of "direct" or "programmatic" or null`31853186                  The tool invocation context(s).31873188                  - `"direct"`31893190                  - `"programmatic"`31913192                - `async: optional boolean`31933194                  Whether the tool response can be returned asynchronously versus immediately returned on next response creation.31953196                - `defer_loading: optional boolean`31973198                  Whether this function should be deferred and discovered via tool search.31993200                - `description: optional string or null`32013202                - `output_schema: optional map[unknown] or null`32033204                  A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.32053206                - `parameters: optional unknown or null`32073208                - `strict: optional boolean or null`32093210                  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.32113212              - `Custom object { name, type, allowed_callers, 4 more }`32133214                A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)32153216                - `name: string`32173218                  The name of the custom tool, used to identify it in tool calls.32193220                - `type: "custom"`32213222                  The type of the custom tool. Always `custom`.32233224                  - `"custom"`32253226                - `allowed_callers: optional array of "direct" or "programmatic" or null`32273228                  The tool invocation context(s).32293230                  - `"direct"`32313232                  - `"programmatic"`32333234                - `async: optional boolean`32353236                  Whether the tool response can be returned asynchronously versus immediately returned on next response creation.32373238                - `defer_loading: optional boolean`32393240                  Whether this tool should be deferred and discovered via tool search.32413242                - `description: optional string`32433244                  Optional description of the custom tool, used to provide more context.32453246                - `format: optional CustomToolInputFormat`32473248                  The input format for the custom tool. Default is unconstrained text.32493250            - `type: "namespace"`32513252              The type of the tool. Always `namespace`.32533254              - `"namespace"`32553256          - `ToolSearch object { type, description, execution, parameters }`32573258            Hosted or BYOT tool search configuration for deferred tools.32593260            - `type: "tool_search"`32613262              The type of the tool. Always `tool_search`.32633264              - `"tool_search"`32653266            - `description: optional string or null`32673268              Description shown to the model for a client-executed tool search tool.32693270            - `execution: optional "server" or "client"`32713272              Whether tool search is executed by the server or by the client.32733274              - `"server"`32753276              - `"client"`32773278            - `parameters: optional unknown or null`32793280              Parameter schema for a client-executed tool search tool.32813282          - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`32833284            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).32853286            - `type: "web_search_preview" or "web_search_preview_2025_03_11"`32873288              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.32893290              - `"web_search_preview"`32913292              - `"web_search_preview_2025_03_11"`32933294            - `search_content_types: optional array of "text" or "image"`32953296              - `"text"`32973298              - `"image"`32993300            - `search_context_size: optional "low" or "medium" or "high"`33013302              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.33033304              - `"low"`33053306              - `"medium"`33073308              - `"high"`33093310            - `user_location: optional object { type, city, country, 2 more }  or null`33113312              The user's location.33133314              - `type: "approximate"`33153316                The type of location approximation. Always `approximate`.33173318                - `"approximate"`33193320              - `city: optional string or null`33213322                Free text input for the city of the user, e.g. `San Francisco`.33233324              - `country: optional string or null`33253326                The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.33273328              - `region: optional string or null`33293330                Free text input for the region of the user, e.g. `California`.33313332              - `timezone: optional string or null`33333334                The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.33353336          - `ApplyPatch object { type, allowed_callers }`33373338            Allows the assistant to create, delete, or update files using unified diffs.33393340            - `type: "apply_patch"`33413342              The type of the tool. Always `apply_patch`.33433344              - `"apply_patch"`33453346            - `allowed_callers: optional array of "direct" or "programmatic" or null`33473348              The tool invocation context(s).33493350              - `"direct"`33513352              - `"programmatic"`33533354        - `type: "additional_tools"`33553356          The item type. Always `additional_tools`.33573358          - `"additional_tools"`33593360        - `id: optional string or null`33613362          The unique ID of this additional tools item.33633364      - `ConfigurationUpdate object { type, id, reasoning }`33653366        An update to the conversation's response configuration. The configuration3367        remains in effect for subsequent responses until it is replaced by another3368        configuration update.33693370        - `type: "configuration_update"`33713372          The item type. Always `configuration_update`.33733374          - `"configuration_update"`33753376        - `id: optional string or null`33773378          The unique ID of the configuration update item.33793380        - `reasoning: optional object { effort }`33813382          Updates to reasoning configuration. Only effort is supported.33833384          - `effort: optional ReasoningEffort or null`33853386            The reasoning effort to use for subsequent responses until another3387            configuration update replaces it.33883389            - `"none"`33903391            - `"minimal"`33923393            - `"low"`33943395            - `"medium"`33963397            - `"high"`33983399            - `"xhigh"`34003401            - `"max"`34023403      - `Reasoning object { id, summary, type, 3 more }`34043405        A description of the chain of thought used by a reasoning model while generating3406        a response. Be sure to include these items in your `input` to the Responses API3407        for subsequent turns of a conversation if you are manually3408        [managing context](/api/docs/guides/conversation-state).34093410        - `id: string`34113412          The unique identifier of the reasoning content.34133414        - `summary: array of SummaryTextContent`34153416          Reasoning summary content.34173418          - `text: string`34193420            A summary of the reasoning output from the model so far.34213422          - `type: "summary_text"`34233424            The type of the object. Always `summary_text`.34253426            - `"summary_text"`34273428        - `type: "reasoning"`34293430          The type of the object. Always `reasoning`.34313432          - `"reasoning"`34333434        - `content: optional array of object { text, type }`34353436          Reasoning text content.34373438          - `text: string`34393440            The reasoning text from the model.34413442          - `type: "reasoning_text"`34433444            The type of the reasoning text. Always `reasoning_text`.34453446            - `"reasoning_text"`34473448        - `encrypted_content: optional string or null`34493450          The encrypted content of the reasoning item. This is populated by default3451          for reasoning items returned by `POST /v1/responses` and WebSocket3452          `response.create` requests.34533454          When streaming, use the completed reasoning item and its3455          `encrypted_content` from the `response.output_item.done` event in3456          subsequent requests. The `encrypted_content` in3457          `response.output_item.added` may be incomplete. This is especially3458          important when `store` is `false` or when using Zero Data Retention.34593460        - `status: optional "in_progress" or "completed" or "incomplete"`34613462          The status of the item. One of `in_progress`, `completed`, or3463          `incomplete`. Populated when items are returned via API.34643465          - `"in_progress"`34663467          - `"completed"`34683469          - `"incomplete"`34703471      - `Compaction object { encrypted_content, type, id }`34723473        A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).34743475        - `encrypted_content: string`34763477          The encrypted content of the compaction summary.34783479        - `type: "compaction"`34803481          The type of the item. Always `compaction`.34823483          - `"compaction"`34843485        - `id: optional string or null`34863487          The ID of the compaction item.34883489      - `ImageGenerationCall object { id, result, status, 7 more }`34903491        An image generation request made by the model.34923493        - `id: string`34943495          The unique ID of the image generation call.34963497        - `result: string or null`34983499          The generated image encoded in base64.35003501        - `status: "in_progress" or "completed" or "generating" or "failed"`35023503          The status of the image generation call.35043505          - `"in_progress"`35063507          - `"completed"`35083509          - `"generating"`35103511          - `"failed"`35123513        - `type: "image_generation_call"`35143515          The type of the image generation call. Always `image_generation_call`.35163517          - `"image_generation_call"`35183519        - `action: optional "generate" or "edit" or "auto" or null`35203521          The action used for image generation.35223523          - `"generate"`35243525          - `"edit"`35263527          - `"auto"`35283529        - `background: optional "transparent" or "opaque" or "auto" or null`35303531          The background setting used for generation.35323533          - `"transparent"`35343535          - `"opaque"`35363537          - `"auto"`35383539        - `output_format: optional "png" or "webp" or "jpeg" or null`35403541          The output format used for generation.35423543          - `"png"`35443545          - `"webp"`35463547          - `"jpeg"`35483549        - `quality: optional "low" or "medium" or "high" or 3 more or null`35503551          The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.35523553          - `"low"`35543555          - `"medium"`35563557          - `"high"`35583559          - `"xhigh"`35603561          - `"max"`35623563          - `"auto"`35643565        - `revised_prompt: optional string or null`35663567          The prompt that was used after any model prompt rewriting.35683569        - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`35703571          The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.35723573          - `string`35743575          - `"1024x1024" or "1024x1536" or "1536x1024"`35763577            The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.35783579            - `"1024x1024"`35803581            - `"1024x1536"`35823583            - `"1536x1024"`35843585      - `CodeInterpreterCall object { id, code, container_id, 3 more }`35863587        A tool call to run code.35883589        - `id: string`35903591          The unique ID of the code interpreter tool call.35923593        - `code: string or null`35943595          The code to run, or null if not available.35963597        - `container_id: string`35983599          The ID of the container used to run the code.36003601        - `outputs: array of object { logs, type }  or object { type, url }  or null`36023603          The outputs generated by the code interpreter, such as logs or images.3604          Can be null if no outputs are available.36053606          - `Logs object { logs, type }`36073608            The logs output from the code interpreter.36093610            - `logs: string`36113612              The logs output from the code interpreter.36133614            - `type: "logs"`36153616              The type of the output. Always `logs`.36173618              - `"logs"`36193620          - `Image object { type, url }`36213622            The image output from the code interpreter.36233624            - `type: "image"`36253626              The type of the output. Always `image`.36273628              - `"image"`36293630            - `url: string`36313632              The URL of the image output from the code interpreter.36333634        - `status: "in_progress" or "completed" or "incomplete" or 2 more`36353636          The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.36373638          - `"in_progress"`36393640          - `"completed"`36413642          - `"incomplete"`36433644          - `"interpreting"`36453646          - `"failed"`36473648        - `type: "code_interpreter_call"`36493650          The type of the code interpreter tool call. Always `code_interpreter_call`.36513652          - `"code_interpreter_call"`36533654      - `LocalShellCall object { id, action, call_id, 2 more }`36553656        A tool call to run a command on the local shell.36573658        - `id: string`36593660          The unique ID of the local shell call.36613662        - `action: object { command, env, type, 3 more }`36633664          Execute a shell command on the server.36653666          - `command: array of string`36673668            The command to run.36693670          - `env: map[string]`36713672            Environment variables to set for the command.36733674          - `type: "exec"`36753676            The type of the local shell action. Always `exec`.36773678            - `"exec"`36793680          - `timeout_ms: optional number or null`36813682            Optional timeout in milliseconds for the command.36833684          - `user: optional string or null`36853686            Optional user to run the command as.36873688          - `working_directory: optional string or null`36893690            Optional working directory to run the command in.36913692        - `call_id: string`36933694          The unique ID of the local shell tool call generated by the model.36953696        - `status: "in_progress" or "completed" or "incomplete"`36973698          The status of the local shell call.36993700          - `"in_progress"`37013702          - `"completed"`37033704          - `"incomplete"`37053706        - `type: "local_shell_call"`37073708          The type of the local shell call. Always `local_shell_call`.37093710          - `"local_shell_call"`37113712      - `LocalShellCallOutput object { id, output, type, status }`37133714        The output of a local shell tool call.37153716        - `id: string`37173718          The unique ID of the local shell tool call generated by the model.37193720        - `output: string`37213722          A JSON string of the output of the local shell tool call.37233724        - `type: "local_shell_call_output"`37253726          The type of the local shell tool call output. Always `local_shell_call_output`.37273728          - `"local_shell_call_output"`37293730        - `status: optional "in_progress" or "completed" or "incomplete" or null`37313732          The status of the item. One of `in_progress`, `completed`, or `incomplete`.37333734          - `"in_progress"`37353736          - `"completed"`37373738          - `"incomplete"`37393740      - `ShellCall object { action, call_id, type, 4 more }`37413742        A tool representing a request to execute one or more shell commands.37433744        - `action: object { commands, max_output_length, timeout_ms }`37453746          The shell commands and limits that describe how to run the tool call.37473748          - `commands: array of string`37493750            Ordered shell commands for the execution environment to run.37513752          - `max_output_length: optional number or null`37533754            Maximum number of UTF-8 characters to capture from combined stdout and stderr output.37553756          - `timeout_ms: optional number or null`37573758            Maximum wall-clock time in milliseconds to allow the shell commands to run.37593760        - `call_id: string`37613762          The unique ID of the shell tool call generated by the model.37633764        - `type: "shell_call"`37653766          The type of the item. Always `shell_call`.37673768          - `"shell_call"`37693770        - `id: optional string or null`37713772          The unique ID of the shell tool call. Populated when this item is returned via API.37733774        - `caller: optional object { type }  or object { caller_id, type }  or null`37753776          The execution context that produced this tool call.37773778          - `Direct object { type }`37793780            - `type: "direct"`37813782              The caller type. Always `direct`.37833784              - `"direct"`37853786          - `Program object { caller_id, type }`37873788            - `caller_id: string`37893790              The call ID of the program item that produced this tool call.37913792            - `type: "program"`37933794              The caller type. Always `program`.37953796              - `"program"`37973798        - `environment: optional LocalEnvironment or ContainerReference or null`37993800          The environment to execute the shell commands in.38013802          - `LocalEnvironment object { type, skills }`38033804          - `ContainerReference object { container_id, type }`38053806        - `status: optional "in_progress" or "completed" or "incomplete" or null`38073808          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.38093810          - `"in_progress"`38113812          - `"completed"`38133814          - `"incomplete"`38153816      - `ShellCallOutput object { call_id, output, type, 4 more }`38173818        The streamed output items emitted by a shell tool call.38193820        - `call_id: string`38213822          The unique ID of the shell tool call generated by the model.38233824        - `output: array of ResponseFunctionShellCallOutputContent`38253826          Captured chunks of stdout and stderr output, along with their associated outcomes.38273828          - `outcome: object { type }  or object { exit_code, type }`38293830            The exit or timeout outcome associated with this shell call.38313832            - `Timeout object { type }`38333834              Indicates that the shell call exceeded its configured time limit.38353836              - `type: "timeout"`38373838                The outcome type. Always `timeout`.38393840                - `"timeout"`38413842            - `Exit object { exit_code, type }`38433844              Indicates that the shell commands finished and returned an exit code.38453846              - `exit_code: number`38473848                The exit code returned by the shell process.38493850              - `type: "exit"`38513852                The outcome type. Always `exit`.38533854                - `"exit"`38553856          - `stderr: string`38573858            Captured stderr output for the shell call.38593860          - `stdout: string`38613862            Captured stdout output for the shell call.38633864        - `type: "shell_call_output"`38653866          The type of the item. Always `shell_call_output`.38673868          - `"shell_call_output"`38693870        - `id: optional string or null`38713872          The unique ID of the shell tool call output. Populated when this item is returned via API.38733874        - `caller: optional object { type }  or object { caller_id, type }  or null`38753876          The execution context that produced this tool call.38773878          - `Direct object { type }`38793880            - `type: "direct"`38813882              The caller type. Always `direct`.38833884              - `"direct"`38853886          - `Program object { caller_id, type }`38873888            - `caller_id: string`38893890              The call ID of the program item that produced this tool call.38913892            - `type: "program"`38933894              The caller type. Always `program`.38953896              - `"program"`38973898        - `max_output_length: optional number or null`38993900          The maximum number of UTF-8 characters captured for this shell call's combined output.39013902        - `status: optional "in_progress" or "completed" or "incomplete" or null`39033904          The status of the shell call output.39053906          - `"in_progress"`39073908          - `"completed"`39093910          - `"incomplete"`39113912      - `ApplyPatchCall object { call_id, operation, status, 3 more }`39133914        A tool call representing a request to create, delete, or update files using diff patches.39153916        - `call_id: string`39173918          The unique ID of the apply patch tool call generated by the model.39193920        - `operation: object { diff, path, type }  or object { path, type }  or object { diff, path, type }`39213922          The specific create, delete, or update instruction for the apply_patch tool call.39233924          - `CreateFile object { diff, path, type }`39253926            Instruction for creating a new file via the apply_patch tool.39273928            - `diff: string`39293930              Unified diff content to apply when creating the file.39313932            - `path: string`39333934              Path of the file to create relative to the workspace root.39353936            - `type: "create_file"`39373938              The operation type. Always `create_file`.39393940              - `"create_file"`39413942          - `DeleteFile object { path, type }`39433944            Instruction for deleting an existing file via the apply_patch tool.39453946            - `path: string`39473948              Path of the file to delete relative to the workspace root.39493950            - `type: "delete_file"`39513952              The operation type. Always `delete_file`.39533954              - `"delete_file"`39553956          - `UpdateFile object { diff, path, type }`39573958            Instruction for updating an existing file via the apply_patch tool.39593960            - `diff: string`39613962              Unified diff content to apply to the existing file.39633964            - `path: string`39653966              Path of the file to update relative to the workspace root.39673968            - `type: "update_file"`39693970              The operation type. Always `update_file`.39713972              - `"update_file"`39733974        - `status: "in_progress" or "completed"`39753976          The status of the apply patch tool call. One of `in_progress` or `completed`.39773978          - `"in_progress"`39793980          - `"completed"`39813982        - `type: "apply_patch_call"`39833984          The type of the item. Always `apply_patch_call`.39853986          - `"apply_patch_call"`39873988        - `id: optional string or null`39893990          The unique ID of the apply patch tool call. Populated when this item is returned via API.39913992        - `caller: optional object { type }  or object { caller_id, type }  or null`39933994          The execution context that produced this tool call.39953996          - `Direct object { type }`39973998            - `type: "direct"`39994000              The caller type. Always `direct`.40014002              - `"direct"`40034004          - `Program object { caller_id, type }`40054006            - `caller_id: string`40074008              The call ID of the program item that produced this tool call.40094010            - `type: "program"`40114012              The caller type. Always `program`.40134014              - `"program"`40154016      - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`40174018        The streamed output emitted by an apply patch tool call.40194020        - `call_id: string`40214022          The unique ID of the apply patch tool call generated by the model.40234024        - `status: "completed" or "failed"`40254026          The status of the apply patch tool call output. One of `completed` or `failed`.40274028          - `"completed"`40294030          - `"failed"`40314032        - `type: "apply_patch_call_output"`40334034          The type of the item. Always `apply_patch_call_output`.40354036          - `"apply_patch_call_output"`40374038        - `id: optional string or null`40394040          The unique ID of the apply patch tool call output. Populated when this item is returned via API.40414042        - `caller: optional object { type }  or object { caller_id, type }  or null`40434044          The execution context that produced this tool call.40454046          - `Direct object { type }`40474048            - `type: "direct"`40494050              The caller type. Always `direct`.40514052              - `"direct"`40534054          - `Program object { caller_id, type }`40554056            - `caller_id: string`40574058              The call ID of the program item that produced this tool call.40594060            - `type: "program"`40614062              The caller type. Always `program`.40634064              - `"program"`40654066        - `output: optional string or null`40674068          Optional human-readable log text from the apply patch tool (e.g., patch results or errors).40694070      - `McpListTools object { id, server_label, tools, 2 more }`40714072        A list of tools available on an MCP server.40734074        - `id: string`40754076          The unique ID of the list.40774078        - `server_label: string`40794080          The label of the MCP server.40814082        - `tools: array of object { input_schema, name, annotations, description }`40834084          The tools available on the server.40854086          - `input_schema: unknown`40874088            The JSON schema describing the tool's input.40894090          - `name: string`40914092            The name of the tool.40934094          - `annotations: optional unknown or null`40954096            Additional annotations about the tool.40974098          - `description: optional string or null`40994100            The description of the tool.41014102        - `type: "mcp_list_tools"`41034104          The type of the item. Always `mcp_list_tools`.41054106          - `"mcp_list_tools"`41074108        - `error: optional string or null`41094110          Error message if the server could not list tools.41114112      - `McpApprovalRequest object { id, arguments, name, 2 more }`41134114        A request for human approval of a tool invocation.41154116        - `id: string`41174118          The unique ID of the approval request.41194120        - `arguments: string`41214122          A JSON string of arguments for the tool.41234124        - `name: string`41254126          The name of the tool to run.41274128        - `server_label: string`41294130          The label of the MCP server making the request.41314132        - `type: "mcp_approval_request"`41334134          The type of the item. Always `mcp_approval_request`.41354136          - `"mcp_approval_request"`41374138      - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`41394140        A response to an MCP approval request.41414142        - `approval_request_id: string`41434144          The ID of the approval request being answered.41454146        - `approve: boolean`41474148          Whether the request was approved.41494150        - `type: "mcp_approval_response"`41514152          The type of the item. Always `mcp_approval_response`.41534154          - `"mcp_approval_response"`41554156        - `id: optional string or null`41574158          The unique ID of the approval response41594160        - `reason: optional string or null`41614162          Optional reason for the decision.41634164      - `McpCall object { id, arguments, name, 6 more }`41654166        An invocation of a tool on an MCP server.41674168        - `id: string`41694170          The unique ID of the tool call.41714172        - `arguments: string`41734174          A JSON string of the arguments passed to the tool.41754176        - `name: string`41774178          The name of the tool that was run.41794180        - `server_label: string`41814182          The label of the MCP server running the tool.41834184        - `type: "mcp_call"`41854186          The type of the item. Always `mcp_call`.41874188          - `"mcp_call"`41894190        - `approval_request_id: optional string or null`41914192          Unique identifier for the MCP tool call approval request.4193          Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.41944195        - `error: optional McpToolCallError or null`41964197          The error from the tool call, if any.41984199          - `McpProtocolError object { code, message, type }`42004201            - `code: number`42024203            - `message: string`42044205            - `type: "mcp_protocol_error"`42064207              - `"mcp_protocol_error"`42084209          - `McpToolExecutionError object { content, type }`42104211            - `content: unknown`42124213            - `type: "mcp_tool_execution_error"`42144215              - `"mcp_tool_execution_error"`42164217          - `HTTPError object { code, message, type }`42184219            - `code: number`42204221            - `message: string`42224223            - `type: "http_error"`42244225              - `"http_error"`42264227        - `output: optional string or null`42284229          The output from the tool call.42304231        - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`42324233          The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.42344235          - `"in_progress"`42364237          - `"completed"`42384239          - `"incomplete"`42404241          - `"calling"`42424243          - `"failed"`42444245      - `CustomToolCallOutput object { call_id, output, type, 2 more }`42464247        The output of a custom tool call from your code, being sent back to the model.42484249        - `call_id: string`42504251          The call ID, used to map this custom tool call output to a custom tool call.42524253        - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`42544255          The output from the custom tool call generated by your code.4256          Can be a string or an list of output content.42574258          - `StringOutput = string`42594260            A string of the output of the custom tool call.42614262          - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`42634264            Text, image, or file output of the custom tool call.42654266            - `ResponseInputText object { text, type, prompt_cache_breakpoint }`42674268              A text input to the model.42694270            - `ResponseInputImage object { detail, type, file_id, 2 more }`42714272              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).42734274            - `ResponseInputFile object { type, detail, file_data, 4 more }`42754276              A file input to the model.42774278        - `type: "custom_tool_call_output"`42794280          The type of the custom tool call output. Always `custom_tool_call_output`.42814282          - `"custom_tool_call_output"`42834284        - `id: optional string`42854286          The unique ID of the custom tool call output in the OpenAI platform.42874288        - `caller: optional object { type }  or object { caller_id, type }  or null`42894290          The execution context that produced this tool call.42914292          - `Direct object { type }`42934294            - `type: "direct"`42954296              The caller type. Always `direct`.42974298              - `"direct"`42994300          - `Program object { caller_id, type }`43014302            - `caller_id: string`43034304              The call ID of the program item that produced this tool call.43054306            - `type: "program"`43074308              The caller type. Always `program`.43094310              - `"program"`43114312      - `CustomToolCall object { call_id, input, name, 5 more }`43134314        A call to a custom tool created by the model.43154316        - `call_id: string`43174318          An identifier used to map this custom tool call to a tool call output.43194320        - `input: string`43214322          The input for the custom tool call generated by the model.43234324        - `name: string`43254326          The name of the custom tool being called.43274328        - `type: "custom_tool_call"`43294330          The type of the custom tool call. Always `custom_tool_call`.43314332          - `"custom_tool_call"`43334334        - `id: optional string`43354336          The unique ID of the custom tool call in the OpenAI platform.43374338        - `async: optional boolean`43394340          Whether the custom tool call runs asynchronously.43414342        - `caller: optional object { type }  or object { caller_id, type }  or null`43434344          The execution context that produced this tool call.43454346          - `Direct object { type }`43474348            - `type: "direct"`43494350              - `"direct"`43514352          - `Program object { caller_id, type }`43534354            - `caller_id: string`43554356              The call ID of the program item that produced this tool call.43574358            - `type: "program"`43594360              - `"program"`43614362        - `namespace: optional string`43634364          The namespace of the custom tool being called.43654366      - `CompactionTrigger object { type, id }`43674368        Compacts the current context. Must be the final input item.43694370        - `type: "compaction_trigger"`43714372          The type of the item. Always `compaction_trigger`.43734374          - `"compaction_trigger"`43754376        - `id: optional string or null`43774378          The unique ID of this compaction trigger.43794380      - `ItemReference object { id, type }`43814382        An internal identifier for an item to reference.43834384        - `id: string`43854386          The ID of the item to reference.43874388        - `type: optional "item_reference" or null`43894390          The type of item to reference. Always `item_reference`.43914392          - `"item_reference"`43934394      - `Program object { id, call_id, code, 2 more }`43954396        - `id: string`43974398          The unique ID of this program item.43994400        - `call_id: string`44014402          The stable call ID of the program item.44034404        - `code: string`44054406          The JavaScript source executed by programmatic tool calling.44074408        - `fingerprint: string`44094410          Opaque program replay fingerprint that must be round-tripped.44114412        - `type: "program"`44134414          The item type. Always `program`.44154416          - `"program"`44174418      - `ProgramOutput object { id, call_id, result, 2 more }`44194420        - `id: string`44214422          The unique ID of this program output item.44234424        - `call_id: string`44254426          The call ID of the program item.44274428        - `result: string`44294430          The result produced by the program item.44314432        - `status: "completed" or "incomplete"`44334434          The terminal status of the program output.44354436          - `"completed"`44374438          - `"incomplete"`44394440        - `type: "program_output"`44414442          The item type. Always `program_output`.44434444          - `"program_output"`44454446  - `metadata: Metadata or null`44474448    Set of 16 key-value pairs that can be attached to an object. This can be4449    useful for storing additional information about the object in a structured4450    format, and querying for objects via API or the dashboard.44514452    Keys are strings with a maximum length of 64 characters. Values are strings4453    with a maximum length of 512 characters.44544455  - `model: ResponsesModel`44564457    Model ID used to generate the response, like `gpt-6-astra`. OpenAI4458    offers a wide range of models with different capabilities, performance4459    characteristics, and price points. Refer to the [model guide](/api/docs/models)4460    to browse and compare available models.44614462    - `string`44634464    - `"gpt-6-astra" or "gpt-5.6-sol" or "gpt-5.6-terra" or 82 more`44654466      - `"gpt-6-astra"`44674468      - `"gpt-5.6-sol"`44694470      - `"gpt-5.6-terra"`44714472      - `"gpt-5.6-luna"`44734474      - `"gpt-5.5"`44754476      - `"gpt-5.5-2026-04-23"`44774478      - `"gpt-5.4"`44794480      - `"gpt-5.4-mini"`44814482      - `"gpt-5.4-nano"`44834484      - `"gpt-5.4-mini-2026-03-17"`44854486      - `"gpt-5.4-nano-2026-03-17"`44874488      - `"gpt-5.3-chat-latest"`44894490      - `"gpt-5.2"`44914492      - `"gpt-5.2-2025-12-11"`44934494      - `"gpt-5.2-chat-latest"`44954496      - `"gpt-5.2-pro"`44974498      - `"gpt-5.2-pro-2025-12-11"`44994500      - `"gpt-5.1"`45014502      - `"gpt-5.1-2025-11-13"`45034504      - `"gpt-5.1-codex"`45054506      - `"gpt-5.1-chat-latest"`45074508      - `"gpt-5"`45094510      - `"gpt-5-mini"`45114512      - `"gpt-5-nano"`45134514      - `"gpt-5-2025-08-07"`45154516      - `"gpt-5-mini-2025-08-07"`45174518      - `"gpt-5-nano-2025-08-07"`45194520      - `"gpt-5-chat-latest"`45214522      - `"gpt-4.1"`45234524      - `"gpt-4.1-mini"`45254526      - `"gpt-4.1-nano"`45274528      - `"gpt-4.1-2025-04-14"`45294530      - `"gpt-4.1-mini-2025-04-14"`45314532      - `"gpt-4.1-nano-2025-04-14"`45334534      - `"o4-mini"`45354536      - `"o4-mini-2025-04-16"`45374538      - `"o3"`45394540      - `"o3-2025-04-16"`45414542      - `"o3-mini"`45434544      - `"o3-mini-2025-01-31"`45454546      - `"o1"`45474548      - `"o1-2024-12-17"`45494550      - `"o1-preview"`45514552      - `"o1-preview-2024-09-12"`45534554      - `"o1-mini"`45554556      - `"o1-mini-2024-09-12"`45574558      - `"gpt-4o"`45594560      - `"gpt-4o-2024-11-20"`45614562      - `"gpt-4o-2024-08-06"`45634564      - `"gpt-4o-2024-05-13"`45654566      - `"gpt-audio-mini"`45674568      - `"gpt-audio-mini-2025-12-15"`45694570      - `"gpt-4o-audio-preview"`45714572      - `"gpt-4o-audio-preview-2024-10-01"`45734574      - `"gpt-4o-audio-preview-2024-12-17"`45754576      - `"gpt-4o-audio-preview-2025-06-03"`45774578      - `"gpt-4o-mini-audio-preview"`45794580      - `"gpt-4o-mini-audio-preview-2024-12-17"`45814582      - `"gpt-4o-search-preview"`45834584      - `"gpt-4o-mini-search-preview"`45854586      - `"gpt-4o-search-preview-2025-03-11"`45874588      - `"gpt-4o-mini-search-preview-2025-03-11"`45894590      - `"chatgpt-4o-latest"`45914592      - `"codex-mini-latest"`45934594      - `"gpt-4o-mini"`45954596      - `"gpt-4o-mini-2024-07-18"`45974598      - `"gpt-4-turbo"`45994600      - `"gpt-4-turbo-2024-04-09"`46014602      - `"gpt-4-0125-preview"`46034604      - `"gpt-4-turbo-preview"`46054606      - `"gpt-4-1106-preview"`46074608      - `"gpt-4-vision-preview"`46094610      - `"gpt-4"`46114612      - `"gpt-4-0314"`46134614      - `"gpt-4-0613"`46154616      - `"gpt-4-32k"`46174618      - `"gpt-4-32k-0314"`46194620      - `"gpt-4-32k-0613"`46214622      - `"gpt-3.5-turbo"`46234624      - `"gpt-3.5-turbo-16k"`46254626      - `"gpt-3.5-turbo-0301"`46274628      - `"gpt-3.5-turbo-0613"`46294630      - `"gpt-3.5-turbo-1106"`46314632      - `"gpt-3.5-turbo-0125"`46334634      - `"gpt-3.5-turbo-16k-0613"`46354636    - `ResponsesOnlyModel = "o1-pro" or "o1-pro-2025-03-19" or "o3-pro" or 16 more`46374638      - `"o1-pro"`46394640      - `"o1-pro-2025-03-19"`46414642      - `"o3-pro"`46434644      - `"o3-pro-2025-06-10"`46454646      - `"o3-deep-research"`46474648      - `"o3-deep-research-2025-06-26"`46494650      - `"o4-mini-deep-research"`46514652      - `"o4-mini-deep-research-2025-06-26"`46534654      - `"computer-use-preview"`46554656      - `"computer-use-preview-2025-03-11"`46574658      - `"gpt-5.5-pro"`46594660      - `"gpt-5.5-pro-2026-04-23"`46614662      - `"gpt-5-codex"`46634664      - `"gpt-5-pro"`46654666      - `"gpt-5-pro-2025-10-06"`46674668      - `"gpt-5.1-codex-max"`46694670      - `"gpt-daybreak-blue-latest"`46714672      - `"gpt-daybreak-red-latest"`46734674      - `"gpt-5.6-cyber"`46754676  - `object: "response"`46774678    The object type of this resource - always set to `response`.46794680    - `"response"`46814682  - `output: array of ResponseOutputItem`46834684    An array of content items generated by the model.46854686    - The length and order of items in the `output` array is dependent4687      on the model's response.4688    - Rather than accessing the first item in the `output` array and4689      assuming it's an `assistant` message with the content generated by4690      the model, you might consider using the `output_text` property where4691      supported in SDKs.46924693    - `ResponseOutputMessage object { id, content, role, 3 more }`46944695      An output message from the model.46964697    - `FileSearchCall object { id, queries, status, 2 more }`46984699      The results of a file search tool call. See the4700      [file search guide](/api/docs/guides/tools-file-search) for more information.47014702      - `id: string`47034704        The unique ID of the file search tool call.47054706      - `queries: array of string`47074708        The queries used to search for files.47094710      - `status: "in_progress" or "searching" or "completed" or 2 more`47114712        The status of the file search tool call. One of `in_progress`,4713        `searching`, `incomplete` or `failed`,47144715        - `"in_progress"`47164717        - `"searching"`47184719        - `"completed"`47204721        - `"incomplete"`47224723        - `"failed"`47244725      - `type: "file_search_call"`47264727        The type of the file search tool call. Always `file_search_call`.47284729        - `"file_search_call"`47304731      - `results: optional array of object { attributes, file_id, filename, 2 more }  or null`47324733        The results of the file search tool call.47344735        - `attributes: optional map[string or number or boolean] or null`47364737          Set of 16 key-value pairs that can be attached to an object. This can be4738          useful for storing additional information about the object in a structured4739          format, and querying for objects via API or the dashboard. Keys are strings4740          with a maximum length of 64 characters. Values are strings with a maximum4741          length of 512 characters, booleans, or numbers.47424743          - `string`47444745          - `number`47464747          - `boolean`47484749        - `file_id: optional string`47504751          The unique ID of the file.47524753        - `filename: optional string`47544755          The name of the file.47564757        - `score: optional number`47584759          The relevance score of the file - a value between 0 and 1.47604761        - `text: optional string`47624763          The text that was retrieved from the file.47644765    - `FunctionCall object { arguments, call_id, name, 6 more }`47664767      A tool call to run a function. See the4768      [function calling guide](/api/docs/guides/function-calling) for more information.47694770      - `arguments: string`47714772        A JSON string of the arguments to pass to the function.47734774      - `call_id: string`47754776        The unique ID of the function tool call generated by the model.47774778      - `name: string`47794780        The name of the function to run.47814782      - `type: "function_call"`47834784        The type of the function tool call. Always `function_call`.47854786        - `"function_call"`47874788      - `id: optional string`47894790        The unique ID of the function tool call.47914792      - `async: optional boolean`47934794        Whether the function tool call runs asynchronously.47954796      - `caller: optional object { type }  or object { caller_id, type }  or null`47974798        The execution context that produced this tool call.47994800        - `Direct object { type }`48014802          - `type: "direct"`48034804            - `"direct"`48054806        - `Program object { caller_id, type }`48074808          - `caller_id: string`48094810            The call ID of the program item that produced this tool call.48114812          - `type: "program"`48134814            - `"program"`48154816      - `namespace: optional string`48174818        The namespace of the function to run.48194820      - `status: optional "in_progress" or "completed" or "incomplete"`48214822        The status of the item. One of `in_progress`, `completed`, or4823        `incomplete`. Populated when items are returned via API.48244825        - `"in_progress"`48264827        - `"completed"`48284829        - `"incomplete"`48304831    - `FunctionCallOutput object { id, output, status, 6 more }`48324833      - `id: string`48344835        The unique ID of the function call tool output.48364837      - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`48384839        The output from the function call generated by your code.4840        Can be a string or an list of output content.48414842        - `StringOutput = string`48434844          A string of the output of the function call.48454846        - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`48474848          Text, image, or file output of the function call.48494850          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`48514852            A text input to the model.48534854          - `ResponseInputImage object { detail, type, file_id, 2 more }`48554856            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).48574858          - `ResponseInputFile object { type, detail, file_data, 4 more }`48594860            A file input to the model.48614862      - `status: "in_progress" or "completed" or "incomplete"`48634864        The status of the item. One of `in_progress`, `completed`, or4865        `incomplete`. Populated when items are returned via API.48664867        - `"in_progress"`48684869        - `"completed"`48704871        - `"incomplete"`48724873      - `type: "function_call_output"`48744875        The type of the function tool call output. Always `function_call_output`.48764877        - `"function_call_output"`48784879      - `call_id: optional string`48804881        The unique ID of the function tool call generated by the model.48824883      - `caller: optional object { type }  or object { caller_id, type }  or null`48844885        The execution context that produced this tool call.48864887        - `Direct object { type }`48884889          - `type: "direct"`48904891            The caller type. Always `direct`.48924893            - `"direct"`48944895        - `Program object { caller_id, type }`48964897          - `caller_id: string`48984899            The call ID of the program item that produced this tool call.49004901          - `type: "program"`49024903            The caller type. Always `program`.49044905            - `"program"`49064907      - `created_by: optional string`49084909        The identifier of the actor that created the item.49104911      - `name: optional string`49124913        The name of the tool that produced the output.49144915      - `namespace: optional string`49164917        The namespace of the tool that produced the output.49184919    - `WebSearchCall object { id, action, status, type }`49204921      The results of a web search tool call. See the4922      [web search guide](/api/docs/guides/tools-web-search) for more information.49234924      - `id: string`49254926        The unique ID of the web search tool call.49274928      - `action: object { type, queries, query, sources }  or object { type, url }  or object { pattern, type, url }`49294930        An object describing the specific action taken in this web search call.4931        Includes details on how the model used the web (search, open_page, find_in_page).49324933        - `Search object { type, queries, query, sources }`49344935          Action type "search" - Performs a web search query.49364937          - `type: "search"`49384939            The action type.49404941            - `"search"`49424943          - `queries: optional array of string`49444945            The search queries.49464947          - `query: optional string`49484949            The search query.49504951          - `sources: optional array of object { type, url }`49524953            The sources used in the search.49544955            - `type: "url"`49564957              The type of source. Always `url`.49584959              - `"url"`49604961            - `url: string`49624963              The URL of the source.49644965        - `OpenPage object { type, url }`49664967          Action type "open_page" - Opens a specific URL from search results.49684969          - `type: "open_page"`49704971            The action type.49724973            - `"open_page"`49744975          - `url: optional string or null`49764977            The URL opened by the model.49784979        - `FindInPage object { pattern, type, url }`49804981          Action type "find_in_page": Searches for a pattern within a loaded page.49824983          - `pattern: string`49844985            The pattern or text to search for within the page.49864987          - `type: "find_in_page"`49884989            The action type.49904991            - `"find_in_page"`49924993          - `url: string`49944995            The URL of the page searched for the pattern.49964997      - `status: "in_progress" or "searching" or "completed" or 2 more`49984999        The status of the web search tool call.50005001        - `"in_progress"`50025003        - `"searching"`50045005        - `"completed"`50065007        - `"failed"`50085009        - `"incomplete"`50105011      - `type: "web_search_call"`50125013        The type of the web search tool call. Always `web_search_call`.50145015        - `"web_search_call"`50165017    - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`50185019      A tool call to a computer use tool. See the5020      [computer use guide](/api/docs/guides/tools-computer-use) for more information.50215022      - `id: string`50235024        The unique ID of the computer call.50255026      - `call_id: string`50275028        An identifier used when responding to the tool call with output.50295030      - `pending_safety_checks: array of object { id, code, message }`50315032        The pending safety checks for the computer call.50335034        - `id: string`50355036          The ID of the pending safety check.50375038        - `code: optional string or null`50395040          The type of the pending safety check.50415042        - `message: optional string or null`50435044          Details about the pending safety check.50455046      - `status: "in_progress" or "completed" or "incomplete"`50475048        The status of the item. One of `in_progress`, `completed`, or5049        `incomplete`. Populated when items are returned via API.50505051        - `"in_progress"`50525053        - `"completed"`50545055        - `"incomplete"`50565057      - `type: "computer_call"`50585059        The type of the computer call. Always `computer_call`.50605061        - `"computer_call"`50625063      - `action: optional ComputerAction`50645065        A click action.50665067      - `actions: optional ComputerActionList`50685069        Flattened batched actions for `computer_use`. Each action includes an5070        `type` discriminator and action-specific fields.50715072    - `ComputerCallOutput object { id, call_id, output, 4 more }`50735074      - `id: string`50755076        The unique ID of the computer call tool output.50775078      - `call_id: string`50795080        The ID of the computer tool call that produced the output.50815082      - `output: ResponseComputerToolCallOutputScreenshot`50835084        A computer screenshot image used with the computer use tool.50855086      - `status: "completed" or "incomplete" or "failed" or "in_progress"`50875088        The status of the message input. One of `in_progress`, `completed`, or5089        `incomplete`. Populated when input items are returned via API.50905091        - `"completed"`50925093        - `"incomplete"`50945095        - `"failed"`50965097        - `"in_progress"`50985099      - `type: "computer_call_output"`51005101        The type of the computer tool call output. Always `computer_call_output`.51025103        - `"computer_call_output"`51045105      - `acknowledged_safety_checks: optional array of object { id, code, message }`51065107        The safety checks reported by the API that have been acknowledged by the5108        developer.51095110        - `id: string`51115112          The ID of the pending safety check.51135114        - `code: optional string or null`51155116          The type of the pending safety check.51175118        - `message: optional string or null`51195120          Details about the pending safety check.51215122      - `created_by: optional string`51235124        The identifier of the actor that created the item.51255126    - `Reasoning object { id, summary, type, 3 more }`51275128      A description of the chain of thought used by a reasoning model while generating5129      a response. Be sure to include these items in your `input` to the Responses API5130      for subsequent turns of a conversation if you are manually5131      [managing context](/api/docs/guides/conversation-state).51325133      - `id: string`51345135        The unique identifier of the reasoning content.51365137      - `summary: array of SummaryTextContent`51385139        Reasoning summary content.51405141        - `text: string`51425143          A summary of the reasoning output from the model so far.51445145        - `type: "summary_text"`51465147          The type of the object. Always `summary_text`.51485149      - `type: "reasoning"`51505151        The type of the object. Always `reasoning`.51525153        - `"reasoning"`51545155      - `content: optional array of object { text, type }`51565157        Reasoning text content.51585159        - `text: string`51605161          The reasoning text from the model.51625163        - `type: "reasoning_text"`51645165          The type of the reasoning text. Always `reasoning_text`.51665167          - `"reasoning_text"`51685169      - `encrypted_content: optional string or null`51705171        The encrypted content of the reasoning item. This is populated by default5172        for reasoning items returned by `POST /v1/responses` and WebSocket5173        `response.create` requests.51745175        When streaming, use the completed reasoning item and its5176        `encrypted_content` from the `response.output_item.done` event in5177        subsequent requests. The `encrypted_content` in5178        `response.output_item.added` may be incomplete. This is especially5179        important when `store` is `false` or when using Zero Data Retention.51805181      - `status: optional "in_progress" or "completed" or "incomplete"`51825183        The status of the item. One of `in_progress`, `completed`, or5184        `incomplete`. Populated when items are returned via API.51855186        - `"in_progress"`51875188        - `"completed"`51895190        - `"incomplete"`51915192    - `Program object { id, call_id, code, 2 more }`51935194      - `id: string`51955196        The unique ID of the program item.51975198      - `call_id: string`51995200        The stable call ID of the program item.52015202      - `code: string`52035204        The JavaScript source executed by programmatic tool calling.52055206      - `fingerprint: string`52075208        Opaque program replay fingerprint that must be round-tripped.52095210      - `type: "program"`52115212        The type of the item. Always `program`.52135214        - `"program"`52155216    - `ProgramOutput object { id, call_id, result, 2 more }`52175218      - `id: string`52195220        The unique ID of the program output item.52215222      - `call_id: string`52235224        The call ID of the program item.52255226      - `result: string`52275228        The result produced by the program item.52295230      - `status: "completed" or "incomplete"`52315232        The terminal status of the program output item.52335234        - `"completed"`52355236        - `"incomplete"`52375238      - `type: "program_output"`52395240        The type of the item. Always `program_output`.52415242        - `"program_output"`52435244    - `ToolSearchCall object { id, arguments, call_id, 4 more }`52455246      - `id: string`52475248        The unique ID of the tool search call item.52495250      - `arguments: unknown`52515252        Arguments used for the tool search call.52535254      - `call_id: string or null`52555256        The unique ID of the tool search call generated by the model.52575258      - `execution: "server" or "client"`52595260        Whether tool search was executed by the server or by the client.52615262        - `"server"`52635264        - `"client"`52655266      - `status: "in_progress" or "completed" or "incomplete"`52675268        The status of the tool search call item that was recorded.52695270        - `"in_progress"`52715272        - `"completed"`52735274        - `"incomplete"`52755276      - `type: "tool_search_call"`52775278        The type of the item. Always `tool_search_call`.52795280        - `"tool_search_call"`52815282      - `created_by: optional string`52835284        The identifier of the actor that created the item.52855286    - `ToolSearchOutput object { id, call_id, execution, 4 more }`52875288      - `id: string`52895290        The unique ID of the tool search output item.52915292      - `call_id: string or null`52935294        The unique ID of the tool search call generated by the model.52955296      - `execution: "server" or "client"`52975298        Whether tool search was executed by the server or by the client.52995300        - `"server"`53015302        - `"client"`53035304      - `status: "in_progress" or "completed" or "incomplete"`53055306        The status of the tool search output item that was recorded.53075308        - `"in_progress"`53095310        - `"completed"`53115312        - `"incomplete"`53135314      - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`53155316        The loaded tool definitions returned by tool search.53175318        - `Function object { name, parameters, strict, 6 more }`53195320          Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).53215322          - `name: string`53235324            The name of the function to call.53255326          - `parameters: map[unknown] or null`53275328            A JSON schema object describing the parameters of the function.53295330          - `strict: boolean or null`53315332            Whether strict parameter validation is enforced for this function tool.53335334          - `type: "function"`53355336            The type of the function tool. Always `function`.53375338            - `"function"`53395340          - `allowed_callers: optional array of "direct" or "programmatic" or null`53415342            The tool invocation context(s).53435344            - `"direct"`53455346            - `"programmatic"`53475348          - `async: optional boolean`53495350          - `defer_loading: optional boolean`53515352            Whether this function is deferred and loaded via tool search.53535354          - `description: optional string or null`53555356            A description of the function. Used by the model to determine whether or not to call the function.53575358          - `output_schema: optional map[unknown] or null`53595360            A JSON schema object describing the JSON value encoded in string outputs for this function.53615362        - `FileSearch object { type, vector_store_ids, filters, 2 more }`53635364          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).53655366          - `type: "file_search"`53675368            The type of the file search tool. Always `file_search`.53695370            - `"file_search"`53715372          - `vector_store_ids: array of string`53735374            The IDs of the vector stores to search.53755376          - `filters: optional ComparisonFilter or CompoundFilter or null`53775378            A filter to apply.53795380            - `ComparisonFilter object { key, type, value }`53815382              A filter used to compare a specified attribute key to a given value using a defined comparison operation.53835384            - `CompoundFilter object { filters, type }`53855386              Combine multiple filters using `and` or `or`.53875388          - `max_num_results: optional number`53895390            The maximum number of results to return. This number should be between 1 and 50 inclusive.53915392          - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`53935394            Ranking options for search.53955396            - `hybrid_search: optional object { embedding_weight, text_weight }`53975398              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.53995400              - `embedding_weight: number`54015402                The weight of the embedding in the reciprocal ranking fusion.54035404              - `text_weight: number`54055406                The weight of the text in the reciprocal ranking fusion.54075408            - `ranker: optional "auto" or "default-2024-11-15"`54095410              The ranker to use for the file search.54115412              - `"auto"`54135414              - `"default-2024-11-15"`54155416            - `score_threshold: optional number`54175418              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.54195420        - `Computer object { type }`54215422          A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).54235424          - `type: "computer"`54255426            The type of the computer tool. Always `computer`.54275428            - `"computer"`54295430        - `ComputerUsePreview object { display_height, display_width, environment, type }`54315432          A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).54335434          - `display_height: number`54355436            The height of the computer display.54375438          - `display_width: number`54395440            The width of the computer display.54415442          - `environment: "windows" or "mac" or "linux" or 2 more`54435444            The type of computer environment to control.54455446            - `"windows"`54475448            - `"mac"`54495450            - `"linux"`54515452            - `"ubuntu"`54535454            - `"browser"`54555456          - `type: "computer_use_preview"`54575458            The type of the computer use tool. Always `computer_use_preview`.54595460            - `"computer_use_preview"`54615462        - `WebSearch object { type, external_web_access, filters, 2 more }`54635464          Search the Internet for sources related to the prompt. Learn more about the5465          [web search tool](/api/docs/guides/tools-web-search).54665467          - `type: "web_search" or "web_search_2025_08_26"`54685469            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.54705471            - `"web_search"`54725473            - `"web_search_2025_08_26"`54745475          - `external_web_access: optional boolean`54765477            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.54785479          - `filters: optional object { allowed_domains }  or null`54805481            Filters for the search.54825483            - `allowed_domains: optional array of string or null`54845485              Allowed domains for the search. If not provided, all domains are allowed.5486              Subdomains of the provided domains are allowed as well.54875488              Example: `["pubmed.ncbi.nlm.nih.gov"]`54895490          - `search_context_size: optional "low" or "medium" or "high"`54915492            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.54935494            - `"low"`54955496            - `"medium"`54975498            - `"high"`54995500          - `user_location: optional object { city, country, region, 2 more }  or null`55015502            The approximate location of the user.55035504            - `city: optional string or null`55055506              Free text input for the city of the user, e.g. `San Francisco`.55075508            - `country: optional string or null`55095510              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.55115512            - `region: optional string or null`55135514              Free text input for the region of the user, e.g. `California`.55155516            - `timezone: optional string or null`55175518              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.55195520            - `type: optional "approximate"`55215522              The type of location approximation. Always `approximate`.55235524              - `"approximate"`55255526        - `Mcp object { server_label, type, allowed_callers, 9 more }`55275528          Give the model access to additional tools via remote Model Context Protocol5529          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).55305531          - `server_label: string`55325533            A label for this MCP server, used to identify it in tool calls.55345535          - `type: "mcp"`55365537            The type of the MCP tool. Always `mcp`.55385539            - `"mcp"`55405541          - `allowed_callers: optional array of "direct" or "programmatic" or null`55425543            The tool invocation context(s).55445545            - `"direct"`55465547            - `"programmatic"`55485549          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`55505551            List of allowed tool names or a filter object.55525553            - `McpAllowedTools = array of string`55545555              A string array of allowed tool names55565557            - `McpToolFilter object { read_only, tool_names }`55585559              A filter object to specify which tools are allowed.55605561              - `read_only: optional boolean`55625563                Indicates whether or not a tool modifies data or is read-only. If an5564                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5565                it will match this filter.55665567              - `tool_names: optional array of string`55685569                List of allowed tool names.55705571          - `authorization: optional string`55725573            An OAuth access token that can be used with a remote MCP server, either5574            with a custom MCP server URL or a service connector. Your application5575            must handle the OAuth authorization flow and provide the token here.55765577          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`55785579            Identifier for service connectors, like those available in ChatGPT. One of5580            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more5581            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).55825583            This field is deprecated for models released after September 1, 2026.5584            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to5585            connect through a Secure MCP Tunnel.55865587            Currently supported `connector_id` values are:55885589            - Dropbox: `connector_dropbox`5590            - Gmail: `connector_gmail`5591            - Google Calendar: `connector_googlecalendar`5592            - Google Drive: `connector_googledrive`5593            - Microsoft Teams: `connector_microsoftteams`5594            - Outlook Calendar: `connector_outlookcalendar`5595            - Outlook Email: `connector_outlookemail`5596            - SharePoint: `connector_sharepoint`55975598            - `"connector_dropbox"`55995600            - `"connector_gmail"`56015602            - `"connector_googlecalendar"`56035604            - `"connector_googledrive"`56055606            - `"connector_microsoftteams"`56075608            - `"connector_outlookcalendar"`56095610            - `"connector_outlookemail"`56115612            - `"connector_sharepoint"`56135614          - `defer_loading: optional boolean`56155616            Whether this MCP tool is deferred and discovered via tool search.56175618          - `headers: optional map[string] or null`56195620            Optional HTTP headers to send to the MCP server. Use for authentication5621            or other purposes.56225623          - `require_approval: optional object { always, never }  or "always" or "never" or null`56245625            Specify which of the MCP server's tools require approval.56265627            - `McpToolApprovalFilter object { always, never }`56285629              Specify which of the MCP server's tools require approval. Can be5630              `always`, `never`, or a filter object associated with tools5631              that require approval.56325633              - `always: optional object { read_only, tool_names }`56345635                A filter object to specify which tools are allowed.56365637                - `read_only: optional boolean`56385639                  Indicates whether or not a tool modifies data or is read-only. If an5640                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5641                  it will match this filter.56425643                - `tool_names: optional array of string`56445645                  List of allowed tool names.56465647              - `never: optional object { read_only, tool_names }`56485649                A filter object to specify which tools are allowed.56505651                - `read_only: optional boolean`56525653                  Indicates whether or not a tool modifies data or is read-only. If an5654                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5655                  it will match this filter.56565657                - `tool_names: optional array of string`56585659                  List of allowed tool names.56605661            - `McpToolApprovalSetting = "always" or "never"`56625663              Specify a single approval policy for all tools. One of `always` or5664              `never`. When set to `always`, all tools will require approval. When5665              set to `never`, all tools will not require approval.56665667              - `"always"`56685669              - `"never"`56705671          - `server_description: optional string`56725673            Optional description of the MCP server, used to provide more context.56745675          - `server_url: optional string`56765677            The URL for the MCP server. One of `server_url`, `connector_id`, or5678            `tunnel_id` must be provided.56795680          - `tunnel_id: optional string`56815682            The Secure MCP Tunnel ID to use instead of a direct server URL. One of5683            `server_url`, `connector_id`, or `tunnel_id` must be provided.56845685        - `CodeInterpreter object { container, type, allowed_callers }`56865687          A tool that runs Python code to help generate a response to a prompt.56885689          - `container: string or object { type, file_ids, memory_limit, network_policy }`56905691            The code interpreter container. Can be a container ID or an object that5692            specifies uploaded file IDs to make available to your code, along with an5693            optional `memory_limit` setting.56945695            - `string`56965697              The container ID.56985699            - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`57005701              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.57025703              - `type: "auto"`57045705                Always `auto`.57065707                - `"auto"`57085709              - `file_ids: optional array of string`57105711                An optional list of uploaded files to make available to your code.57125713              - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`57145715                The memory limit for the code interpreter container.57165717                - `"1g"`57185719                - `"4g"`57205721                - `"16g"`57225723                - `"64g"`57245725              - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`57265727                Network access policy for the container.57285729                - `ContainerNetworkPolicyDisabled object { type }`57305731                - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`57325733          - `type: "code_interpreter"`57345735            The type of the code interpreter tool. Always `code_interpreter`.57365737            - `"code_interpreter"`57385739          - `allowed_callers: optional array of "direct" or "programmatic" or null`57405741            The tool invocation context(s).57425743            - `"direct"`57445745            - `"programmatic"`57465747        - `ProgrammaticToolCalling object { type }`57485749          - `type: "programmatic_tool_calling"`57505751            The type of the tool. Always `programmatic_tool_calling`.57525753            - `"programmatic_tool_calling"`57545755        - `ImageGeneration object { type, action, background, 9 more }`57565757          A tool that generates images using the GPT image models.57585759          - `type: "image_generation"`57605761            The type of the image generation tool. Always `image_generation`.57625763            - `"image_generation"`57645765          - `action: optional "generate" or "edit" or "auto"`57665767            Whether to generate a new image or edit an existing image. Default: `auto`.57685769            - `"generate"`57705771            - `"edit"`57725773            - `"auto"`57745775          - `background: optional "transparent" or "opaque" or "auto"`57765777            Set the background of the generated image. One of `transparent`, `opaque`,5778            or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including5779            their `2026-09-08` snapshots, support `opaque` and `transparent`5780            backgrounds. Transparent backgrounds are available for supported GPT Image5781            models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in5782            preview. When using `transparent`, set the output format to `png` or `webp`.5783            Default: `auto`.57845785            - `"transparent"`57865787            - `"opaque"`57885789            - `"auto"`57905791          - `input_fidelity: optional "high" or "low" or null`57925793            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`.57945795            - `"high"`57965797            - `"low"`57985799          - `input_image_mask: optional object { file_id, image_url }`58005801            Optional mask for inpainting. Contains `image_url`5802            (string, optional) and `file_id` (string, optional).58035804            - `file_id: optional string`58055806              File ID for the mask image.58075808            - `image_url: optional string`58095810              Base64-encoded mask image.58115812          - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`58135814            The image generation model to use. One of `gpt-image-1`,5815            `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5816            `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5817            `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5818            `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5819            `gpt-image-1`.58205821            - `string`58225823            - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`58245825              The image generation model to use. One of `gpt-image-1`,5826              `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,5827              `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,5828              `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,5829              `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:5830              `gpt-image-1`.58315832              - `"gpt-image-1"`58335834              - `"gpt-image-1-mini"`58355836              - `"gpt-image-1.5"`58375838              - `"gpt-image-2"`58395840              - `"gpt-image-2-2026-04-21"`58415842              - `"gpt-image-2.5-sunburst"`58435844              - `"gpt-image-2.5-sunburst-2026-09-08"`58455846              - `"gpt-image-2.5-flare"`58475848              - `"gpt-image-2.5-flare-2026-09-08"`58495850          - `moderation: optional "auto" or "low"`58515852            Moderation level for the generated image. Default: `auto`.58535854            - `"auto"`58555856            - `"low"`58575858          - `output_compression: optional number`58595860            Compression level for the output image. Default: 100.58615862          - `output_format: optional "png" or "webp" or "jpeg"`58635864            The output format of the generated image. One of `png`, `webp`, or5865            `jpeg`. Default: `png`.58665867            - `"png"`58685869            - `"webp"`58705871            - `"jpeg"`58725873          - `partial_images: optional number`58745875            Number of partial images to generate in streaming mode, from 0 (default value) to 3.58765877          - `quality: optional "low" or "medium" or "high" or 3 more`58785879            The quality of the generated image. The GPT image models support `low`,5880            `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,5881            including their `2026-09-08` snapshots, also support `xhigh` and `max`.5882            Default: `auto`.58835884            - `"low"`58855886            - `"medium"`58875888            - `"high"`58895890            - `"xhigh"`58915892            - `"max"`58935894            - `"auto"`58955896          - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`58975898            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`.58995900            - `string`59015902            - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`59035904              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`.59055906              - `"1024x1024"`59075908              - `"1024x1536"`59095910              - `"1536x1024"`59115912              - `"auto"`59135914        - `LocalShell object { type }`59155916          A tool that allows the model to execute shell commands in a local environment.59175918          - `type: "local_shell"`59195920            The type of the local shell tool. Always `local_shell`.59215922            - `"local_shell"`59235924        - `Shell object { type, allowed_callers, environment }`59255926          A tool that allows the model to execute shell commands.59275928          - `type: "shell"`59295930            The type of the shell tool. Always `shell`.59315932            - `"shell"`59335934          - `allowed_callers: optional array of "direct" or "programmatic" or null`59355936            The tool invocation context(s).59375938            - `"direct"`59395940            - `"programmatic"`59415942          - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`59435944            - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`59455946            - `LocalEnvironment object { type, skills }`59475948            - `ContainerReference object { container_id, type }`59495950        - `Custom object { name, type, allowed_callers, 4 more }`59515952          A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)59535954          - `name: string`59555956            The name of the custom tool, used to identify it in tool calls.59575958          - `type: "custom"`59595960            The type of the custom tool. Always `custom`.59615962            - `"custom"`59635964          - `allowed_callers: optional array of "direct" or "programmatic" or null`59655966            The tool invocation context(s).59675968            - `"direct"`59695970            - `"programmatic"`59715972          - `async: optional boolean`59735974            Whether the tool response can be returned asynchronously versus immediately returned on next response creation.59755976          - `defer_loading: optional boolean`59775978            Whether this tool should be deferred and discovered via tool search.59795980          - `description: optional string`59815982            Optional description of the custom tool, used to provide more context.59835984          - `format: optional CustomToolInputFormat`59855986            The input format for the custom tool. Default is unconstrained text.59875988        - `Namespace object { description, name, tools, type }`59895990          Groups function/custom tools under a shared namespace.59915992          - `description: string`59935994            A description of the namespace shown to the model.59955996          - `name: string`59975998            The namespace name used in tool calls (for example, `crm`).59996000          - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`60016002            The function/custom tools available inside this namespace.60036004            - `Function object { name, type, allowed_callers, 6 more }`60056006              - `name: string`60076008              - `type: "function"`60096010                - `"function"`60116012              - `allowed_callers: optional array of "direct" or "programmatic" or null`60136014                The tool invocation context(s).60156016                - `"direct"`60176018                - `"programmatic"`60196020              - `async: optional boolean`60216022                Whether the tool response can be returned asynchronously versus immediately returned on next response creation.60236024              - `defer_loading: optional boolean`60256026                Whether this function should be deferred and discovered via tool search.60276028              - `description: optional string or null`60296030              - `output_schema: optional map[unknown] or null`60316032                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.60336034              - `parameters: optional unknown or null`60356036              - `strict: optional boolean or null`60376038                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.60396040            - `Custom object { name, type, allowed_callers, 4 more }`60416042              A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)60436044              - `name: string`60456046                The name of the custom tool, used to identify it in tool calls.60476048              - `type: "custom"`60496050                The type of the custom tool. Always `custom`.60516052                - `"custom"`60536054              - `allowed_callers: optional array of "direct" or "programmatic" or null`60556056                The tool invocation context(s).60576058                - `"direct"`60596060                - `"programmatic"`60616062              - `async: optional boolean`60636064                Whether the tool response can be returned asynchronously versus immediately returned on next response creation.60656066              - `defer_loading: optional boolean`60676068                Whether this tool should be deferred and discovered via tool search.60696070              - `description: optional string`60716072                Optional description of the custom tool, used to provide more context.60736074              - `format: optional CustomToolInputFormat`60756076                The input format for the custom tool. Default is unconstrained text.60776078          - `type: "namespace"`60796080            The type of the tool. Always `namespace`.60816082            - `"namespace"`60836084        - `ToolSearch object { type, description, execution, parameters }`60856086          Hosted or BYOT tool search configuration for deferred tools.60876088          - `type: "tool_search"`60896090            The type of the tool. Always `tool_search`.60916092            - `"tool_search"`60936094          - `description: optional string or null`60956096            Description shown to the model for a client-executed tool search tool.60976098          - `execution: optional "server" or "client"`60996100            Whether tool search is executed by the server or by the client.61016102            - `"server"`61036104            - `"client"`61056106          - `parameters: optional unknown or null`61076108            Parameter schema for a client-executed tool search tool.61096110        - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`61116112          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).61136114          - `type: "web_search_preview" or "web_search_preview_2025_03_11"`61156116            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.61176118            - `"web_search_preview"`61196120            - `"web_search_preview_2025_03_11"`61216122          - `search_content_types: optional array of "text" or "image"`61236124            - `"text"`61256126            - `"image"`61276128          - `search_context_size: optional "low" or "medium" or "high"`61296130            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.61316132            - `"low"`61336134            - `"medium"`61356136            - `"high"`61376138          - `user_location: optional object { type, city, country, 2 more }  or null`61396140            The user's location.61416142            - `type: "approximate"`61436144              The type of location approximation. Always `approximate`.61456146              - `"approximate"`61476148            - `city: optional string or null`61496150              Free text input for the city of the user, e.g. `San Francisco`.61516152            - `country: optional string or null`61536154              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.61556156            - `region: optional string or null`61576158              Free text input for the region of the user, e.g. `California`.61596160            - `timezone: optional string or null`61616162              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.61636164        - `ApplyPatch object { type, allowed_callers }`61656166          Allows the assistant to create, delete, or update files using unified diffs.61676168          - `type: "apply_patch"`61696170            The type of the tool. Always `apply_patch`.61716172            - `"apply_patch"`61736174          - `allowed_callers: optional array of "direct" or "programmatic" or null`61756176            The tool invocation context(s).61776178            - `"direct"`61796180            - `"programmatic"`61816182      - `type: "tool_search_output"`61836184        The type of the item. Always `tool_search_output`.61856186        - `"tool_search_output"`61876188      - `created_by: optional string`61896190        The identifier of the actor that created the item.61916192    - `AdditionalTools object { id, role, tools, type }`61936194      - `id: string`61956196        The unique ID of the additional tools item.61976198      - `role: "unknown" or "user" or "assistant" or 5 more`61996200        The role that provided the additional tools.62016202        - `"unknown"`62036204        - `"user"`62056206        - `"assistant"`62076208        - `"system"`62096210        - `"critic"`62116212        - `"discriminator"`62136214        - `"developer"`62156216        - `"tool"`62176218      - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`62196220        The additional tool definitions made available at this item.62216222        - `Function object { name, parameters, strict, 6 more }`62236224          Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).62256226          - `name: string`62276228            The name of the function to call.62296230          - `parameters: map[unknown] or null`62316232            A JSON schema object describing the parameters of the function.62336234          - `strict: boolean or null`62356236            Whether strict parameter validation is enforced for this function tool.62376238          - `type: "function"`62396240            The type of the function tool. Always `function`.62416242            - `"function"`62436244          - `allowed_callers: optional array of "direct" or "programmatic" or null`62456246            The tool invocation context(s).62476248            - `"direct"`62496250            - `"programmatic"`62516252          - `async: optional boolean`62536254          - `defer_loading: optional boolean`62556256            Whether this function is deferred and loaded via tool search.62576258          - `description: optional string or null`62596260            A description of the function. Used by the model to determine whether or not to call the function.62616262          - `output_schema: optional map[unknown] or null`62636264            A JSON schema object describing the JSON value encoded in string outputs for this function.62656266        - `FileSearch object { type, vector_store_ids, filters, 2 more }`62676268          A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).62696270          - `type: "file_search"`62716272            The type of the file search tool. Always `file_search`.62736274            - `"file_search"`62756276          - `vector_store_ids: array of string`62776278            The IDs of the vector stores to search.62796280          - `filters: optional ComparisonFilter or CompoundFilter or null`62816282            A filter to apply.62836284            - `ComparisonFilter object { key, type, value }`62856286              A filter used to compare a specified attribute key to a given value using a defined comparison operation.62876288            - `CompoundFilter object { filters, type }`62896290              Combine multiple filters using `and` or `or`.62916292          - `max_num_results: optional number`62936294            The maximum number of results to return. This number should be between 1 and 50 inclusive.62956296          - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`62976298            Ranking options for search.62996300            - `hybrid_search: optional object { embedding_weight, text_weight }`63016302              Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.63036304              - `embedding_weight: number`63056306                The weight of the embedding in the reciprocal ranking fusion.63076308              - `text_weight: number`63096310                The weight of the text in the reciprocal ranking fusion.63116312            - `ranker: optional "auto" or "default-2024-11-15"`63136314              The ranker to use for the file search.63156316              - `"auto"`63176318              - `"default-2024-11-15"`63196320            - `score_threshold: optional number`63216322              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.63236324        - `Computer object { type }`63256326          A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).63276328          - `type: "computer"`63296330            The type of the computer tool. Always `computer`.63316332            - `"computer"`63336334        - `ComputerUsePreview object { display_height, display_width, environment, type }`63356336          A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).63376338          - `display_height: number`63396340            The height of the computer display.63416342          - `display_width: number`63436344            The width of the computer display.63456346          - `environment: "windows" or "mac" or "linux" or 2 more`63476348            The type of computer environment to control.63496350            - `"windows"`63516352            - `"mac"`63536354            - `"linux"`63556356            - `"ubuntu"`63576358            - `"browser"`63596360          - `type: "computer_use_preview"`63616362            The type of the computer use tool. Always `computer_use_preview`.63636364            - `"computer_use_preview"`63656366        - `WebSearch object { type, external_web_access, filters, 2 more }`63676368          Search the Internet for sources related to the prompt. Learn more about the6369          [web search tool](/api/docs/guides/tools-web-search).63706371          - `type: "web_search" or "web_search_2025_08_26"`63726373            The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.63746375            - `"web_search"`63766377            - `"web_search_2025_08_26"`63786379          - `external_web_access: optional boolean`63806381            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.63826383          - `filters: optional object { allowed_domains }  or null`63846385            Filters for the search.63866387            - `allowed_domains: optional array of string or null`63886389              Allowed domains for the search. If not provided, all domains are allowed.6390              Subdomains of the provided domains are allowed as well.63916392              Example: `["pubmed.ncbi.nlm.nih.gov"]`63936394          - `search_context_size: optional "low" or "medium" or "high"`63956396            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.63976398            - `"low"`63996400            - `"medium"`64016402            - `"high"`64036404          - `user_location: optional object { city, country, region, 2 more }  or null`64056406            The approximate location of the user.64076408            - `city: optional string or null`64096410              Free text input for the city of the user, e.g. `San Francisco`.64116412            - `country: optional string or null`64136414              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.64156416            - `region: optional string or null`64176418              Free text input for the region of the user, e.g. `California`.64196420            - `timezone: optional string or null`64216422              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.64236424            - `type: optional "approximate"`64256426              The type of location approximation. Always `approximate`.64276428              - `"approximate"`64296430        - `Mcp object { server_label, type, allowed_callers, 9 more }`64316432          Give the model access to additional tools via remote Model Context Protocol6433          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).64346435          - `server_label: string`64366437            A label for this MCP server, used to identify it in tool calls.64386439          - `type: "mcp"`64406441            The type of the MCP tool. Always `mcp`.64426443            - `"mcp"`64446445          - `allowed_callers: optional array of "direct" or "programmatic" or null`64466447            The tool invocation context(s).64486449            - `"direct"`64506451            - `"programmatic"`64526453          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`64546455            List of allowed tool names or a filter object.64566457            - `McpAllowedTools = array of string`64586459              A string array of allowed tool names64606461            - `McpToolFilter object { read_only, tool_names }`64626463              A filter object to specify which tools are allowed.64646465              - `read_only: optional boolean`64666467                Indicates whether or not a tool modifies data or is read-only. If an6468                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6469                it will match this filter.64706471              - `tool_names: optional array of string`64726473                List of allowed tool names.64746475          - `authorization: optional string`64766477            An OAuth access token that can be used with a remote MCP server, either6478            with a custom MCP server URL or a service connector. Your application6479            must handle the OAuth authorization flow and provide the token here.64806481          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`64826483            Identifier for service connectors, like those available in ChatGPT. One of6484            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more6485            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).64866487            This field is deprecated for models released after September 1, 2026.6488            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to6489            connect through a Secure MCP Tunnel.64906491            Currently supported `connector_id` values are:64926493            - Dropbox: `connector_dropbox`6494            - Gmail: `connector_gmail`6495            - Google Calendar: `connector_googlecalendar`6496            - Google Drive: `connector_googledrive`6497            - Microsoft Teams: `connector_microsoftteams`6498            - Outlook Calendar: `connector_outlookcalendar`6499            - Outlook Email: `connector_outlookemail`6500            - SharePoint: `connector_sharepoint`65016502            - `"connector_dropbox"`65036504            - `"connector_gmail"`65056506            - `"connector_googlecalendar"`65076508            - `"connector_googledrive"`65096510            - `"connector_microsoftteams"`65116512            - `"connector_outlookcalendar"`65136514            - `"connector_outlookemail"`65156516            - `"connector_sharepoint"`65176518          - `defer_loading: optional boolean`65196520            Whether this MCP tool is deferred and discovered via tool search.65216522          - `headers: optional map[string] or null`65236524            Optional HTTP headers to send to the MCP server. Use for authentication6525            or other purposes.65266527          - `require_approval: optional object { always, never }  or "always" or "never" or null`65286529            Specify which of the MCP server's tools require approval.65306531            - `McpToolApprovalFilter object { always, never }`65326533              Specify which of the MCP server's tools require approval. Can be6534              `always`, `never`, or a filter object associated with tools6535              that require approval.65366537              - `always: optional object { read_only, tool_names }`65386539                A filter object to specify which tools are allowed.65406541                - `read_only: optional boolean`65426543                  Indicates whether or not a tool modifies data or is read-only. If an6544                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6545                  it will match this filter.65466547                - `tool_names: optional array of string`65486549                  List of allowed tool names.65506551              - `never: optional object { read_only, tool_names }`65526553                A filter object to specify which tools are allowed.65546555                - `read_only: optional boolean`65566557                  Indicates whether or not a tool modifies data or is read-only. If an6558                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),6559                  it will match this filter.65606561                - `tool_names: optional array of string`65626563                  List of allowed tool names.65646565            - `McpToolApprovalSetting = "always" or "never"`65666567              Specify a single approval policy for all tools. One of `always` or6568              `never`. When set to `always`, all tools will require approval. When6569              set to `never`, all tools will not require approval.65706571              - `"always"`65726573              - `"never"`65746575          - `server_description: optional string`65766577            Optional description of the MCP server, used to provide more context.65786579          - `server_url: optional string`65806581            The URL for the MCP server. One of `server_url`, `connector_id`, or6582            `tunnel_id` must be provided.65836584          - `tunnel_id: optional string`65856586            The Secure MCP Tunnel ID to use instead of a direct server URL. One of6587            `server_url`, `connector_id`, or `tunnel_id` must be provided.65886589        - `CodeInterpreter object { container, type, allowed_callers }`65906591          A tool that runs Python code to help generate a response to a prompt.65926593          - `container: string or object { type, file_ids, memory_limit, network_policy }`65946595            The code interpreter container. Can be a container ID or an object that6596            specifies uploaded file IDs to make available to your code, along with an6597            optional `memory_limit` setting.65986599            - `string`66006601              The container ID.66026603            - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`66046605              Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.66066607              - `type: "auto"`66086609                Always `auto`.66106611                - `"auto"`66126613              - `file_ids: optional array of string`66146615                An optional list of uploaded files to make available to your code.66166617              - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`66186619                The memory limit for the code interpreter container.66206621                - `"1g"`66226623                - `"4g"`66246625                - `"16g"`66266627                - `"64g"`66286629              - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`66306631                Network access policy for the container.66326633                - `ContainerNetworkPolicyDisabled object { type }`66346635                - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`66366637          - `type: "code_interpreter"`66386639            The type of the code interpreter tool. Always `code_interpreter`.66406641            - `"code_interpreter"`66426643          - `allowed_callers: optional array of "direct" or "programmatic" or null`66446645            The tool invocation context(s).66466647            - `"direct"`66486649            - `"programmatic"`66506651        - `ProgrammaticToolCalling object { type }`66526653          - `type: "programmatic_tool_calling"`66546655            The type of the tool. Always `programmatic_tool_calling`.66566657            - `"programmatic_tool_calling"`66586659        - `ImageGeneration object { type, action, background, 9 more }`66606661          A tool that generates images using the GPT image models.66626663          - `type: "image_generation"`66646665            The type of the image generation tool. Always `image_generation`.66666667            - `"image_generation"`66686669          - `action: optional "generate" or "edit" or "auto"`66706671            Whether to generate a new image or edit an existing image. Default: `auto`.66726673            - `"generate"`66746675            - `"edit"`66766677            - `"auto"`66786679          - `background: optional "transparent" or "opaque" or "auto"`66806681            Set the background of the generated image. One of `transparent`, `opaque`,6682            or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including6683            their `2026-09-08` snapshots, support `opaque` and `transparent`6684            backgrounds. Transparent backgrounds are available for supported GPT Image6685            models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in6686            preview. When using `transparent`, set the output format to `png` or `webp`.6687            Default: `auto`.66886689            - `"transparent"`66906691            - `"opaque"`66926693            - `"auto"`66946695          - `input_fidelity: optional "high" or "low" or null`66966697            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`.66986699            - `"high"`67006701            - `"low"`67026703          - `input_image_mask: optional object { file_id, image_url }`67046705            Optional mask for inpainting. Contains `image_url`6706            (string, optional) and `file_id` (string, optional).67076708            - `file_id: optional string`67096710              File ID for the mask image.67116712            - `image_url: optional string`67136714              Base64-encoded mask image.67156716          - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`67176718            The image generation model to use. One of `gpt-image-1`,6719            `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,6720            `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,6721            `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,6722            `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:6723            `gpt-image-1`.67246725            - `string`67266727            - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`67286729              The image generation model to use. One of `gpt-image-1`,6730              `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,6731              `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,6732              `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,6733              `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:6734              `gpt-image-1`.67356736              - `"gpt-image-1"`67376738              - `"gpt-image-1-mini"`67396740              - `"gpt-image-1.5"`67416742              - `"gpt-image-2"`67436744              - `"gpt-image-2-2026-04-21"`67456746              - `"gpt-image-2.5-sunburst"`67476748              - `"gpt-image-2.5-sunburst-2026-09-08"`67496750              - `"gpt-image-2.5-flare"`67516752              - `"gpt-image-2.5-flare-2026-09-08"`67536754          - `moderation: optional "auto" or "low"`67556756            Moderation level for the generated image. Default: `auto`.67576758            - `"auto"`67596760            - `"low"`67616762          - `output_compression: optional number`67636764            Compression level for the output image. Default: 100.67656766          - `output_format: optional "png" or "webp" or "jpeg"`67676768            The output format of the generated image. One of `png`, `webp`, or6769            `jpeg`. Default: `png`.67706771            - `"png"`67726773            - `"webp"`67746775            - `"jpeg"`67766777          - `partial_images: optional number`67786779            Number of partial images to generate in streaming mode, from 0 (default value) to 3.67806781          - `quality: optional "low" or "medium" or "high" or 3 more`67826783            The quality of the generated image. The GPT image models support `low`,6784            `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,6785            including their `2026-09-08` snapshots, also support `xhigh` and `max`.6786            Default: `auto`.67876788            - `"low"`67896790            - `"medium"`67916792            - `"high"`67936794            - `"xhigh"`67956796            - `"max"`67976798            - `"auto"`67996800          - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`68016802            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`.68036804            - `string`68056806            - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`68076808              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`.68096810              - `"1024x1024"`68116812              - `"1024x1536"`68136814              - `"1536x1024"`68156816              - `"auto"`68176818        - `LocalShell object { type }`68196820          A tool that allows the model to execute shell commands in a local environment.68216822          - `type: "local_shell"`68236824            The type of the local shell tool. Always `local_shell`.68256826            - `"local_shell"`68276828        - `Shell object { type, allowed_callers, environment }`68296830          A tool that allows the model to execute shell commands.68316832          - `type: "shell"`68336834            The type of the shell tool. Always `shell`.68356836            - `"shell"`68376838          - `allowed_callers: optional array of "direct" or "programmatic" or null`68396840            The tool invocation context(s).68416842            - `"direct"`68436844            - `"programmatic"`68456846          - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`68476848            - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`68496850            - `LocalEnvironment object { type, skills }`68516852            - `ContainerReference object { container_id, type }`68536854        - `Custom object { name, type, allowed_callers, 4 more }`68556856          A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)68576858          - `name: string`68596860            The name of the custom tool, used to identify it in tool calls.68616862          - `type: "custom"`68636864            The type of the custom tool. Always `custom`.68656866            - `"custom"`68676868          - `allowed_callers: optional array of "direct" or "programmatic" or null`68696870            The tool invocation context(s).68716872            - `"direct"`68736874            - `"programmatic"`68756876          - `async: optional boolean`68776878            Whether the tool response can be returned asynchronously versus immediately returned on next response creation.68796880          - `defer_loading: optional boolean`68816882            Whether this tool should be deferred and discovered via tool search.68836884          - `description: optional string`68856886            Optional description of the custom tool, used to provide more context.68876888          - `format: optional CustomToolInputFormat`68896890            The input format for the custom tool. Default is unconstrained text.68916892        - `Namespace object { description, name, tools, type }`68936894          Groups function/custom tools under a shared namespace.68956896          - `description: string`68976898            A description of the namespace shown to the model.68996900          - `name: string`69016902            The namespace name used in tool calls (for example, `crm`).69036904          - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`69056906            The function/custom tools available inside this namespace.69076908            - `Function object { name, type, allowed_callers, 6 more }`69096910              - `name: string`69116912              - `type: "function"`69136914                - `"function"`69156916              - `allowed_callers: optional array of "direct" or "programmatic" or null`69176918                The tool invocation context(s).69196920                - `"direct"`69216922                - `"programmatic"`69236924              - `async: optional boolean`69256926                Whether the tool response can be returned asynchronously versus immediately returned on next response creation.69276928              - `defer_loading: optional boolean`69296930                Whether this function should be deferred and discovered via tool search.69316932              - `description: optional string or null`69336934              - `output_schema: optional map[unknown] or null`69356936                A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.69376938              - `parameters: optional unknown or null`69396940              - `strict: optional boolean or null`69416942                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.69436944            - `Custom object { name, type, allowed_callers, 4 more }`69456946              A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)69476948              - `name: string`69496950                The name of the custom tool, used to identify it in tool calls.69516952              - `type: "custom"`69536954                The type of the custom tool. Always `custom`.69556956                - `"custom"`69576958              - `allowed_callers: optional array of "direct" or "programmatic" or null`69596960                The tool invocation context(s).69616962                - `"direct"`69636964                - `"programmatic"`69656966              - `async: optional boolean`69676968                Whether the tool response can be returned asynchronously versus immediately returned on next response creation.69696970              - `defer_loading: optional boolean`69716972                Whether this tool should be deferred and discovered via tool search.69736974              - `description: optional string`69756976                Optional description of the custom tool, used to provide more context.69776978              - `format: optional CustomToolInputFormat`69796980                The input format for the custom tool. Default is unconstrained text.69816982          - `type: "namespace"`69836984            The type of the tool. Always `namespace`.69856986            - `"namespace"`69876988        - `ToolSearch object { type, description, execution, parameters }`69896990          Hosted or BYOT tool search configuration for deferred tools.69916992          - `type: "tool_search"`69936994            The type of the tool. Always `tool_search`.69956996            - `"tool_search"`69976998          - `description: optional string or null`69997000            Description shown to the model for a client-executed tool search tool.70017002          - `execution: optional "server" or "client"`70037004            Whether tool search is executed by the server or by the client.70057006            - `"server"`70077008            - `"client"`70097010          - `parameters: optional unknown or null`70117012            Parameter schema for a client-executed tool search tool.70137014        - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`70157016          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).70177018          - `type: "web_search_preview" or "web_search_preview_2025_03_11"`70197020            The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.70217022            - `"web_search_preview"`70237024            - `"web_search_preview_2025_03_11"`70257026          - `search_content_types: optional array of "text" or "image"`70277028            - `"text"`70297030            - `"image"`70317032          - `search_context_size: optional "low" or "medium" or "high"`70337034            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.70357036            - `"low"`70377038            - `"medium"`70397040            - `"high"`70417042          - `user_location: optional object { type, city, country, 2 more }  or null`70437044            The user's location.70457046            - `type: "approximate"`70477048              The type of location approximation. Always `approximate`.70497050              - `"approximate"`70517052            - `city: optional string or null`70537054              Free text input for the city of the user, e.g. `San Francisco`.70557056            - `country: optional string or null`70577058              The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.70597060            - `region: optional string or null`70617062              Free text input for the region of the user, e.g. `California`.70637064            - `timezone: optional string or null`70657066              The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.70677068        - `ApplyPatch object { type, allowed_callers }`70697070          Allows the assistant to create, delete, or update files using unified diffs.70717072          - `type: "apply_patch"`70737074            The type of the tool. Always `apply_patch`.70757076            - `"apply_patch"`70777078          - `allowed_callers: optional array of "direct" or "programmatic" or null`70797080            The tool invocation context(s).70817082            - `"direct"`70837084            - `"programmatic"`70857086      - `type: "additional_tools"`70877088        The type of the item. Always `additional_tools`.70897090        - `"additional_tools"`70917092    - `Compaction object { id, encrypted_content, type, created_by }`70937094      A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).70957096      - `id: string`70977098        The unique ID of the compaction item.70997100      - `encrypted_content: string`71017102        The encrypted content that was produced by compaction.71037104      - `type: "compaction"`71057106        The type of the item. Always `compaction`.71077108        - `"compaction"`71097110      - `created_by: optional string`71117112        The identifier of the actor that created the item.71137114    - `ImageGenerationCall object { id, result, status, 7 more }`71157116      An image generation request made by the model.71177118      - `id: string`71197120        The unique ID of the image generation call.71217122      - `result: string or null`71237124        The generated image encoded in base64.71257126      - `status: "in_progress" or "completed" or "generating" or "failed"`71277128        The status of the image generation call.71297130        - `"in_progress"`71317132        - `"completed"`71337134        - `"generating"`71357136        - `"failed"`71377138      - `type: "image_generation_call"`71397140        The type of the image generation call. Always `image_generation_call`.71417142        - `"image_generation_call"`71437144      - `action: optional "generate" or "edit" or "auto" or null`71457146        The action used for image generation.71477148        - `"generate"`71497150        - `"edit"`71517152        - `"auto"`71537154      - `background: optional "transparent" or "opaque" or "auto" or null`71557156        The background setting used for generation.71577158        - `"transparent"`71597160        - `"opaque"`71617162        - `"auto"`71637164      - `output_format: optional "png" or "webp" or "jpeg" or null`71657166        The output format used for generation.71677168        - `"png"`71697170        - `"webp"`71717172        - `"jpeg"`71737174      - `quality: optional "low" or "medium" or "high" or 3 more or null`71757176        The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.71777178        - `"low"`71797180        - `"medium"`71817182        - `"high"`71837184        - `"xhigh"`71857186        - `"max"`71877188        - `"auto"`71897190      - `revised_prompt: optional string or null`71917192        The prompt that was used after any model prompt rewriting.71937194      - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`71957196        The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.71977198        - `string`71997200        - `"1024x1024" or "1024x1536" or "1536x1024"`72017202          The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.72037204          - `"1024x1024"`72057206          - `"1024x1536"`72077208          - `"1536x1024"`72097210    - `CodeInterpreterCall object { id, code, container_id, 3 more }`72117212      A tool call to run code.72137214      - `id: string`72157216        The unique ID of the code interpreter tool call.72177218      - `code: string or null`72197220        The code to run, or null if not available.72217222      - `container_id: string`72237224        The ID of the container used to run the code.72257226      - `outputs: array of object { logs, type }  or object { type, url }  or null`72277228        The outputs generated by the code interpreter, such as logs or images.7229        Can be null if no outputs are available.72307231        - `Logs object { logs, type }`72327233          The logs output from the code interpreter.72347235          - `logs: string`72367237            The logs output from the code interpreter.72387239          - `type: "logs"`72407241            The type of the output. Always `logs`.72427243            - `"logs"`72447245        - `Image object { type, url }`72467247          The image output from the code interpreter.72487249          - `type: "image"`72507251            The type of the output. Always `image`.72527253            - `"image"`72547255          - `url: string`72567257            The URL of the image output from the code interpreter.72587259      - `status: "in_progress" or "completed" or "incomplete" or 2 more`72607261        The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.72627263        - `"in_progress"`72647265        - `"completed"`72667267        - `"incomplete"`72687269        - `"interpreting"`72707271        - `"failed"`72727273      - `type: "code_interpreter_call"`72747275        The type of the code interpreter tool call. Always `code_interpreter_call`.72767277        - `"code_interpreter_call"`72787279    - `LocalShellCall object { id, action, call_id, 2 more }`72807281      A tool call to run a command on the local shell.72827283      - `id: string`72847285        The unique ID of the local shell call.72867287      - `action: object { command, env, type, 3 more }`72887289        Execute a shell command on the server.72907291        - `command: array of string`72927293          The command to run.72947295        - `env: map[string]`72967297          Environment variables to set for the command.72987299        - `type: "exec"`73007301          The type of the local shell action. Always `exec`.73027303          - `"exec"`73047305        - `timeout_ms: optional number or null`73067307          Optional timeout in milliseconds for the command.73087309        - `user: optional string or null`73107311          Optional user to run the command as.73127313        - `working_directory: optional string or null`73147315          Optional working directory to run the command in.73167317      - `call_id: string`73187319        The unique ID of the local shell tool call generated by the model.73207321      - `status: "in_progress" or "completed" or "incomplete"`73227323        The status of the local shell call.73247325        - `"in_progress"`73267327        - `"completed"`73287329        - `"incomplete"`73307331      - `type: "local_shell_call"`73327333        The type of the local shell call. Always `local_shell_call`.73347335        - `"local_shell_call"`73367337    - `LocalShellCallOutput object { id, output, type, status }`73387339      The output of a local shell tool call.73407341      - `id: string`73427343        The unique ID of the local shell tool call generated by the model.73447345      - `output: string`73467347        A JSON string of the output of the local shell tool call.73487349      - `type: "local_shell_call_output"`73507351        The type of the local shell tool call output. Always `local_shell_call_output`.73527353        - `"local_shell_call_output"`73547355      - `status: optional "in_progress" or "completed" or "incomplete" or null`73567357        The status of the item. One of `in_progress`, `completed`, or `incomplete`.73587359        - `"in_progress"`73607361        - `"completed"`73627363        - `"incomplete"`73647365    - `ShellCall object { id, action, call_id, 5 more }`73667367      A tool call that executes one or more shell commands in a managed environment.73687369      - `id: string`73707371        The unique ID of the shell tool call. Populated when this item is returned via API.73727373      - `action: object { commands, max_output_length, timeout_ms }`73747375        The shell commands and limits that describe how to run the tool call.73767377        - `commands: array of string`73787379        - `max_output_length: number or null`73807381          Optional maximum number of characters to return from each command.73827383        - `timeout_ms: number or null`73847385          Optional timeout in milliseconds for the commands.73867387      - `call_id: string`73887389        The unique ID of the shell tool call generated by the model.73907391      - `environment: ResponseLocalEnvironment or ResponseContainerReference or null`73927393        Represents the use of a local environment to perform shell actions.73947395        - `ResponseLocalEnvironment object { type }`73967397          Represents the use of a local environment to perform shell actions.73987399          - `type: "local"`74007401            The environment type. Always `local`.74027403            - `"local"`74047405        - `ResponseContainerReference object { container_id, type }`74067407          Represents a container created with /v1/containers.74087409          - `container_id: string`74107411          - `type: "container_reference"`74127413            The environment type. Always `container_reference`.74147415            - `"container_reference"`74167417      - `status: "in_progress" or "completed" or "incomplete"`74187419        The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.74207421        - `"in_progress"`74227423        - `"completed"`74247425        - `"incomplete"`74267427      - `type: "shell_call"`74287429        The type of the item. Always `shell_call`.74307431        - `"shell_call"`74327433      - `caller: optional object { type }  or object { caller_id, type }  or null`74347435        The execution context that produced this tool call.74367437        - `Direct object { type }`74387439          - `type: "direct"`74407441            - `"direct"`74427443        - `Program object { caller_id, type }`74447445          - `caller_id: string`74467447            The call ID of the program item that produced this tool call.74487449          - `type: "program"`74507451            - `"program"`74527453      - `created_by: optional string`74547455        The ID of the entity that created this tool call.74567457    - `ShellCallOutput object { id, call_id, max_output_length, 5 more }`74587459      The output of a shell tool call that was emitted.74607461      - `id: string`74627463        The unique ID of the shell call output. Populated when this item is returned via API.74647465      - `call_id: string`74667467        The unique ID of the shell tool call generated by the model.74687469      - `max_output_length: number or null`74707471        The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.74727473      - `output: array of object { outcome, stderr, stdout, created_by }`74747475        An array of shell call output contents74767477        - `outcome: object { type }  or object { exit_code, type }`74787479          Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.74807481          - `Timeout object { type }`74827483            Indicates that the shell call exceeded its configured time limit.74847485            - `type: "timeout"`74867487              The outcome type. Always `timeout`.74887489              - `"timeout"`74907491          - `Exit object { exit_code, type }`74927493            Indicates that the shell commands finished and returned an exit code.74947495            - `exit_code: number`74967497              Exit code from the shell process.74987499            - `type: "exit"`75007501              The outcome type. Always `exit`.75027503              - `"exit"`75047505        - `stderr: string`75067507          The standard error output that was captured.75087509        - `stdout: string`75107511          The standard output that was captured.75127513        - `created_by: optional string`75147515          The identifier of the actor that created the item.75167517      - `status: "in_progress" or "completed" or "incomplete"`75187519        The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.75207521        - `"in_progress"`75227523        - `"completed"`75247525        - `"incomplete"`75267527      - `type: "shell_call_output"`75287529        The type of the shell call output. Always `shell_call_output`.75307531        - `"shell_call_output"`75327533      - `caller: optional object { type }  or object { caller_id, type }  or null`75347535        The execution context that produced this tool call.75367537        - `Direct object { type }`75387539          - `type: "direct"`75407541            - `"direct"`75427543        - `Program object { caller_id, type }`75447545          - `caller_id: string`75467547            The call ID of the program item that produced this tool call.75487549          - `type: "program"`75507551            - `"program"`75527553      - `created_by: optional string`75547555        The identifier of the actor that created the item.75567557    - `ApplyPatchCall object { id, call_id, operation, 4 more }`75587559      A tool call that applies file diffs by creating, deleting, or updating files.75607561      - `id: string`75627563        The unique ID of the apply patch tool call. Populated when this item is returned via API.75647565      - `call_id: string`75667567        The unique ID of the apply patch tool call generated by the model.75687569      - `operation: object { diff, path, type }  or object { path, type }  or object { diff, path, type }`75707571        One of the create_file, delete_file, or update_file operations applied via apply_patch.75727573        - `CreateFile object { diff, path, type }`75747575          Instruction describing how to create a file via the apply_patch tool.75767577          - `diff: string`75787579            Diff to apply.75807581          - `path: string`75827583            Path of the file to create.75847585          - `type: "create_file"`75867587            Create a new file with the provided diff.75887589            - `"create_file"`75907591        - `DeleteFile object { path, type }`75927593          Instruction describing how to delete a file via the apply_patch tool.75947595          - `path: string`75967597            Path of the file to delete.75987599          - `type: "delete_file"`76007601            Delete the specified file.76027603            - `"delete_file"`76047605        - `UpdateFile object { diff, path, type }`76067607          Instruction describing how to update a file via the apply_patch tool.76087609          - `diff: string`76107611            Diff to apply.76127613          - `path: string`76147615            Path of the file to update.76167617          - `type: "update_file"`76187619            Update an existing file with the provided diff.76207621            - `"update_file"`76227623      - `status: "in_progress" or "completed"`76247625        The status of the apply patch tool call. One of `in_progress` or `completed`.76267627        - `"in_progress"`76287629        - `"completed"`76307631      - `type: "apply_patch_call"`76327633        The type of the item. Always `apply_patch_call`.76347635        - `"apply_patch_call"`76367637      - `caller: optional object { type }  or object { caller_id, type }  or null`76387639        The execution context that produced this tool call.76407641        - `Direct object { type }`76427643          - `type: "direct"`76447645            - `"direct"`76467647        - `Program object { caller_id, type }`76487649          - `caller_id: string`76507651            The call ID of the program item that produced this tool call.76527653          - `type: "program"`76547655            - `"program"`76567657      - `created_by: optional string`76587659        The ID of the entity that created this tool call.76607661    - `ApplyPatchCallOutput object { id, call_id, status, 4 more }`76627663      The output emitted by an apply patch tool call.76647665      - `id: string`76667667        The unique ID of the apply patch tool call output. Populated when this item is returned via API.76687669      - `call_id: string`76707671        The unique ID of the apply patch tool call generated by the model.76727673      - `status: "completed" or "failed"`76747675        The status of the apply patch tool call output. One of `completed` or `failed`.76767677        - `"completed"`76787679        - `"failed"`76807681      - `type: "apply_patch_call_output"`76827683        The type of the item. Always `apply_patch_call_output`.76847685        - `"apply_patch_call_output"`76867687      - `caller: optional object { type }  or object { caller_id, type }  or null`76887689        The execution context that produced this tool call.76907691        - `Direct object { type }`76927693          - `type: "direct"`76947695            - `"direct"`76967697        - `Program object { caller_id, type }`76987699          - `caller_id: string`77007701            The call ID of the program item that produced this tool call.77027703          - `type: "program"`77047705            - `"program"`77067707      - `created_by: optional string`77087709        The ID of the entity that created this tool call output.77107711      - `output: optional string or null`77127713        Optional textual output returned by the apply patch tool.77147715    - `McpCall object { id, arguments, name, 6 more }`77167717      An invocation of a tool on an MCP server.77187719      - `id: string`77207721        The unique ID of the tool call.77227723      - `arguments: string`77247725        A JSON string of the arguments passed to the tool.77267727      - `name: string`77287729        The name of the tool that was run.77307731      - `server_label: string`77327733        The label of the MCP server running the tool.77347735      - `type: "mcp_call"`77367737        The type of the item. Always `mcp_call`.77387739        - `"mcp_call"`77407741      - `approval_request_id: optional string or null`77427743        Unique identifier for the MCP tool call approval request.7744        Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.77457746      - `error: optional McpToolCallError or null`77477748        The error from the tool call, if any.77497750      - `output: optional string or null`77517752        The output from the tool call.77537754      - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`77557756        The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.77577758        - `"in_progress"`77597760        - `"completed"`77617762        - `"incomplete"`77637764        - `"calling"`77657766        - `"failed"`77677768    - `McpListTools object { id, server_label, tools, 2 more }`77697770      A list of tools available on an MCP server.77717772      - `id: string`77737774        The unique ID of the list.77757776      - `server_label: string`77777778        The label of the MCP server.77797780      - `tools: array of object { input_schema, name, annotations, description }`77817782        The tools available on the server.77837784        - `input_schema: unknown`77857786          The JSON schema describing the tool's input.77877788        - `name: string`77897790          The name of the tool.77917792        - `annotations: optional unknown or null`77937794          Additional annotations about the tool.77957796        - `description: optional string or null`77977798          The description of the tool.77997800      - `type: "mcp_list_tools"`78017802        The type of the item. Always `mcp_list_tools`.78037804        - `"mcp_list_tools"`78057806      - `error: optional string or null`78077808        Error message if the server could not list tools.78097810    - `McpApprovalRequest object { id, arguments, name, 2 more }`78117812      A request for human approval of a tool invocation.78137814      - `id: string`78157816        The unique ID of the approval request.78177818      - `arguments: string`78197820        A JSON string of arguments for the tool.78217822      - `name: string`78237824        The name of the tool to run.78257826      - `server_label: string`78277828        The label of the MCP server making the request.78297830      - `type: "mcp_approval_request"`78317832        The type of the item. Always `mcp_approval_request`.78337834        - `"mcp_approval_request"`78357836    - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`78377838      A response to an MCP approval request.78397840      - `id: string`78417842        The unique ID of the approval response78437844      - `approval_request_id: string`78457846        The ID of the approval request being answered.78477848      - `approve: boolean`78497850        Whether the request was approved.78517852      - `type: "mcp_approval_response"`78537854        The type of the item. Always `mcp_approval_response`.78557856        - `"mcp_approval_response"`78577858      - `reason: optional string or null`78597860        Optional reason for the decision.78617862    - `CustomToolCall object { call_id, input, name, 5 more }`78637864      A call to a custom tool created by the model.78657866      - `call_id: string`78677868        An identifier used to map this custom tool call to a tool call output.78697870      - `input: string`78717872        The input for the custom tool call generated by the model.78737874      - `name: string`78757876        The name of the custom tool being called.78777878      - `type: "custom_tool_call"`78797880        The type of the custom tool call. Always `custom_tool_call`.78817882        - `"custom_tool_call"`78837884      - `id: optional string`78857886        The unique ID of the custom tool call in the OpenAI platform.78877888      - `async: optional boolean`78897890        Whether the custom tool call runs asynchronously.78917892      - `caller: optional object { type }  or object { caller_id, type }  or null`78937894        The execution context that produced this tool call.78957896        - `Direct object { type }`78977898          - `type: "direct"`78997900            - `"direct"`79017902        - `Program object { caller_id, type }`79037904          - `caller_id: string`79057906            The call ID of the program item that produced this tool call.79077908          - `type: "program"`79097910            - `"program"`79117912      - `namespace: optional string`79137914        The namespace of the custom tool being called.79157916    - `CustomToolCallOutput object { id, call_id, output, 4 more }`79177918      - `id: string`79197920        The unique ID of the custom tool call output item.79217922      - `call_id: string`79237924        The call ID, used to map this custom tool call output to a custom tool call.79257926      - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`79277928        The output from the custom tool call generated by your code.7929        Can be a string or an list of output content.79307931        - `StringOutput = string`79327933          A string of the output of the custom tool call.79347935        - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`79367937          Text, image, or file output of the custom tool call.79387939          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`79407941            A text input to the model.79427943          - `ResponseInputImage object { detail, type, file_id, 2 more }`79447945            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).79467947          - `ResponseInputFile object { type, detail, file_data, 4 more }`79487949            A file input to the model.79507951      - `status: "in_progress" or "completed" or "incomplete"`79527953        The status of the item. One of `in_progress`, `completed`, or7954        `incomplete`. Populated when items are returned via API.79557956        - `"in_progress"`79577958        - `"completed"`79597960        - `"incomplete"`79617962      - `type: "custom_tool_call_output"`79637964        The type of the custom tool call output. Always `custom_tool_call_output`.79657966        - `"custom_tool_call_output"`79677968      - `caller: optional object { type }  or object { caller_id, type }  or null`79697970        The execution context that produced this tool call.79717972        - `Direct object { type }`79737974          - `type: "direct"`79757976            The caller type. Always `direct`.79777978            - `"direct"`79797980        - `Program object { caller_id, type }`79817982          - `caller_id: string`79837984            The call ID of the program item that produced this tool call.79857986          - `type: "program"`79877988            The caller type. Always `program`.79897990            - `"program"`79917992      - `created_by: optional string`79937994        The identifier of the actor that created the item.79957996  - `parallel_tool_calls: boolean`79977998    Whether to allow the model to run tool calls in parallel.79998000  - `temperature: number or null`80018002    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.8003    We generally recommend altering this or `top_p` but not both.80048005  - `tool_choice: ToolChoiceOptions or ToolChoiceAllowed or ToolChoiceTypes or 6 more`80068007    How the model should select which tool (or tools) to use when generating8008    a response. See the `tools` parameter to see how to specify which tools8009    the model can call.80108011    - `ToolChoiceOptions = "none" or "auto" or "required"`80128013      Controls which (if any) tool is called by the model.80148015      `none` means the model will not call any tool and instead generates a message.80168017      `auto` means the model can pick between generating a message or calling one or8018      more tools.80198020      `required` means the model must call one or more tools.80218022      - `"none"`80238024      - `"auto"`80258026      - `"required"`80278028    - `ToolChoiceAllowed object { mode, tools, type }`80298030      Constrains the tools available to the model to a pre-defined set.80318032      - `mode: "auto" or "required"`80338034        Constrains the tools available to the model to a pre-defined set.80358036        `auto` allows the model to pick from among the allowed tools and generate a8037        message.80388039        `required` requires the model to call one or more of the allowed tools.80408041        - `"auto"`80428043        - `"required"`80448045      - `tools: array of map[unknown]`80468047        A list of tool definitions that the model should be allowed to call.80488049        For the Responses API, the list of tool definitions might look like:80508051        ```json8052        [8053          { "type": "function", "name": "get_weather" },8054          { "type": "mcp", "server_label": "deepwiki" },8055          { "type": "image_generation" }8056        ]8057        ```80588059      - `type: "allowed_tools"`80608061        Allowed tool configuration type. Always `allowed_tools`.80628063        - `"allowed_tools"`80648065    - `ToolChoiceTypes object { type }`80668067      Indicates that the model should use a built-in tool to generate a response.8068      [Learn more about built-in tools](/api/docs/guides/tools).80698070      - `type: "file_search" or "web_search_preview" or "computer" or 5 more`80718072        The type of hosted tool the model should to use. Learn more about8073        [built-in tools](/api/docs/guides/tools).80748075        Allowed values are:80768077        - `file_search`8078        - `web_search_preview`8079        - `computer`8080        - `computer_use_preview`8081        - `computer_use`8082        - `code_interpreter`8083        - `image_generation`80848085        - `"file_search"`80868087        - `"web_search_preview"`80888089        - `"computer"`80908091        - `"computer_use_preview"`80928093        - `"computer_use"`80948095        - `"web_search_preview_2025_03_11"`80968097        - `"image_generation"`80988099        - `"code_interpreter"`81008101    - `ToolChoiceFunction object { name, type }`81028103      Use this option to force the model to call a specific function.81048105      - `name: string`81068107        The name of the function to call.81088109      - `type: "function"`81108111        For function calling, the type is always `function`.81128113        - `"function"`81148115    - `ToolChoiceMcp object { server_label, type, name }`81168117      Use this option to force the model to call a specific tool on a remote MCP server.81188119      - `server_label: string`81208121        The label of the MCP server to use.81228123      - `type: "mcp"`81248125        For MCP tools, the type is always `mcp`.81268127        - `"mcp"`81288129      - `name: optional string or null`81308131        The name of the tool to call on the server.81328133    - `ToolChoiceCustom object { name, type }`81348135      Use this option to force the model to call a specific custom tool.81368137      - `name: string`81388139        The name of the custom tool to call.81408141      - `type: "custom"`81428143        For custom tool calling, the type is always `custom`.81448145        - `"custom"`81468147    - `SpecificProgrammaticToolCallingParam object { type }`81488149      - `type: "programmatic_tool_calling"`81508151        The tool to call. Always `programmatic_tool_calling`.81528153        - `"programmatic_tool_calling"`81548155    - `ToolChoiceApplyPatch object { type }`81568157      Forces the model to call the apply_patch tool when executing a tool call.81588159      - `type: "apply_patch"`81608161        The tool to call. Always `apply_patch`.81628163        - `"apply_patch"`81648165    - `ToolChoiceShell object { type }`81668167      Forces the model to call the shell tool when a tool call is required.81688169      - `type: "shell"`81708171        The tool to call. Always `shell`.81728173        - `"shell"`81748175  - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`81768177    An array of tools the model may call while generating a response. You8178    can specify which tool to use by setting the `tool_choice` parameter.81798180    We support the following categories of tools:81818182    - **Built-in tools**: Tools that are provided by OpenAI that extend the8183      model's capabilities, like [web search](/api/docs/guides/tools-web-search)8184      or [file search](/api/docs/guides/tools-file-search). Learn more about8185      [built-in tools](/api/docs/guides/tools).8186    - **MCP Tools**: Integrations with third-party systems via custom MCP servers8187      or predefined connectors such as Google Drive and SharePoint. Learn more about8188      [MCP Tools](/api/docs/guides/tools-connectors-mcp).8189    - **Function calls (custom tools)**: Functions that are defined by you,8190      enabling the model to call your own code with strongly typed arguments8191      and outputs. Learn more about8192      [function calling](/api/docs/guides/function-calling). You can also use8193      custom tools to call your own code.81948195    - `Function object { name, parameters, strict, 6 more }`81968197      Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).81988199      - `name: string`82008201        The name of the function to call.82028203      - `parameters: map[unknown] or null`82048205        A JSON schema object describing the parameters of the function.82068207      - `strict: boolean or null`82088209        Whether strict parameter validation is enforced for this function tool.82108211      - `type: "function"`82128213        The type of the function tool. Always `function`.82148215        - `"function"`82168217      - `allowed_callers: optional array of "direct" or "programmatic" or null`82188219        The tool invocation context(s).82208221        - `"direct"`82228223        - `"programmatic"`82248225      - `async: optional boolean`82268227      - `defer_loading: optional boolean`82288229        Whether this function is deferred and loaded via tool search.82308231      - `description: optional string or null`82328233        A description of the function. Used by the model to determine whether or not to call the function.82348235      - `output_schema: optional map[unknown] or null`82368237        A JSON schema object describing the JSON value encoded in string outputs for this function.82388239    - `FileSearch object { type, vector_store_ids, filters, 2 more }`82408241      A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).82428243      - `type: "file_search"`82448245        The type of the file search tool. Always `file_search`.82468247        - `"file_search"`82488249      - `vector_store_ids: array of string`82508251        The IDs of the vector stores to search.82528253      - `filters: optional ComparisonFilter or CompoundFilter or null`82548255        A filter to apply.82568257        - `ComparisonFilter object { key, type, value }`82588259          A filter used to compare a specified attribute key to a given value using a defined comparison operation.82608261        - `CompoundFilter object { filters, type }`82628263          Combine multiple filters using `and` or `or`.82648265      - `max_num_results: optional number`82668267        The maximum number of results to return. This number should be between 1 and 50 inclusive.82688269      - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`82708271        Ranking options for search.82728273        - `hybrid_search: optional object { embedding_weight, text_weight }`82748275          Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.82768277          - `embedding_weight: number`82788279            The weight of the embedding in the reciprocal ranking fusion.82808281          - `text_weight: number`82828283            The weight of the text in the reciprocal ranking fusion.82848285        - `ranker: optional "auto" or "default-2024-11-15"`82868287          The ranker to use for the file search.82888289          - `"auto"`82908291          - `"default-2024-11-15"`82928293        - `score_threshold: optional number`82948295          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.82968297    - `Computer object { type }`82988299      A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).83008301      - `type: "computer"`83028303        The type of the computer tool. Always `computer`.83048305        - `"computer"`83068307    - `ComputerUsePreview object { display_height, display_width, environment, type }`83088309      A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).83108311      - `display_height: number`83128313        The height of the computer display.83148315      - `display_width: number`83168317        The width of the computer display.83188319      - `environment: "windows" or "mac" or "linux" or 2 more`83208321        The type of computer environment to control.83228323        - `"windows"`83248325        - `"mac"`83268327        - `"linux"`83288329        - `"ubuntu"`83308331        - `"browser"`83328333      - `type: "computer_use_preview"`83348335        The type of the computer use tool. Always `computer_use_preview`.83368337        - `"computer_use_preview"`83388339    - `WebSearch object { type, external_web_access, filters, 2 more }`83408341      Search the Internet for sources related to the prompt. Learn more about the8342      [web search tool](/api/docs/guides/tools-web-search).83438344      - `type: "web_search" or "web_search_2025_08_26"`83458346        The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.83478348        - `"web_search"`83498350        - `"web_search_2025_08_26"`83518352      - `external_web_access: optional boolean`83538354        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.83558356      - `filters: optional object { allowed_domains }  or null`83578358        Filters for the search.83598360        - `allowed_domains: optional array of string or null`83618362          Allowed domains for the search. If not provided, all domains are allowed.8363          Subdomains of the provided domains are allowed as well.83648365          Example: `["pubmed.ncbi.nlm.nih.gov"]`83668367      - `search_context_size: optional "low" or "medium" or "high"`83688369        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.83708371        - `"low"`83728373        - `"medium"`83748375        - `"high"`83768377      - `user_location: optional object { city, country, region, 2 more }  or null`83788379        The approximate location of the user.83808381        - `city: optional string or null`83828383          Free text input for the city of the user, e.g. `San Francisco`.83848385        - `country: optional string or null`83868387          The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.83888389        - `region: optional string or null`83908391          Free text input for the region of the user, e.g. `California`.83928393        - `timezone: optional string or null`83948395          The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.83968397        - `type: optional "approximate"`83988399          The type of location approximation. Always `approximate`.84008401          - `"approximate"`84028403    - `Mcp object { server_label, type, allowed_callers, 9 more }`84048405      Give the model access to additional tools via remote Model Context Protocol8406      (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).84078408      - `server_label: string`84098410        A label for this MCP server, used to identify it in tool calls.84118412      - `type: "mcp"`84138414        The type of the MCP tool. Always `mcp`.84158416        - `"mcp"`84178418      - `allowed_callers: optional array of "direct" or "programmatic" or null`84198420        The tool invocation context(s).84218422        - `"direct"`84238424        - `"programmatic"`84258426      - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`84278428        List of allowed tool names or a filter object.84298430        - `McpAllowedTools = array of string`84318432          A string array of allowed tool names84338434        - `McpToolFilter object { read_only, tool_names }`84358436          A filter object to specify which tools are allowed.84378438          - `read_only: optional boolean`84398440            Indicates whether or not a tool modifies data or is read-only. If an8441            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8442            it will match this filter.84438444          - `tool_names: optional array of string`84458446            List of allowed tool names.84478448      - `authorization: optional string`84498450        An OAuth access token that can be used with a remote MCP server, either8451        with a custom MCP server URL or a service connector. Your application8452        must handle the OAuth authorization flow and provide the token here.84538454      - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`84558456        Identifier for service connectors, like those available in ChatGPT. One of8457        `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more8458        about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).84598460        This field is deprecated for models released after September 1, 2026.8461        Use `server_url` to connect to a remote MCP server, or `tunnel_id` to8462        connect through a Secure MCP Tunnel.84638464        Currently supported `connector_id` values are:84658466        - Dropbox: `connector_dropbox`8467        - Gmail: `connector_gmail`8468        - Google Calendar: `connector_googlecalendar`8469        - Google Drive: `connector_googledrive`8470        - Microsoft Teams: `connector_microsoftteams`8471        - Outlook Calendar: `connector_outlookcalendar`8472        - Outlook Email: `connector_outlookemail`8473        - SharePoint: `connector_sharepoint`84748475        - `"connector_dropbox"`84768477        - `"connector_gmail"`84788479        - `"connector_googlecalendar"`84808481        - `"connector_googledrive"`84828483        - `"connector_microsoftteams"`84848485        - `"connector_outlookcalendar"`84868487        - `"connector_outlookemail"`84888489        - `"connector_sharepoint"`84908491      - `defer_loading: optional boolean`84928493        Whether this MCP tool is deferred and discovered via tool search.84948495      - `headers: optional map[string] or null`84968497        Optional HTTP headers to send to the MCP server. Use for authentication8498        or other purposes.84998500      - `require_approval: optional object { always, never }  or "always" or "never" or null`85018502        Specify which of the MCP server's tools require approval.85038504        - `McpToolApprovalFilter object { always, never }`85058506          Specify which of the MCP server's tools require approval. Can be8507          `always`, `never`, or a filter object associated with tools8508          that require approval.85098510          - `always: optional object { read_only, tool_names }`85118512            A filter object to specify which tools are allowed.85138514            - `read_only: optional boolean`85158516              Indicates whether or not a tool modifies data or is read-only. If an8517              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8518              it will match this filter.85198520            - `tool_names: optional array of string`85218522              List of allowed tool names.85238524          - `never: optional object { read_only, tool_names }`85258526            A filter object to specify which tools are allowed.85278528            - `read_only: optional boolean`85298530              Indicates whether or not a tool modifies data or is read-only. If an8531              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8532              it will match this filter.85338534            - `tool_names: optional array of string`85358536              List of allowed tool names.85378538        - `McpToolApprovalSetting = "always" or "never"`85398540          Specify a single approval policy for all tools. One of `always` or8541          `never`. When set to `always`, all tools will require approval. When8542          set to `never`, all tools will not require approval.85438544          - `"always"`85458546          - `"never"`85478548      - `server_description: optional string`85498550        Optional description of the MCP server, used to provide more context.85518552      - `server_url: optional string`85538554        The URL for the MCP server. One of `server_url`, `connector_id`, or8555        `tunnel_id` must be provided.85568557      - `tunnel_id: optional string`85588559        The Secure MCP Tunnel ID to use instead of a direct server URL. One of8560        `server_url`, `connector_id`, or `tunnel_id` must be provided.85618562    - `CodeInterpreter object { container, type, allowed_callers }`85638564      A tool that runs Python code to help generate a response to a prompt.85658566      - `container: string or object { type, file_ids, memory_limit, network_policy }`85678568        The code interpreter container. Can be a container ID or an object that8569        specifies uploaded file IDs to make available to your code, along with an8570        optional `memory_limit` setting.85718572        - `string`85738574          The container ID.85758576        - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`85778578          Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.85798580          - `type: "auto"`85818582            Always `auto`.85838584            - `"auto"`85858586          - `file_ids: optional array of string`85878588            An optional list of uploaded files to make available to your code.85898590          - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`85918592            The memory limit for the code interpreter container.85938594            - `"1g"`85958596            - `"4g"`85978598            - `"16g"`85998600            - `"64g"`86018602          - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`86038604            Network access policy for the container.86058606            - `ContainerNetworkPolicyDisabled object { type }`86078608            - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`86098610      - `type: "code_interpreter"`86118612        The type of the code interpreter tool. Always `code_interpreter`.86138614        - `"code_interpreter"`86158616      - `allowed_callers: optional array of "direct" or "programmatic" or null`86178618        The tool invocation context(s).86198620        - `"direct"`86218622        - `"programmatic"`86238624    - `ProgrammaticToolCalling object { type }`86258626      - `type: "programmatic_tool_calling"`86278628        The type of the tool. Always `programmatic_tool_calling`.86298630        - `"programmatic_tool_calling"`86318632    - `ImageGeneration object { type, action, background, 9 more }`86338634      A tool that generates images using the GPT image models.86358636      - `type: "image_generation"`86378638        The type of the image generation tool. Always `image_generation`.86398640        - `"image_generation"`86418642      - `action: optional "generate" or "edit" or "auto"`86438644        Whether to generate a new image or edit an existing image. Default: `auto`.86458646        - `"generate"`86478648        - `"edit"`86498650        - `"auto"`86518652      - `background: optional "transparent" or "opaque" or "auto"`86538654        Set the background of the generated image. One of `transparent`, `opaque`,8655        or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including8656        their `2026-09-08` snapshots, support `opaque` and `transparent`8657        backgrounds. Transparent backgrounds are available for supported GPT Image8658        models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in8659        preview. When using `transparent`, set the output format to `png` or `webp`.8660        Default: `auto`.86618662        - `"transparent"`86638664        - `"opaque"`86658666        - `"auto"`86678668      - `input_fidelity: optional "high" or "low" or null`86698670        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`.86718672        - `"high"`86738674        - `"low"`86758676      - `input_image_mask: optional object { file_id, image_url }`86778678        Optional mask for inpainting. Contains `image_url`8679        (string, optional) and `file_id` (string, optional).86808681        - `file_id: optional string`86828683          File ID for the mask image.86848685        - `image_url: optional string`86868687          Base64-encoded mask image.86888689      - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`86908691        The image generation model to use. One of `gpt-image-1`,8692        `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,8693        `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,8694        `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,8695        `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:8696        `gpt-image-1`.86978698        - `string`86998700        - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`87018702          The image generation model to use. One of `gpt-image-1`,8703          `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,8704          `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,8705          `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,8706          `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:8707          `gpt-image-1`.87088709          - `"gpt-image-1"`87108711          - `"gpt-image-1-mini"`87128713          - `"gpt-image-1.5"`87148715          - `"gpt-image-2"`87168717          - `"gpt-image-2-2026-04-21"`87188719          - `"gpt-image-2.5-sunburst"`87208721          - `"gpt-image-2.5-sunburst-2026-09-08"`87228723          - `"gpt-image-2.5-flare"`87248725          - `"gpt-image-2.5-flare-2026-09-08"`87268727      - `moderation: optional "auto" or "low"`87288729        Moderation level for the generated image. Default: `auto`.87308731        - `"auto"`87328733        - `"low"`87348735      - `output_compression: optional number`87368737        Compression level for the output image. Default: 100.87388739      - `output_format: optional "png" or "webp" or "jpeg"`87408741        The output format of the generated image. One of `png`, `webp`, or8742        `jpeg`. Default: `png`.87438744        - `"png"`87458746        - `"webp"`87478748        - `"jpeg"`87498750      - `partial_images: optional number`87518752        Number of partial images to generate in streaming mode, from 0 (default value) to 3.87538754      - `quality: optional "low" or "medium" or "high" or 3 more`87558756        The quality of the generated image. The GPT image models support `low`,8757        `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,8758        including their `2026-09-08` snapshots, also support `xhigh` and `max`.8759        Default: `auto`.87608761        - `"low"`87628763        - `"medium"`87648765        - `"high"`87668767        - `"xhigh"`87688769        - `"max"`87708771        - `"auto"`87728773      - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`87748775        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`.87768777        - `string`87788779        - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`87808781          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`.87828783          - `"1024x1024"`87848785          - `"1024x1536"`87868787          - `"1536x1024"`87888789          - `"auto"`87908791    - `LocalShell object { type }`87928793      A tool that allows the model to execute shell commands in a local environment.87948795      - `type: "local_shell"`87968797        The type of the local shell tool. Always `local_shell`.87988799        - `"local_shell"`88008801    - `Shell object { type, allowed_callers, environment }`88028803      A tool that allows the model to execute shell commands.88048805      - `type: "shell"`88068807        The type of the shell tool. Always `shell`.88088809        - `"shell"`88108811      - `allowed_callers: optional array of "direct" or "programmatic" or null`88128813        The tool invocation context(s).88148815        - `"direct"`88168817        - `"programmatic"`88188819      - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`88208821        - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`88228823        - `LocalEnvironment object { type, skills }`88248825        - `ContainerReference object { container_id, type }`88268827    - `Custom object { name, type, allowed_callers, 4 more }`88288829      A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)88308831      - `name: string`88328833        The name of the custom tool, used to identify it in tool calls.88348835      - `type: "custom"`88368837        The type of the custom tool. Always `custom`.88388839        - `"custom"`88408841      - `allowed_callers: optional array of "direct" or "programmatic" or null`88428843        The tool invocation context(s).88448845        - `"direct"`88468847        - `"programmatic"`88488849      - `async: optional boolean`88508851        Whether the tool response can be returned asynchronously versus immediately returned on next response creation.88528853      - `defer_loading: optional boolean`88548855        Whether this tool should be deferred and discovered via tool search.88568857      - `description: optional string`88588859        Optional description of the custom tool, used to provide more context.88608861      - `format: optional CustomToolInputFormat`88628863        The input format for the custom tool. Default is unconstrained text.88648865    - `Namespace object { description, name, tools, type }`88668867      Groups function/custom tools under a shared namespace.88688869      - `description: string`88708871        A description of the namespace shown to the model.88728873      - `name: string`88748875        The namespace name used in tool calls (for example, `crm`).88768877      - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`88788879        The function/custom tools available inside this namespace.88808881        - `Function object { name, type, allowed_callers, 6 more }`88828883          - `name: string`88848885          - `type: "function"`88868887            - `"function"`88888889          - `allowed_callers: optional array of "direct" or "programmatic" or null`88908891            The tool invocation context(s).88928893            - `"direct"`88948895            - `"programmatic"`88968897          - `async: optional boolean`88988899            Whether the tool response can be returned asynchronously versus immediately returned on next response creation.89008901          - `defer_loading: optional boolean`89028903            Whether this function should be deferred and discovered via tool search.89048905          - `description: optional string or null`89068907          - `output_schema: optional map[unknown] or null`89088909            A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.89108911          - `parameters: optional unknown or null`89128913          - `strict: optional boolean or null`89148915            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.89168917        - `Custom object { name, type, allowed_callers, 4 more }`89188919          A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)89208921          - `name: string`89228923            The name of the custom tool, used to identify it in tool calls.89248925          - `type: "custom"`89268927            The type of the custom tool. Always `custom`.89288929            - `"custom"`89308931          - `allowed_callers: optional array of "direct" or "programmatic" or null`89328933            The tool invocation context(s).89348935            - `"direct"`89368937            - `"programmatic"`89388939          - `async: optional boolean`89408941            Whether the tool response can be returned asynchronously versus immediately returned on next response creation.89428943          - `defer_loading: optional boolean`89448945            Whether this tool should be deferred and discovered via tool search.89468947          - `description: optional string`89488949            Optional description of the custom tool, used to provide more context.89508951          - `format: optional CustomToolInputFormat`89528953            The input format for the custom tool. Default is unconstrained text.89548955      - `type: "namespace"`89568957        The type of the tool. Always `namespace`.89588959        - `"namespace"`89608961    - `ToolSearch object { type, description, execution, parameters }`89628963      Hosted or BYOT tool search configuration for deferred tools.89648965      - `type: "tool_search"`89668967        The type of the tool. Always `tool_search`.89688969        - `"tool_search"`89708971      - `description: optional string or null`89728973        Description shown to the model for a client-executed tool search tool.89748975      - `execution: optional "server" or "client"`89768977        Whether tool search is executed by the server or by the client.89788979        - `"server"`89808981        - `"client"`89828983      - `parameters: optional unknown or null`89848985        Parameter schema for a client-executed tool search tool.89868987    - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`89888989      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).89908991      - `type: "web_search_preview" or "web_search_preview_2025_03_11"`89928993        The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.89948995        - `"web_search_preview"`89968997        - `"web_search_preview_2025_03_11"`89988999      - `search_content_types: optional array of "text" or "image"`90009001        - `"text"`90029003        - `"image"`90049005      - `search_context_size: optional "low" or "medium" or "high"`90069007        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.90089009        - `"low"`90109011        - `"medium"`90129013        - `"high"`90149015      - `user_location: optional object { type, city, country, 2 more }  or null`90169017        The user's location.90189019        - `type: "approximate"`90209021          The type of location approximation. Always `approximate`.90229023          - `"approximate"`90249025        - `city: optional string or null`90269027          Free text input for the city of the user, e.g. `San Francisco`.90289029        - `country: optional string or null`90309031          The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.90329033        - `region: optional string or null`90349035          Free text input for the region of the user, e.g. `California`.90369037        - `timezone: optional string or null`90389039          The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.90409041    - `ApplyPatch object { type, allowed_callers }`90429043      Allows the assistant to create, delete, or update files using unified diffs.90449045      - `type: "apply_patch"`90469047        The type of the tool. Always `apply_patch`.90489049        - `"apply_patch"`90509051      - `allowed_callers: optional array of "direct" or "programmatic" or null`90529053        The tool invocation context(s).90549055        - `"direct"`90569057        - `"programmatic"`90589059  - `top_p: number or null`90609061    An alternative to sampling with temperature, called nucleus sampling,9062    where the model considers the results of the tokens with top_p probability9063    mass. So 0.1 means only the tokens comprising the top 10% probability mass9064    are considered.90659066    We generally recommend altering this or `temperature` but not both.90679068  - `background: optional boolean or null`90699070    Whether to run the model response in the background.9071    [Learn more](/api/docs/guides/background).90729073  - `completed_at: optional number or null`90749075    Unix timestamp (in seconds) of when this Response was completed.9076    Only present when the status is `completed`.90779078  - `conversation: optional object { id }  or null`90799080    The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.90819082    - `id: string`90839084      The unique ID of the conversation that this response was associated with.90859086  - `max_output_tokens: optional number or null`90879088    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).90899090  - `max_tool_calls: optional number or null`90919092    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.90939094  - `moderation: optional object { input, output }  or null`90959096    Moderation results for the response input and output, if moderated completions were requested.90979098    - `input: object { categories, category_applied_input_types, category_scores, 3 more }  or object { code, message, type }`90999100      Moderation for the response input.91019102      - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }`91039104        A moderation result produced for the response input or output.91059106        - `categories: map[boolean]`91079108          A dictionary of moderation categories to booleans, True if the input is flagged under this category.91099110        - `category_applied_input_types: map[array of "text" or "image"]`91119112          Which modalities of input are reflected by the score for each category.91139114          - `"text"`91159116          - `"image"`91179118        - `category_scores: map[number]`91199120          A dictionary of moderation categories to scores.91219122        - `flagged: boolean`91239124          A boolean indicating whether the content was flagged by any category.91259126        - `model: string`91279128          The moderation model that produced this result.91299130        - `type: "moderation_result"`91319132          The object type, which was always `moderation_result` for successful moderation results.91339134          - `"moderation_result"`91359136      - `Error object { code, message, type }`91379138        An error produced while attempting moderation for the response input or output.91399140        - `code: string`91419142          The error code.91439144        - `message: string`91459146          The error message.91479148        - `type: "error"`91499150          The object type, which was always `error` for moderation failures.91519152          - `"error"`91539154    - `output: object { categories, category_applied_input_types, category_scores, 3 more }  or object { code, message, type }`91559156      Moderation for the response output.91579158      - `ModerationResult object { categories, category_applied_input_types, category_scores, 3 more }`91599160        A moderation result produced for the response input or output.91619162        - `categories: map[boolean]`91639164          A dictionary of moderation categories to booleans, True if the input is flagged under this category.91659166        - `category_applied_input_types: map[array of "text" or "image"]`91679168          Which modalities of input are reflected by the score for each category.91699170          - `"text"`91719172          - `"image"`91739174        - `category_scores: map[number]`91759176          A dictionary of moderation categories to scores.91779178        - `flagged: boolean`91799180          A boolean indicating whether the content was flagged by any category.91819182        - `model: string`91839184          The moderation model that produced this result.91859186        - `type: "moderation_result"`91879188          The object type, which was always `moderation_result` for successful moderation results.91899190          - `"moderation_result"`91919192      - `Error object { code, message, type }`91939194        An error produced while attempting moderation for the response input or output.91959196        - `code: string`91979198          The error code.91999200        - `message: string`92019202          The error message.92039204        - `type: "error"`92059206          The object type, which was always `error` for moderation failures.92079208          - `"error"`92099210  - `output_text: optional string or null`92119212    SDK-only convenience property that contains the aggregated text output9213    from all `output_text` items in the `output` array, if any are present.9214    Supported in the Python and JavaScript SDKs.92159216  - `previous_response_id: optional string or null`92179218    The unique ID of the previous response to the model. Use this to9219    create multi-turn conversations. Learn more about9220    [conversation state](/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`.92219222  - `prompt: optional ResponsePrompt or null`92239224    Reference to a prompt template and its variables.9225    [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).92269227    - `id: string`92289229      The unique identifier of the prompt template to use.92309231    - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`92329233      Optional map of values to substitute in for variables in your9234      prompt. The substitution values can either be strings, or other9235      Response input types like images or files.92369237      - `string`92389239      - `ResponseInputText object { text, type, prompt_cache_breakpoint }`92409241        A text input to the model.92429243      - `ResponseInputImage object { detail, type, file_id, 2 more }`92449245        An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).92469247      - `ResponseInputFile object { type, detail, file_data, 4 more }`92489249        A file input to the model.92509251    - `version: optional string or null`92529253      Optional version of the prompt template.92549255  - `prompt_cache_diagnostics: optional object { cache_missed_tokens, reason, type, comparison_reusable_tokens }  or object { type }  or object { type }  or object { type }`92569257    Prompt cache diagnostics requested for this response.92589259    - `CacheMiss object { cache_missed_tokens, reason, type, comparison_reusable_tokens }`92609261      - `cache_missed_tokens: number`92629263        The estimated number of input tokens affected after the first detected divergence.92649265      - `reason: "model_changed" or "prompt_cache_key_changed" or "tools_changed" or 6 more`92669267        The reason prompt cache reuse did not occur.92689269        - `"model_changed"`92709271        - `"prompt_cache_key_changed"`92729273        - `"tools_changed"`92749275        - `"text_format_changed"`92769277        - `"reasoning_effort_changed"`92789279        - `"verbosity_changed"`92809281        - `"context_compacted"`92829283        - `"input_changed"`92849285        - `"service_tier_changed"`92869287      - `type: "cache_miss"`92889289        - `"cache_miss"`92909291      - `comparison_reusable_tokens: optional number`92929293        The raw token count of the reusable prefix in the compared response.92949295    - `CacheHit object { type }`92969297      - `type: "cache_hit"`92989299        - `"cache_hit"`93009301    - `ComparisonResponseNotFound object { type }`93029303      - `type: "comparison_response_not_found"`93049305        - `"comparison_response_not_found"`93069307    - `Unavailable object { type }`93089309      - `type: "unavailable"`93109311        - `"unavailable"`93129313  - `prompt_cache_key: optional string or null`93149315    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).93169317  - `prompt_cache_options: optional object { mode, ttl, comparison_response_id }`93189319    The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models.93209321    - `mode: "implicit" or "explicit"`93229323      Whether implicit prompt-cache breakpoints were enabled.93249325      - `"implicit"`93269327      - `"explicit"`93289329    - `ttl: "30m"`93309331      The minimum lifetime applied to each cache breakpoint.93329333      - `"30m"`93349335    - `comparison_response_id: optional string or null`93369337      The response ID supplied as the prompt cache diagnostics comparison.93389339  - `prompt_cache_retention: optional "in_memory" or "24h" or null`93409341    Deprecated. Use `prompt_cache_options.ttl` instead.93429343    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).9344    This field expresses a maximum retention policy, while9345    `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two9346    fields are independent and do not interact.9347    For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.93489349    For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy:93509351    - Organizations without ZDR enabled default to `24h`.9352    - Organizations with ZDR enabled default to `in_memory` when `prompt_cache_retention` is not specified.93539354    - `"in_memory"`93559356    - `"24h"`93579358  - `reasoning: optional Reasoning or null`93599360    Configuration options for9361    [reasoning models](/api/docs/guides/reasoning).93629363    - `context: optional "auto" or "current_turn" or "all_turns" or null`93649365      Controls which reasoning items are rendered back to the model on later turns.9366      If omitted or set to `auto`, the model determines the context mode. The9367      `gpt-5.6` model family defaults to `all_turns`; earlier models default to9368      `current_turn`.93699370      When returned on a response, this is the effective reasoning context mode9371      used for the response.93729373      - `"auto"`93749375      - `"current_turn"`93769377      - `"all_turns"`93789379    - `effort: optional ReasoningEffort or null`93809381      Constrains effort on reasoning for reasoning models. Currently supported9382      values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.9383      Reducing reasoning effort can result in faster responses and fewer tokens9384      used on reasoning in a response. Not all reasoning models support every9385      value. See the9386      [reasoning guide](/api/docs/guides/reasoning)9387      for model-specific support.93889389    - `generate_summary: optional "auto" or "concise" or "detailed" or null`93909391      **Deprecated:** use `summary` instead.93929393      A summary of the reasoning performed by the model. This can be9394      useful for debugging and understanding the model's reasoning process.9395      One of `auto`, `concise`, or `detailed`.93969397      - `"auto"`93989399      - `"concise"`94009401      - `"detailed"`94029403    - `mode: optional string or "standard" or "pro"`94049405      Controls the reasoning execution mode for the request.94069407      When returned on a response, this is the effective execution mode.94089409      - `string`94109411      - `"standard" or "pro"`94129413        Controls the reasoning execution mode for the request.94149415        When returned on a response, this is the effective execution mode.94169417        - `"standard"`94189419        - `"pro"`94209421    - `summary: optional "auto" or "concise" or "detailed" or null`94229423      A summary of the reasoning performed by the model. This can be9424      useful for debugging and understanding the model's reasoning process.9425      One of `auto`, `concise`, or `detailed`.94269427      `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.94289429      - `"auto"`94309431      - `"concise"`94329433      - `"detailed"`94349435  - `safety_identifier: optional string or null`94369437    A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.9438    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).94399440  - `service_tier: optional ServiceTier or null`94419442    Specifies the processing type used for serving the request.94439444    - 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'.9445    - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.9446    - If set to '[flex](/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier.9447    - 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.9448    - 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`.9449    - When not set, the default behavior is 'auto'.94509451    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.94529453    - `"auto"`94549455    - `"default"`94569457    - `"flex"`94589459    - `"scale"`94609461    - `"priority"`94629463    - `"fast"`94649465    - `"ultrafast"`94669467  - `status: optional ResponseStatus`94689469    The status of the response generation. One of `completed`, `failed`,9470    `in_progress`, `cancelled`, `queued`, or `incomplete`.94719472    - `"completed"`94739474    - `"failed"`94759476    - `"in_progress"`94779478    - `"cancelled"`94799480    - `"queued"`94819482    - `"incomplete"`94839484  - `text: optional ResponseTextConfig`94859486    Configuration options for a text response from the model. Can be plain9487    text or structured JSON data. Learn more:94889489    - [Text inputs and outputs](/api/docs/guides/text)9490    - [Structured Outputs](/api/docs/guides/structured-outputs)94919492    - `format: optional ResponseFormatTextConfig`94939494      An object specifying the format that the model must output.94959496      Configuring `{ "type": "json_schema" }` enables Structured Outputs,9497      which ensures the model will match your supplied JSON schema. Learn more in the9498      [Structured Outputs guide](/api/docs/guides/structured-outputs).94999500      The default format is `{ "type": "text" }` with no additional options.95019502      **Not recommended for gpt-4o and newer models:**95039504      Setting to `{ "type": "json_object" }` enables the older JSON mode, which9505      ensures the message the model generates is valid JSON. Using `json_schema`9506      is preferred for models that support it.95079508      - `ResponseFormatText object { type }`95099510        Default response format. Used to generate text responses.95119512        - `type: "text"`95139514          The type of response format being defined. Always `text`.95159516          - `"text"`95179518      - `ResponseFormatTextJSONSchemaConfig object { name, schema, type, 2 more }`95199520        JSON Schema response format. Used to generate structured JSON responses.9521        Learn more about [Structured Outputs](/api/docs/guides/structured-outputs).95229523        - `name: string`95249525          The name of the response format. Must be a-z, A-Z, 0-9, or contain9526          underscores and dashes, with a maximum length of 64.95279528        - `schema: map[unknown]`95299530          The schema for the response format, described as a JSON Schema object.9531          Learn how to build JSON schemas [here](https://json-schema.org/).95329533        - `type: "json_schema"`95349535          The type of response format being defined. Always `json_schema`.95369537          - `"json_schema"`95389539        - `description: optional string`95409541          A description of what the response format is for, used by the model to9542          determine how to respond in the format.95439544        - `strict: optional boolean or null`95459546          Whether to enable strict schema adherence when generating the output.9547          If set to true, the model will always follow the exact schema defined9548          in the `schema` field. Only a subset of JSON Schema is supported when9549          `strict` is `true`. To learn more, read the [Structured Outputs9550          guide](/api/docs/guides/structured-outputs).95519552      - `ResponseFormatJSONObject object { type }`95539554        JSON object response format. An older method of generating JSON responses.9555        Using `json_schema` is recommended for models that support it. Note that the9556        model will not generate JSON without a system or user message instructing it9557        to do so.95589559        - `type: "json_object"`95609561          The type of response format being defined. Always `json_object`.95629563          - `"json_object"`95649565    - `verbosity: optional "low" or "medium" or "high" or null`95669567      Constrains the verbosity of the model's response. Lower values will result in9568      more concise responses, while higher values will result in more verbose responses.9569      Currently supported values are `low`, `medium`, and `high`. The default is9570      `medium`.95719572      - `"low"`95739574      - `"medium"`95759576      - `"high"`95779578  - `top_logprobs: optional number or null`95799580    An integer between 0 and 20 specifying the maximum number of most likely9581    tokens to return at each token position, each with an associated log9582    probability. In some cases, the number of returned tokens may be fewer than9583    requested.95849585  - `truncation: optional "auto" or "disabled" or null`95869587    The truncation strategy to use for the model response.95889589    - `auto`: If the input to this Response exceeds9590      the model's context window size, the model will truncate the9591      response to fit the context window by dropping items from the beginning of the conversation.9592    - `disabled` (default): If the input size will exceed the context window9593      size for a model, the request will fail with a 400 error.95949595    - `"auto"`95969597    - `"disabled"`95989599  - `usage: optional ResponseUsage`96009601    Represents token usage details including input tokens, output tokens,9602    a breakdown of output tokens, and the total tokens used.96039604    - `input_tokens: number`96059606      The number of input tokens.96079608    - `input_tokens_details: object { cache_write_tokens, cached_tokens }`96099610      A detailed breakdown of the input tokens.96119612      - `cache_write_tokens: number`96139614        The number of input tokens that were written to the cache.96159616      - `cached_tokens: number`96179618        The number of tokens that were retrieved from the cache.9619        [More on prompt caching](/api/docs/guides/prompt-caching).96209621    - `output_tokens: number`96229623      The number of output tokens.96249625    - `output_tokens_details: object { reasoning_tokens }`96269627      A detailed breakdown of the output tokens.96289629      - `reasoning_tokens: number`96309631        The number of reasoning tokens.96329633    - `total_tokens: number`96349635      The total number of tokens used.96369637  - `user: optional string`96389639    This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.9640    A stable identifier for your end-users.9641    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).96429643### Example96449645```http9646curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \9647    -X POST \9648    -H "Authorization: Bearer $OPENAI_API_KEY"9649```96509651#### Response96529653```json9654{9655  "id": "id",9656  "created_at": 0,9657  "error": {9658    "code": "server_error",9659    "message": "message",9660    "misalignment": {9661      "detailed_explanation": "detailed_explanation",9662      "error_type": "potentially_unintended_data_transfer",9663      "steer": {9664        "message": "message"9665      }9666    }9667  },9668  "incomplete_details": {9669    "reason": "max_output_tokens"9670  },9671  "instructions": "string",9672  "metadata": {9673    "foo": "string"9674  },9675  "model": "gpt-6-astra",9676  "object": "response",9677  "output": [9678    {9679      "id": "id",9680      "content": [9681        {9682          "annotations": [9683            {9684              "file_id": "file_id",9685              "filename": "filename",9686              "index": 0,9687              "type": "file_citation"9688            }9689          ],9690          "logprobs": [9691            {9692              "token": "token",9693              "bytes": [9694                09695              ],9696              "logprob": 0,9697              "top_logprobs": [9698                {9699                  "token": "token",9700                  "bytes": [9701                    09702                  ],9703                  "logprob": 09704                }9705              ]9706            }9707          ],9708          "text": "text",9709          "type": "output_text"9710        }9711      ],9712      "role": "assistant",9713      "status": "in_progress",9714      "type": "message",9715      "phase": "commentary"9716    }9717  ],9718  "parallel_tool_calls": true,9719  "temperature": 1,9720  "tool_choice": "none",9721  "tools": [9722    {9723      "name": "name",9724      "parameters": {9725        "foo": "bar"9726      },9727      "strict": true,9728      "type": "function",9729      "allowed_callers": [9730        "direct"9731      ],9732      "async": true,9733      "defer_loading": true,9734      "description": "description",9735      "output_schema": {9736        "foo": "bar"9737      }9738    }9739  ],9740  "top_p": 1,9741  "background": true,9742  "completed_at": 0,9743  "conversation": {9744    "id": "id"9745  },9746  "max_output_tokens": 0,9747  "max_tool_calls": 0,9748  "moderation": {9749    "input": {9750      "categories": {9751        "foo": true9752      },9753      "category_applied_input_types": {9754        "foo": [9755          "text"9756        ]9757      },9758      "category_scores": {9759        "foo": 09760      },9761      "flagged": true,9762      "model": "model",9763      "type": "moderation_result"9764    },9765    "output": {9766      "categories": {9767        "foo": true9768      },9769      "category_applied_input_types": {9770        "foo": [9771          "text"9772        ]9773      },9774      "category_scores": {9775        "foo": 09776      },9777      "flagged": true,9778      "model": "model",9779      "type": "moderation_result"9780    }9781  },9782  "output_text": "output_text",9783  "previous_response_id": "previous_response_id",9784  "prompt": {9785    "id": "id",9786    "variables": {9787      "foo": "string"9788    },9789    "version": "version"9790  },9791  "prompt_cache_diagnostics": {9792    "cache_missed_tokens": 0,9793    "reason": "model_changed",9794    "type": "cache_miss",9795    "comparison_reusable_tokens": 09796  },9797  "prompt_cache_key": "prompt-cache-key-1234",9798  "prompt_cache_options": {9799    "mode": "implicit",9800    "ttl": "30m",9801    "comparison_response_id": "comparison_response_id"9802  },9803  "prompt_cache_retention": "in_memory",9804  "reasoning": {9805    "context": "auto",9806    "effort": "none",9807    "generate_summary": "auto",9808    "mode": "standard",9809    "summary": "auto"9810  },9811  "safety_identifier": "safety-identifier-1234",9812  "service_tier": "auto",9813  "status": "completed",9814  "text": {9815    "format": {9816      "type": "text"9817    },9818    "verbosity": "low"9819  },9820  "top_logprobs": 0,9821  "truncation": "auto",9822  "usage": {9823    "input_tokens": 0,9824    "input_tokens_details": {9825      "cache_write_tokens": 0,9826      "cached_tokens": 09827    },9828    "output_tokens": 0,9829    "output_tokens_details": {9830      "reasoning_tokens": 09831    },9832    "total_tokens": 09833  },9834  "user": "user-1234"9835}9836```98379838### Example98399840```http9841curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \9842    -H "Content-Type: application/json" \9843    -H "Authorization: Bearer $OPENAI_API_KEY"9844```98459846#### Response98479848```json9849{9850  "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44",9851  "object": "response",9852  "created_at": 1741386163,9853  "status": "cancelled",9854  "background": true,9855  "completed_at": null,9856  "error": null,9857  "incomplete_details": null,9858  "instructions": null,9859  "max_output_tokens": null,9860  "model": "gpt-6-astra",9861  "output": [9862    {9863      "type": "message",9864      "id": "msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44",9865      "status": "in_progress",9866      "role": "assistant",9867      "content": [9868        {9869          "type": "output_text",9870          "text": "Silent circuits hum,  \nThoughts emerge in data streams—  \nDigital dawn breaks.",9871          "annotations": []9872        }9873      ]9874    }9875  ],9876  "parallel_tool_calls": true,9877  "previous_response_id": null,9878  "reasoning": {9879    "effort": null,9880    "summary": null9881  },9882  "store": true,9883  "temperature": 1.0,9884  "text": {9885    "format": {9886      "type": "text"9887    }9888  },9889  "tool_choice": "auto",9890  "tools": [],9891  "top_p": 1.0,9892  "truncation": "disabled",9893  "usage": null,9894  "user": null,9895  "metadata": {}9896}9897```9898
Files main
Menu

Theme