Repository Public
1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.23## Create a conversation45**post** `/conversations`67Create a conversation.89### Body Parameters1011- `items: optional array of EasyInputMessage or object { content, role, status, type } or ResponseOutputMessage or 30 more or null`1213 Initial items to include in the conversation context. You may add up to 20 items at a time.1415 - `EasyInputMessage object { content, role, phase, type }`1617 A message input to the model with a role indicating instruction following18 hierarchy. Instructions given with the `developer` or `system` role take19 precedence over instructions given with the `user` role. Messages with the20 `assistant` role are presumed to have been generated by the model in previous21 interactions.2223 - `content: string or ResponseInputMessageContentList`2425 Text, image, or audio input to the model, used to generate a response.26 Can also contain previous assistant responses.2728 - `TextInput = string`2930 A text input to the model.3132 - `ResponseInputMessageContentList = array of ResponseInputContent`3334 A list of one or many input items to the model, containing different content35 types.3637 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`3839 A text input to the model.4041 - `text: string`4243 The text input to the model.4445 - `type: "input_text"`4647 The type of the input item. Always `input_text`.4849 - `"input_text"`5051 - `prompt_cache_breakpoint: optional object { mode }`5253 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.5455 - `mode: "explicit"`5657 The breakpoint mode. Always `explicit`.5859 - `"explicit"`6061 - `ResponseInputImage object { detail, type, file_id, 2 more }`6263 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).6465 - `detail: ImageDetail`6667 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.6869 - `"low"`7071 - `"high"`7273 - `"auto"`7475 - `"original"`7677 - `type: "input_image"`7879 The type of the input item. Always `input_image`.8081 - `"input_image"`8283 - `file_id: optional string or null`8485 The ID of the file to be sent to the model.8687 - `image_url: optional string or null`8889 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.9091 - `prompt_cache_breakpoint: optional object { mode }`9293 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.9495 - `mode: "explicit"`9697 The breakpoint mode. Always `explicit`.9899 - `"explicit"`100101 - `ResponseInputFile object { type, detail, file_data, 4 more }`102103 A file input to the model.104105 - `type: "input_file"`106107 The type of the input item. Always `input_file`.108109 - `"input_file"`110111 - `detail: optional "auto" or "low" or "high"`112113 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`.114115 - `"auto"`116117 - `"low"`118119 - `"high"`120121 - `file_data: optional string`122123 The content of the file to be sent to the model.124125 - `file_id: optional string or null`126127 The ID of the file to be sent to the model.128129 - `file_url: optional string`130131 The URL of the file to be sent to the model.132133 - `filename: optional string`134135 The name of the file to be sent to the model.136137 - `prompt_cache_breakpoint: optional object { mode }`138139 Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.140141 - `mode: "explicit"`142143 The breakpoint mode. Always `explicit`.144145 - `"explicit"`146147 - `role: "user" or "assistant" or "system" or "developer"`148149 The role of the message input. One of `user`, `assistant`, `system`, or150 `developer`.151152 - `"user"`153154 - `"assistant"`155156 - `"system"`157158 - `"developer"`159160 - `phase: optional "commentary" or "final_answer" or null`161162 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).163 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend164 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.165166 - `"commentary"`167168 - `"final_answer"`169170 - `type: optional "message"`171172 The type of the message input. Always `message`.173174 - `"message"`175176 - `Message object { content, role, status, type }`177178 A message input to the model with a role indicating instruction following179 hierarchy. Instructions given with the `developer` or `system` role take180 precedence over instructions given with the `user` role.181182 - `content: ResponseInputMessageContentList`183184 A list of one or many input items to the model, containing different content185 types.186187 - `role: "user" or "system" or "developer"`188189 The role of the message input. One of `user`, `system`, or `developer`.190191 - `"user"`192193 - `"system"`194195 - `"developer"`196197 - `status: optional "in_progress" or "completed" or "incomplete"`198199 The status of item. One of `in_progress`, `completed`, or200 `incomplete`. Populated when items are returned via API.201202 - `"in_progress"`203204 - `"completed"`205206 - `"incomplete"`207208 - `type: optional "message"`209210 The type of the message input. Always set to `message`.211212 - `"message"`213214 - `ResponseOutputMessage object { id, content, role, 3 more }`215216 An output message from the model.217218 - `id: string`219220 The unique ID of the output message.221222 - `content: array of ResponseOutputText or ResponseOutputRefusal`223224 The content of the output message.225226 - `ResponseOutputText object { annotations, logprobs, text, type }`227228 A text output from the model.229230 - `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 }`231232 The annotations of the text output.233234 - `FileCitation object { file_id, filename, index, type }`235236 A citation to a file.237238 - `file_id: string`239240 The ID of the file.241242 - `filename: string`243244 The filename of the file cited.245246 - `index: number`247248 The index of the file in the list of files.249250 - `type: "file_citation"`251252 The type of the file citation. Always `file_citation`.253254 - `"file_citation"`255256 - `URLCitation object { end_index, start_index, title, 2 more }`257258 A citation for a web resource used to generate a model response.259260 - `end_index: number`261262 The index of the last character of the URL citation in the message.263264 - `start_index: number`265266 The index of the first character of the URL citation in the message.267268 - `title: string`269270 The title of the web resource.271272 - `type: "url_citation"`273274 The type of the URL citation. Always `url_citation`.275276 - `"url_citation"`277278 - `url: string`279280 The URL of the web resource.281282 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`283284 A citation for a container file used to generate a model response.285286 - `container_id: string`287288 The ID of the container file.289290 - `end_index: number`291292 The index of the last character of the container file citation in the message.293294 - `file_id: string`295296 The ID of the file.297298 - `filename: string`299300 The filename of the container file cited.301302 - `start_index: number`303304 The index of the first character of the container file citation in the message.305306 - `type: "container_file_citation"`307308 The type of the container file citation. Always `container_file_citation`.309310 - `"container_file_citation"`311312 - `FilePath object { file_id, index, type }`313314 A path to a file.315316 - `file_id: string`317318 The ID of the file.319320 - `index: number`321322 The index of the file in the list of files.323324 - `type: "file_path"`325326 The type of the file path. Always `file_path`.327328 - `"file_path"`329330 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`331332 - `token: string`333334 - `bytes: array of number`335336 - `logprob: number`337338 - `top_logprobs: array of object { token, bytes, logprob }`339340 - `token: string`341342 - `bytes: array of number`343344 - `logprob: number`345346 - `text: string`347348 The text output from the model.349350 - `type: "output_text"`351352 The type of the output text. Always `output_text`.353354 - `"output_text"`355356 - `ResponseOutputRefusal object { refusal, type }`357358 A refusal from the model.359360 - `refusal: string`361362 The refusal explanation from the model.363364 - `type: "refusal"`365366 The type of the refusal. Always `refusal`.367368 - `"refusal"`369370 - `role: "assistant"`371372 The role of the output message. Always `assistant`.373374 - `"assistant"`375376 - `status: "in_progress" or "completed" or "incomplete"`377378 The status of the message input. One of `in_progress`, `completed`, or379 `incomplete`. Populated when input items are returned via API.380381 - `"in_progress"`382383 - `"completed"`384385 - `"incomplete"`386387 - `type: "message"`388389 The type of the output message. Always `message`.390391 - `"message"`392393 - `phase: optional "commentary" or "final_answer" or null`394395 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).396 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend397 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.398399 - `"commentary"`400401 - `"final_answer"`402403 - `FileSearchCall object { id, queries, status, 2 more }`404405 The results of a file search tool call. See the406 [file search guide](/api/docs/guides/tools-file-search) for more information.407408 - `id: string`409410 The unique ID of the file search tool call.411412 - `queries: array of string`413414 The queries used to search for files.415416 - `status: "in_progress" or "searching" or "completed" or 2 more`417418 The status of the file search tool call. One of `in_progress`,419 `searching`, `incomplete` or `failed`,420421 - `"in_progress"`422423 - `"searching"`424425 - `"completed"`426427 - `"incomplete"`428429 - `"failed"`430431 - `type: "file_search_call"`432433 The type of the file search tool call. Always `file_search_call`.434435 - `"file_search_call"`436437 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`438439 The results of the file search tool call.440441 - `attributes: optional map[string or number or boolean] or null`442443 Set of 16 key-value pairs that can be attached to an object. This can be444 useful for storing additional information about the object in a structured445 format, and querying for objects via API or the dashboard. Keys are strings446 with a maximum length of 64 characters. Values are strings with a maximum447 length of 512 characters, booleans, or numbers.448449 - `string`450451 - `number`452453 - `boolean`454455 - `file_id: optional string`456457 The unique ID of the file.458459 - `filename: optional string`460461 The name of the file.462463 - `score: optional number`464465 The relevance score of the file - a value between 0 and 1.466467 - `text: optional string`468469 The text that was retrieved from the file.470471 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`472473 A tool call to a computer use tool. See the474 [computer use guide](/api/docs/guides/tools-computer-use) for more information.475476 - `id: string`477478 The unique ID of the computer call.479480 - `call_id: string`481482 An identifier used when responding to the tool call with output.483484 - `pending_safety_checks: array of object { id, code, message }`485486 The pending safety checks for the computer call.487488 - `id: string`489490 The ID of the pending safety check.491492 - `code: optional string or null`493494 The type of the pending safety check.495496 - `message: optional string or null`497498 Details about the pending safety check.499500 - `status: "in_progress" or "completed" or "incomplete"`501502 The status of the item. One of `in_progress`, `completed`, or503 `incomplete`. Populated when items are returned via API.504505 - `"in_progress"`506507 - `"completed"`508509 - `"incomplete"`510511 - `type: "computer_call"`512513 The type of the computer call. Always `computer_call`.514515 - `"computer_call"`516517 - `action: optional ComputerAction`518519 A click action.520521 - `Click object { button, type, x, 2 more }`522523 A click action.524525 - `button: "left" or "right" or "wheel" or 2 more`526527 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.528529 - `"left"`530531 - `"right"`532533 - `"wheel"`534535 - `"back"`536537 - `"forward"`538539 - `type: "click"`540541 Specifies the event type. For a click action, this property is always `click`.542543 - `"click"`544545 - `x: number`546547 The x-coordinate where the click occurred.548549 - `y: number`550551 The y-coordinate where the click occurred.552553 - `keys: optional array of string or null`554555 The keys being held while clicking.556557 - `DoubleClick object { keys, type, x, y }`558559 A double click action.560561 - `keys: array of string or null`562563 The keys being held while double-clicking.564565 - `type: "double_click"`566567 Specifies the event type. For a double click action, this property is always set to `double_click`.568569 - `"double_click"`570571 - `x: number`572573 The x-coordinate where the double click occurred.574575 - `y: number`576577 The y-coordinate where the double click occurred.578579 - `Drag object { path, type, keys }`580581 A drag action.582583 - `path: array of object { x, y }`584585 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg586587 ```588 [589 { x: 100, y: 200 },590 { x: 200, y: 300 }591 ]592 ```593594 - `x: number`595596 The x-coordinate.597598 - `y: number`599600 The y-coordinate.601602 - `type: "drag"`603604 Specifies the event type. For a drag action, this property is always set to `drag`.605606 - `"drag"`607608 - `keys: optional array of string or null`609610 The keys being held while dragging the mouse.611612 - `Keypress object { keys, type }`613614 A collection of keypresses the model would like to perform.615616 - `keys: array of string`617618 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.619620 - `type: "keypress"`621622 Specifies the event type. For a keypress action, this property is always set to `keypress`.623624 - `"keypress"`625626 - `Move object { type, x, y, keys }`627628 A mouse move action.629630 - `type: "move"`631632 Specifies the event type. For a move action, this property is always set to `move`.633634 - `"move"`635636 - `x: number`637638 The x-coordinate to move to.639640 - `y: number`641642 The y-coordinate to move to.643644 - `keys: optional array of string or null`645646 The keys being held while moving the mouse.647648 - `Screenshot object { type }`649650 A screenshot action.651652 - `type: "screenshot"`653654 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.655656 - `"screenshot"`657658 - `Scroll object { scroll_x, scroll_y, type, 3 more }`659660 A scroll action.661662 - `scroll_x: number`663664 The horizontal scroll distance.665666 - `scroll_y: number`667668 The vertical scroll distance.669670 - `type: "scroll"`671672 Specifies the event type. For a scroll action, this property is always set to `scroll`.673674 - `"scroll"`675676 - `x: number`677678 The x-coordinate where the scroll occurred.679680 - `y: number`681682 The y-coordinate where the scroll occurred.683684 - `keys: optional array of string or null`685686 The keys being held while scrolling.687688 - `Type object { text, type }`689690 An action to type in text.691692 - `text: string`693694 The text to type.695696 - `type: "type"`697698 Specifies the event type. For a type action, this property is always set to `type`.699700 - `"type"`701702 - `Wait object { type }`703704 A wait action.705706 - `type: "wait"`707708 Specifies the event type. For a wait action, this property is always set to `wait`.709710 - `"wait"`711712 - `actions: optional ComputerActionList`713714 Flattened batched actions for `computer_use`. Each action includes an715 `type` discriminator and action-specific fields.716717 - `Click object { button, type, x, 2 more }`718719 A click action.720721 - `DoubleClick object { keys, type, x, y }`722723 A double click action.724725 - `Drag object { path, type, keys }`726727 A drag action.728729 - `Keypress object { keys, type }`730731 A collection of keypresses the model would like to perform.732733 - `Move object { type, x, y, keys }`734735 A mouse move action.736737 - `Screenshot object { type }`738739 A screenshot action.740741 - `Scroll object { scroll_x, scroll_y, type, 3 more }`742743 A scroll action.744745 - `Type object { text, type }`746747 An action to type in text.748749 - `Wait object { type }`750751 A wait action.752753 - `ComputerCallOutput object { call_id, output, type, 3 more }`754755 The output of a computer tool call.756757 - `call_id: string`758759 The ID of the computer tool call that produced the output.760761 - `output: ResponseComputerToolCallOutputScreenshot`762763 A computer screenshot image used with the computer use tool.764765 - `type: "computer_screenshot"`766767 Specifies the event type. For a computer screenshot, this property is768 always set to `computer_screenshot`.769770 - `"computer_screenshot"`771772 - `file_id: optional string`773774 The identifier of an uploaded file that contains the screenshot.775776 - `image_url: optional string`777778 The URL of the screenshot image.779780 - `type: "computer_call_output"`781782 The type of the computer tool call output. Always `computer_call_output`.783784 - `"computer_call_output"`785786 - `id: optional string or null`787788 The ID of the computer tool call output.789790 - `acknowledged_safety_checks: optional array of object { id, code, message } or null`791792 The safety checks reported by the API that have been acknowledged by the developer.793794 - `id: string`795796 The ID of the pending safety check.797798 - `code: optional string or null`799800 The type of the pending safety check.801802 - `message: optional string or null`803804 Details about the pending safety check.805806 - `status: optional "in_progress" or "completed" or "incomplete" or null`807808 The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.809810 - `"in_progress"`811812 - `"completed"`813814 - `"incomplete"`815816 - `WebSearchCall object { id, action, status, type }`817818 The results of a web search tool call. See the819 [web search guide](/api/docs/guides/tools-web-search) for more information.820821 - `id: string`822823 The unique ID of the web search tool call.824825 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`826827 An object describing the specific action taken in this web search call.828 Includes details on how the model used the web (search, open_page, find_in_page).829830 - `Search object { type, queries, query, sources }`831832 Action type "search" - Performs a web search query.833834 - `type: "search"`835836 The action type.837838 - `"search"`839840 - `queries: optional array of string`841842 The search queries.843844 - `query: optional string`845846 The search query.847848 - `sources: optional array of object { type, url }`849850 The sources used in the search.851852 - `type: "url"`853854 The type of source. Always `url`.855856 - `"url"`857858 - `url: string`859860 The URL of the source.861862 - `OpenPage object { type, url }`863864 Action type "open_page" - Opens a specific URL from search results.865866 - `type: "open_page"`867868 The action type.869870 - `"open_page"`871872 - `url: optional string or null`873874 The URL opened by the model.875876 - `FindInPage object { pattern, type, url }`877878 Action type "find_in_page": Searches for a pattern within a loaded page.879880 - `pattern: string`881882 The pattern or text to search for within the page.883884 - `type: "find_in_page"`885886 The action type.887888 - `"find_in_page"`889890 - `url: string`891892 The URL of the page searched for the pattern.893894 - `status: "in_progress" or "searching" or "completed" or 2 more`895896 The status of the web search tool call.897898 - `"in_progress"`899900 - `"searching"`901902 - `"completed"`903904 - `"failed"`905906 - `"incomplete"`907908 - `type: "web_search_call"`909910 The type of the web search tool call. Always `web_search_call`.911912 - `"web_search_call"`913914 - `FunctionCall object { arguments, call_id, name, 6 more }`915916 A tool call to run a function. See the917 [function calling guide](/api/docs/guides/function-calling) for more information.918919 - `arguments: string`920921 A JSON string of the arguments to pass to the function.922923 - `call_id: string`924925 The unique ID of the function tool call generated by the model.926927 - `name: string`928929 The name of the function to run.930931 - `type: "function_call"`932933 The type of the function tool call. Always `function_call`.934935 - `"function_call"`936937 - `id: optional string`938939 The unique ID of the function tool call.940941 - `async: optional boolean`942943 Whether the function tool call runs asynchronously.944945 - `caller: optional object { type } or object { caller_id, type } or null`946947 The execution context that produced this tool call.948949 - `Direct object { type }`950951 - `type: "direct"`952953 - `"direct"`954955 - `Program object { caller_id, type }`956957 - `caller_id: string`958959 The call ID of the program item that produced this tool call.960961 - `type: "program"`962963 - `"program"`964965 - `namespace: optional string`966967 The namespace of the function to run.968969 - `status: optional "in_progress" or "completed" or "incomplete"`970971 The status of the item. One of `in_progress`, `completed`, or972 `incomplete`. Populated when items are returned via API.973974 - `"in_progress"`975976 - `"completed"`977978 - `"incomplete"`979980 - `FunctionCallOutput object { output, type, id, 5 more }`981982 The output of a function tool call.983984 - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`985986 Text, image, or file output of the function tool call.987988 - `string`989990 A JSON string of the output of the function tool call.991992 - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`993994 An array of content outputs (text, image, file) for the function tool call.995996 - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`997998 A text input to the model.9991000 - `text: string`10011002 The text input to the model.10031004 - `type: "input_text"`10051006 The type of the input item. Always `input_text`.10071008 - `"input_text"`10091010 - `prompt_cache_breakpoint: optional object { mode } or null`10111012 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.10131014 - `mode: "explicit"`10151016 The breakpoint mode. Always `explicit`.10171018 - `"explicit"`10191020 - `ResponseInputImageContent object { type, detail, file_id, 2 more }`10211022 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)10231024 - `type: "input_image"`10251026 The type of the input item. Always `input_image`.10271028 - `"input_image"`10291030 - `detail: optional ImageDetail or null`10311032 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.10331034 - `file_id: optional string or null`10351036 The ID of the file to be sent to the model.10371038 - `image_url: optional string or null`10391040 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.10411042 - `prompt_cache_breakpoint: optional object { mode } or null`10431044 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.10451046 - `mode: "explicit"`10471048 The breakpoint mode. Always `explicit`.10491050 - `"explicit"`10511052 - `ResponseInputFileContent object { type, detail, file_data, 4 more }`10531054 A file input to the model.10551056 - `type: "input_file"`10571058 The type of the input item. Always `input_file`.10591060 - `"input_file"`10611062 - `detail: optional "auto" or "low" or "high"`10631064 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`.10651066 - `"auto"`10671068 - `"low"`10691070 - `"high"`10711072 - `file_data: optional string or null`10731074 The base64-encoded data of the file to be sent to the model.10751076 - `file_id: optional string or null`10771078 The ID of the file to be sent to the model.10791080 - `file_url: optional string or null`10811082 The URL of the file to be sent to the model.10831084 - `filename: optional string or null`10851086 The name of the file to be sent to the model.10871088 - `prompt_cache_breakpoint: optional object { mode } or null`10891090 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.10911092 - `mode: "explicit"`10931094 The breakpoint mode. Always `explicit`.10951096 - `"explicit"`10971098 - `type: "function_call_output"`10991100 The type of the function tool call output. Always `function_call_output`.11011102 - `"function_call_output"`11031104 - `id: optional string or null`11051106 The unique ID of the function tool call output. Populated when this item is returned via API.11071108 - `call_id: optional string or null`11091110 The unique ID of the function tool call generated by the model.11111112 - `caller: optional object { type } or object { caller_id, type } or null`11131114 The execution context that produced this tool call.11151116 - `Direct object { type }`11171118 - `type: "direct"`11191120 The caller type. Always `direct`.11211122 - `"direct"`11231124 - `Program object { caller_id, type }`11251126 - `caller_id: string`11271128 The call ID of the program item that produced this tool call.11291130 - `type: "program"`11311132 The caller type. Always `program`.11331134 - `"program"`11351136 - `name: optional string or null`11371138 The name of the tool that produced the output.11391140 - `namespace: optional string or null`11411142 The namespace of the tool that produced the output.11431144 - `status: optional "in_progress" or "completed" or "incomplete" or null`11451146 The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.11471148 - `"in_progress"`11491150 - `"completed"`11511152 - `"incomplete"`11531154 - `ToolSearchCall object { arguments, type, id, 3 more }`11551156 - `arguments: unknown`11571158 The arguments supplied to the tool search call.11591160 - `type: "tool_search_call"`11611162 The item type. Always `tool_search_call`.11631164 - `"tool_search_call"`11651166 - `id: optional string or null`11671168 The unique ID of this tool search call.11691170 - `call_id: optional string or null`11711172 The unique ID of the tool search call generated by the model.11731174 - `execution: optional "server" or "client"`11751176 Whether tool search was executed by the server or by the client.11771178 - `"server"`11791180 - `"client"`11811182 - `status: optional "in_progress" or "completed" or "incomplete" or null`11831184 The status of the tool search call.11851186 - `"in_progress"`11871188 - `"completed"`11891190 - `"incomplete"`11911192 - `ToolSearchOutput object { tools, type, id, 3 more }`11931194 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`11951196 The loaded tool definitions returned by the tool search output.11971198 - `Function object { name, parameters, strict, 6 more }`11991200 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).12011202 - `name: string`12031204 The name of the function to call.12051206 - `parameters: map[unknown] or null`12071208 A JSON schema object describing the parameters of the function.12091210 - `strict: boolean or null`12111212 Whether strict parameter validation is enforced for this function tool.12131214 - `type: "function"`12151216 The type of the function tool. Always `function`.12171218 - `"function"`12191220 - `allowed_callers: optional array of "direct" or "programmatic" or null`12211222 The tool invocation context(s).12231224 - `"direct"`12251226 - `"programmatic"`12271228 - `async: optional boolean`12291230 - `defer_loading: optional boolean`12311232 Whether this function is deferred and loaded via tool search.12331234 - `description: optional string or null`12351236 A description of the function. Used by the model to determine whether or not to call the function.12371238 - `output_schema: optional map[unknown] or null`12391240 A JSON schema object describing the JSON value encoded in string outputs for this function.12411242 - `FileSearch object { type, vector_store_ids, filters, 2 more }`12431244 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).12451246 - `type: "file_search"`12471248 The type of the file search tool. Always `file_search`.12491250 - `"file_search"`12511252 - `vector_store_ids: array of string`12531254 The IDs of the vector stores to search.12551256 - `filters: optional ComparisonFilter or CompoundFilter or null`12571258 A filter to apply.12591260 - `ComparisonFilter object { key, type, value }`12611262 A filter used to compare a specified attribute key to a given value using a defined comparison operation.12631264 - `key: string`12651266 The key to compare against the value.12671268 - `type: "eq" or "ne" or "gt" or 5 more`12691270 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.12711272 - `eq`: equals1273 - `ne`: not equal1274 - `gt`: greater than1275 - `gte`: greater than or equal1276 - `lt`: less than1277 - `lte`: less than or equal1278 - `in`: in1279 - `nin`: not in12801281 - `"eq"`12821283 - `"ne"`12841285 - `"gt"`12861287 - `"gte"`12881289 - `"lt"`12901291 - `"lte"`12921293 - `"in"`12941295 - `"nin"`12961297 - `value: string or number or boolean or array of string or number`12981299 The value to compare against the attribute key; supports string, number, or boolean types.13001301 - `string`13021303 - `number`13041305 - `boolean`13061307 - `array of string or number`13081309 - `string`13101311 - `number`13121313 - `CompoundFilter object { filters, type }`13141315 Combine multiple filters using `and` or `or`.13161317 - `filters: array of ComparisonFilter or unknown`13181319 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.13201321 - `ComparisonFilter object { key, type, value }`13221323 A filter used to compare a specified attribute key to a given value using a defined comparison operation.13241325 - `unknown`13261327 - `type: "and" or "or"`13281329 Type of operation: `and` or `or`.13301331 - `"and"`13321333 - `"or"`13341335 - `max_num_results: optional number`13361337 The maximum number of results to return. This number should be between 1 and 50 inclusive.13381339 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`13401341 Ranking options for search.13421343 - `hybrid_search: optional object { embedding_weight, text_weight }`13441345 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.13461347 - `embedding_weight: number`13481349 The weight of the embedding in the reciprocal ranking fusion.13501351 - `text_weight: number`13521353 The weight of the text in the reciprocal ranking fusion.13541355 - `ranker: optional "auto" or "default-2024-11-15"`13561357 The ranker to use for the file search.13581359 - `"auto"`13601361 - `"default-2024-11-15"`13621363 - `score_threshold: optional number`13641365 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.13661367 - `Computer object { type }`13681369 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).13701371 - `type: "computer"`13721373 The type of the computer tool. Always `computer`.13741375 - `"computer"`13761377 - `ComputerUsePreview object { display_height, display_width, environment, type }`13781379 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).13801381 - `display_height: number`13821383 The height of the computer display.13841385 - `display_width: number`13861387 The width of the computer display.13881389 - `environment: "windows" or "mac" or "linux" or 2 more`13901391 The type of computer environment to control.13921393 - `"windows"`13941395 - `"mac"`13961397 - `"linux"`13981399 - `"ubuntu"`14001401 - `"browser"`14021403 - `type: "computer_use_preview"`14041405 The type of the computer use tool. Always `computer_use_preview`.14061407 - `"computer_use_preview"`14081409 - `WebSearch object { type, external_web_access, filters, 2 more }`14101411 Search the Internet for sources related to the prompt. Learn more about the1412 [web search tool](/api/docs/guides/tools-web-search).14131414 - `type: "web_search" or "web_search_2025_08_26"`14151416 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.14171418 - `"web_search"`14191420 - `"web_search_2025_08_26"`14211422 - `external_web_access: optional boolean`14231424 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.14251426 - `filters: optional object { allowed_domains } or null`14271428 Filters for the search.14291430 - `allowed_domains: optional array of string or null`14311432 Allowed domains for the search. If not provided, all domains are allowed.1433 Subdomains of the provided domains are allowed as well.14341435 Example: `["pubmed.ncbi.nlm.nih.gov"]`14361437 - `search_context_size: optional "low" or "medium" or "high"`14381439 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.14401441 - `"low"`14421443 - `"medium"`14441445 - `"high"`14461447 - `user_location: optional object { city, country, region, 2 more } or null`14481449 The approximate location of the user.14501451 - `city: optional string or null`14521453 Free text input for the city of the user, e.g. `San Francisco`.14541455 - `country: optional string or null`14561457 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.14581459 - `region: optional string or null`14601461 Free text input for the region of the user, e.g. `California`.14621463 - `timezone: optional string or null`14641465 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.14661467 - `type: optional "approximate"`14681469 The type of location approximation. Always `approximate`.14701471 - `"approximate"`14721473 - `Mcp object { server_label, type, allowed_callers, 9 more }`14741475 Give the model access to additional tools via remote Model Context Protocol1476 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).14771478 - `server_label: string`14791480 A label for this MCP server, used to identify it in tool calls.14811482 - `type: "mcp"`14831484 The type of the MCP tool. Always `mcp`.14851486 - `"mcp"`14871488 - `allowed_callers: optional array of "direct" or "programmatic" or null`14891490 The tool invocation context(s).14911492 - `"direct"`14931494 - `"programmatic"`14951496 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`14971498 List of allowed tool names or a filter object.14991500 - `McpAllowedTools = array of string`15011502 A string array of allowed tool names15031504 - `McpToolFilter object { read_only, tool_names }`15051506 A filter object to specify which tools are allowed.15071508 - `read_only: optional boolean`15091510 Indicates whether or not a tool modifies data or is read-only. If an1511 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1512 it will match this filter.15131514 - `tool_names: optional array of string`15151516 List of allowed tool names.15171518 - `authorization: optional string`15191520 An OAuth access token that can be used with a remote MCP server, either1521 with a custom MCP server URL or a service connector. Your application1522 must handle the OAuth authorization flow and provide the token here.15231524 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`15251526 Identifier for service connectors, like those available in ChatGPT. One of1527 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more1528 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).15291530 This field is deprecated for models released after September 1, 2026.1531 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to1532 connect through a Secure MCP Tunnel.15331534 Currently supported `connector_id` values are:15351536 - Dropbox: `connector_dropbox`1537 - Gmail: `connector_gmail`1538 - Google Calendar: `connector_googlecalendar`1539 - Google Drive: `connector_googledrive`1540 - Microsoft Teams: `connector_microsoftteams`1541 - Outlook Calendar: `connector_outlookcalendar`1542 - Outlook Email: `connector_outlookemail`1543 - SharePoint: `connector_sharepoint`15441545 - `"connector_dropbox"`15461547 - `"connector_gmail"`15481549 - `"connector_googlecalendar"`15501551 - `"connector_googledrive"`15521553 - `"connector_microsoftteams"`15541555 - `"connector_outlookcalendar"`15561557 - `"connector_outlookemail"`15581559 - `"connector_sharepoint"`15601561 - `defer_loading: optional boolean`15621563 Whether this MCP tool is deferred and discovered via tool search.15641565 - `headers: optional map[string] or null`15661567 Optional HTTP headers to send to the MCP server. Use for authentication1568 or other purposes.15691570 - `require_approval: optional object { always, never } or "always" or "never" or null`15711572 Specify which of the MCP server's tools require approval.15731574 - `McpToolApprovalFilter object { always, never }`15751576 Specify which of the MCP server's tools require approval. Can be1577 `always`, `never`, or a filter object associated with tools1578 that require approval.15791580 - `always: optional object { read_only, tool_names }`15811582 A filter object to specify which tools are allowed.15831584 - `read_only: optional boolean`15851586 Indicates whether or not a tool modifies data or is read-only. If an1587 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1588 it will match this filter.15891590 - `tool_names: optional array of string`15911592 List of allowed tool names.15931594 - `never: optional object { read_only, tool_names }`15951596 A filter object to specify which tools are allowed.15971598 - `read_only: optional boolean`15991600 Indicates whether or not a tool modifies data or is read-only. If an1601 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1602 it will match this filter.16031604 - `tool_names: optional array of string`16051606 List of allowed tool names.16071608 - `McpToolApprovalSetting = "always" or "never"`16091610 Specify a single approval policy for all tools. One of `always` or1611 `never`. When set to `always`, all tools will require approval. When1612 set to `never`, all tools will not require approval.16131614 - `"always"`16151616 - `"never"`16171618 - `server_description: optional string`16191620 Optional description of the MCP server, used to provide more context.16211622 - `server_url: optional string`16231624 The URL for the MCP server. One of `server_url`, `connector_id`, or1625 `tunnel_id` must be provided.16261627 - `tunnel_id: optional string`16281629 The Secure MCP Tunnel ID to use instead of a direct server URL. One of1630 `server_url`, `connector_id`, or `tunnel_id` must be provided.16311632 - `CodeInterpreter object { container, type, allowed_callers }`16331634 A tool that runs Python code to help generate a response to a prompt.16351636 - `container: string or object { type, file_ids, memory_limit, network_policy }`16371638 The code interpreter container. Can be a container ID or an object that1639 specifies uploaded file IDs to make available to your code, along with an1640 optional `memory_limit` setting.16411642 - `string`16431644 The container ID.16451646 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`16471648 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.16491650 - `type: "auto"`16511652 Always `auto`.16531654 - `"auto"`16551656 - `file_ids: optional array of string`16571658 An optional list of uploaded files to make available to your code.16591660 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`16611662 The memory limit for the code interpreter container.16631664 - `"1g"`16651666 - `"4g"`16671668 - `"16g"`16691670 - `"64g"`16711672 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`16731674 Network access policy for the container.16751676 - `ContainerNetworkPolicyDisabled object { type }`16771678 - `type: "disabled"`16791680 Disable outbound network access. Always `disabled`.16811682 - `"disabled"`16831684 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`16851686 - `allowed_domains: array of string`16871688 A list of allowed domains when type is `allowlist`.16891690 - `type: "allowlist"`16911692 Allow outbound network access only to specified domains. Always `allowlist`.16931694 - `"allowlist"`16951696 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`16971698 Optional domain-scoped secrets for allowlisted domains.16991700 - `domain: string`17011702 The domain associated with the secret.17031704 - `name: string`17051706 The name of the secret to inject for the domain.17071708 - `value: string`17091710 The secret value to inject for the domain.17111712 - `type: "code_interpreter"`17131714 The type of the code interpreter tool. Always `code_interpreter`.17151716 - `"code_interpreter"`17171718 - `allowed_callers: optional array of "direct" or "programmatic" or null`17191720 The tool invocation context(s).17211722 - `"direct"`17231724 - `"programmatic"`17251726 - `ProgrammaticToolCalling object { type }`17271728 - `type: "programmatic_tool_calling"`17291730 The type of the tool. Always `programmatic_tool_calling`.17311732 - `"programmatic_tool_calling"`17331734 - `ImageGeneration object { type, action, background, 9 more }`17351736 A tool that generates images using the GPT image models.17371738 - `type: "image_generation"`17391740 The type of the image generation tool. Always `image_generation`.17411742 - `"image_generation"`17431744 - `action: optional "generate" or "edit" or "auto"`17451746 Whether to generate a new image or edit an existing image. Default: `auto`.17471748 - `"generate"`17491750 - `"edit"`17511752 - `"auto"`17531754 - `background: optional "transparent" or "opaque" or "auto"`17551756 Set the background of the generated image. One of `transparent`, `opaque`,1757 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including1758 their `2026-09-08` snapshots, support `opaque` and `transparent`1759 backgrounds. Transparent backgrounds are available for supported GPT Image1760 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in1761 preview. When using `transparent`, set the output format to `png` or `webp`.1762 Default: `auto`.17631764 - `"transparent"`17651766 - `"opaque"`17671768 - `"auto"`17691770 - `input_fidelity: optional "high" or "low" or null`17711772 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`.17731774 - `"high"`17751776 - `"low"`17771778 - `input_image_mask: optional object { file_id, image_url }`17791780 Optional mask for inpainting. Contains `image_url`1781 (string, optional) and `file_id` (string, optional).17821783 - `file_id: optional string`17841785 File ID for the mask image.17861787 - `image_url: optional string`17881789 Base64-encoded mask image.17901791 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`17921793 The image generation model to use. One of `gpt-image-1`,1794 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1795 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1796 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1797 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1798 `gpt-image-1`.17991800 - `string`18011802 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`18031804 The image generation model to use. One of `gpt-image-1`,1805 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,1806 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,1807 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,1808 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:1809 `gpt-image-1`.18101811 - `"gpt-image-1"`18121813 - `"gpt-image-1-mini"`18141815 - `"gpt-image-1.5"`18161817 - `"gpt-image-2"`18181819 - `"gpt-image-2-2026-04-21"`18201821 - `"gpt-image-2.5-sunburst"`18221823 - `"gpt-image-2.5-sunburst-2026-09-08"`18241825 - `"gpt-image-2.5-flare"`18261827 - `"gpt-image-2.5-flare-2026-09-08"`18281829 - `moderation: optional "auto" or "low"`18301831 Moderation level for the generated image. Default: `auto`.18321833 - `"auto"`18341835 - `"low"`18361837 - `output_compression: optional number`18381839 Compression level for the output image. Default: 100.18401841 - `output_format: optional "png" or "webp" or "jpeg"`18421843 The output format of the generated image. One of `png`, `webp`, or1844 `jpeg`. Default: `png`.18451846 - `"png"`18471848 - `"webp"`18491850 - `"jpeg"`18511852 - `partial_images: optional number`18531854 Number of partial images to generate in streaming mode, from 0 (default value) to 3.18551856 - `quality: optional "low" or "medium" or "high" or 3 more`18571858 The quality of the generated image. The GPT image models support `low`,1859 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,1860 including their `2026-09-08` snapshots, also support `xhigh` and `max`.1861 Default: `auto`.18621863 - `"low"`18641865 - `"medium"`18661867 - `"high"`18681869 - `"xhigh"`18701871 - `"max"`18721873 - `"auto"`18741875 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`18761877 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`.18781879 - `string`18801881 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`18821883 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`.18841885 - `"1024x1024"`18861887 - `"1024x1536"`18881889 - `"1536x1024"`18901891 - `"auto"`18921893 - `LocalShell object { type }`18941895 A tool that allows the model to execute shell commands in a local environment.18961897 - `type: "local_shell"`18981899 The type of the local shell tool. Always `local_shell`.19001901 - `"local_shell"`19021903 - `Shell object { type, allowed_callers, environment }`19041905 A tool that allows the model to execute shell commands.19061907 - `type: "shell"`19081909 The type of the shell tool. Always `shell`.19101911 - `"shell"`19121913 - `allowed_callers: optional array of "direct" or "programmatic" or null`19141915 The tool invocation context(s).19161917 - `"direct"`19181919 - `"programmatic"`19201921 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`19221923 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`19241925 - `type: "container_auto"`19261927 Automatically creates a container for this request19281929 - `"container_auto"`19301931 - `file_ids: optional array of string`19321933 An optional list of uploaded files to make available to your code.19341935 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`19361937 The memory limit for the container.19381939 - `"1g"`19401941 - `"4g"`19421943 - `"16g"`19441945 - `"64g"`19461947 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`19481949 Network access policy for the container.19501951 - `ContainerNetworkPolicyDisabled object { type }`19521953 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`19541955 - `skills: optional array of SkillReference or InlineSkill`19561957 An optional list of skills referenced by id or inline data.19581959 - `SkillReference object { skill_id, type, version }`19601961 - `skill_id: string`19621963 The ID of the referenced skill.19641965 - `type: "skill_reference"`19661967 References a skill created with the /v1/skills endpoint.19681969 - `"skill_reference"`19701971 - `version: optional string`19721973 Optional skill version. Use a positive integer or 'latest'. Omit for default.19741975 - `InlineSkill object { description, name, source, type }`19761977 - `description: string`19781979 The description of the skill.19801981 - `name: string`19821983 The name of the skill.19841985 - `source: InlineSkillSource`19861987 Inline skill payload19881989 - `data: string`19901991 Base64-encoded skill zip bundle.19921993 - `media_type: "application/zip"`19941995 The media type of the inline skill payload. Must be `application/zip`.19961997 - `"application/zip"`19981999 - `type: "base64"`20002001 The type of the inline skill source. Must be `base64`.20022003 - `"base64"`20042005 - `type: "inline"`20062007 Defines an inline skill for this request.20082009 - `"inline"`20102011 - `LocalEnvironment object { type, skills }`20122013 - `type: "local"`20142015 Use a local computer environment.20162017 - `"local"`20182019 - `skills: optional array of LocalSkill`20202021 An optional list of skills.20222023 - `description: string`20242025 The description of the skill.20262027 - `name: string`20282029 The name of the skill.20302031 - `path: string`20322033 The path to the directory containing the skill.20342035 - `ContainerReference object { container_id, type }`20362037 - `container_id: string`20382039 The ID of the referenced container.20402041 - `type: "container_reference"`20422043 References a container created with the /v1/containers endpoint20442045 - `"container_reference"`20462047 - `Custom object { name, type, allowed_callers, 4 more }`20482049 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)20502051 - `name: string`20522053 The name of the custom tool, used to identify it in tool calls.20542055 - `type: "custom"`20562057 The type of the custom tool. Always `custom`.20582059 - `"custom"`20602061 - `allowed_callers: optional array of "direct" or "programmatic" or null`20622063 The tool invocation context(s).20642065 - `"direct"`20662067 - `"programmatic"`20682069 - `async: optional boolean`20702071 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.20722073 - `defer_loading: optional boolean`20742075 Whether this tool should be deferred and discovered via tool search.20762077 - `description: optional string`20782079 Optional description of the custom tool, used to provide more context.20802081 - `format: optional CustomToolInputFormat`20822083 The input format for the custom tool. Default is unconstrained text.20842085 - `Text object { type }`20862087 Unconstrained free-form text.20882089 - `type: "text"`20902091 Unconstrained text format. Always `text`.20922093 - `"text"`20942095 - `Grammar object { definition, syntax, type }`20962097 A grammar defined by the user.20982099 - `definition: string`21002101 The grammar definition.21022103 - `syntax: "lark" or "regex"`21042105 The syntax of the grammar definition. One of `lark` or `regex`.21062107 - `"lark"`21082109 - `"regex"`21102111 - `type: "grammar"`21122113 Grammar format. Always `grammar`.21142115 - `"grammar"`21162117 - `Namespace object { description, name, tools, type }`21182119 Groups function/custom tools under a shared namespace.21202121 - `description: string`21222123 A description of the namespace shown to the model.21242125 - `name: string`21262127 The namespace name used in tool calls (for example, `crm`).21282129 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`21302131 The function/custom tools available inside this namespace.21322133 - `Function object { name, type, allowed_callers, 6 more }`21342135 - `name: string`21362137 - `type: "function"`21382139 - `"function"`21402141 - `allowed_callers: optional array of "direct" or "programmatic" or null`21422143 The tool invocation context(s).21442145 - `"direct"`21462147 - `"programmatic"`21482149 - `async: optional boolean`21502151 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.21522153 - `defer_loading: optional boolean`21542155 Whether this function should be deferred and discovered via tool search.21562157 - `description: optional string or null`21582159 - `output_schema: optional map[unknown] or null`21602161 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.21622163 - `parameters: optional unknown or null`21642165 - `strict: optional boolean or null`21662167 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.21682169 - `Custom object { name, type, allowed_callers, 4 more }`21702171 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)21722173 - `name: string`21742175 The name of the custom tool, used to identify it in tool calls.21762177 - `type: "custom"`21782179 The type of the custom tool. Always `custom`.21802181 - `"custom"`21822183 - `allowed_callers: optional array of "direct" or "programmatic" or null`21842185 The tool invocation context(s).21862187 - `"direct"`21882189 - `"programmatic"`21902191 - `async: optional boolean`21922193 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.21942195 - `defer_loading: optional boolean`21962197 Whether this tool should be deferred and discovered via tool search.21982199 - `description: optional string`22002201 Optional description of the custom tool, used to provide more context.22022203 - `format: optional CustomToolInputFormat`22042205 The input format for the custom tool. Default is unconstrained text.22062207 - `type: "namespace"`22082209 The type of the tool. Always `namespace`.22102211 - `"namespace"`22122213 - `ToolSearch object { type, description, execution, parameters }`22142215 Hosted or BYOT tool search configuration for deferred tools.22162217 - `type: "tool_search"`22182219 The type of the tool. Always `tool_search`.22202221 - `"tool_search"`22222223 - `description: optional string or null`22242225 Description shown to the model for a client-executed tool search tool.22262227 - `execution: optional "server" or "client"`22282229 Whether tool search is executed by the server or by the client.22302231 - `"server"`22322233 - `"client"`22342235 - `parameters: optional unknown or null`22362237 Parameter schema for a client-executed tool search tool.22382239 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`22402241 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).22422243 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`22442245 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.22462247 - `"web_search_preview"`22482249 - `"web_search_preview_2025_03_11"`22502251 - `search_content_types: optional array of "text" or "image"`22522253 - `"text"`22542255 - `"image"`22562257 - `search_context_size: optional "low" or "medium" or "high"`22582259 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.22602261 - `"low"`22622263 - `"medium"`22642265 - `"high"`22662267 - `user_location: optional object { type, city, country, 2 more } or null`22682269 The user's location.22702271 - `type: "approximate"`22722273 The type of location approximation. Always `approximate`.22742275 - `"approximate"`22762277 - `city: optional string or null`22782279 Free text input for the city of the user, e.g. `San Francisco`.22802281 - `country: optional string or null`22822283 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.22842285 - `region: optional string or null`22862287 Free text input for the region of the user, e.g. `California`.22882289 - `timezone: optional string or null`22902291 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.22922293 - `ApplyPatch object { type, allowed_callers }`22942295 Allows the assistant to create, delete, or update files using unified diffs.22962297 - `type: "apply_patch"`22982299 The type of the tool. Always `apply_patch`.23002301 - `"apply_patch"`23022303 - `allowed_callers: optional array of "direct" or "programmatic" or null`23042305 The tool invocation context(s).23062307 - `"direct"`23082309 - `"programmatic"`23102311 - `type: "tool_search_output"`23122313 The item type. Always `tool_search_output`.23142315 - `"tool_search_output"`23162317 - `id: optional string or null`23182319 The unique ID of this tool search output.23202321 - `call_id: optional string or null`23222323 The unique ID of the tool search call generated by the model.23242325 - `execution: optional "server" or "client"`23262327 Whether tool search was executed by the server or by the client.23282329 - `"server"`23302331 - `"client"`23322333 - `status: optional "in_progress" or "completed" or "incomplete" or null`23342335 The status of the tool search output.23362337 - `"in_progress"`23382339 - `"completed"`23402341 - `"incomplete"`23422343 - `AdditionalTools object { role, tools, type, id }`23442345 - `role: "developer"`23462347 The role that provided the additional tools. Only `developer` is supported.23482349 - `"developer"`23502351 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`23522353 A list of additional tools made available at this item.23542355 - `Function object { name, parameters, strict, 6 more }`23562357 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).23582359 - `name: string`23602361 The name of the function to call.23622363 - `parameters: map[unknown] or null`23642365 A JSON schema object describing the parameters of the function.23662367 - `strict: boolean or null`23682369 Whether strict parameter validation is enforced for this function tool.23702371 - `type: "function"`23722373 The type of the function tool. Always `function`.23742375 - `"function"`23762377 - `allowed_callers: optional array of "direct" or "programmatic" or null`23782379 The tool invocation context(s).23802381 - `"direct"`23822383 - `"programmatic"`23842385 - `async: optional boolean`23862387 - `defer_loading: optional boolean`23882389 Whether this function is deferred and loaded via tool search.23902391 - `description: optional string or null`23922393 A description of the function. Used by the model to determine whether or not to call the function.23942395 - `output_schema: optional map[unknown] or null`23962397 A JSON schema object describing the JSON value encoded in string outputs for this function.23982399 - `FileSearch object { type, vector_store_ids, filters, 2 more }`24002401 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).24022403 - `type: "file_search"`24042405 The type of the file search tool. Always `file_search`.24062407 - `"file_search"`24082409 - `vector_store_ids: array of string`24102411 The IDs of the vector stores to search.24122413 - `filters: optional ComparisonFilter or CompoundFilter or null`24142415 A filter to apply.24162417 - `ComparisonFilter object { key, type, value }`24182419 A filter used to compare a specified attribute key to a given value using a defined comparison operation.24202421 - `CompoundFilter object { filters, type }`24222423 Combine multiple filters using `and` or `or`.24242425 - `max_num_results: optional number`24262427 The maximum number of results to return. This number should be between 1 and 50 inclusive.24282429 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`24302431 Ranking options for search.24322433 - `hybrid_search: optional object { embedding_weight, text_weight }`24342435 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.24362437 - `embedding_weight: number`24382439 The weight of the embedding in the reciprocal ranking fusion.24402441 - `text_weight: number`24422443 The weight of the text in the reciprocal ranking fusion.24442445 - `ranker: optional "auto" or "default-2024-11-15"`24462447 The ranker to use for the file search.24482449 - `"auto"`24502451 - `"default-2024-11-15"`24522453 - `score_threshold: optional number`24542455 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.24562457 - `Computer object { type }`24582459 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).24602461 - `type: "computer"`24622463 The type of the computer tool. Always `computer`.24642465 - `"computer"`24662467 - `ComputerUsePreview object { display_height, display_width, environment, type }`24682469 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).24702471 - `display_height: number`24722473 The height of the computer display.24742475 - `display_width: number`24762477 The width of the computer display.24782479 - `environment: "windows" or "mac" or "linux" or 2 more`24802481 The type of computer environment to control.24822483 - `"windows"`24842485 - `"mac"`24862487 - `"linux"`24882489 - `"ubuntu"`24902491 - `"browser"`24922493 - `type: "computer_use_preview"`24942495 The type of the computer use tool. Always `computer_use_preview`.24962497 - `"computer_use_preview"`24982499 - `WebSearch object { type, external_web_access, filters, 2 more }`25002501 Search the Internet for sources related to the prompt. Learn more about the2502 [web search tool](/api/docs/guides/tools-web-search).25032504 - `type: "web_search" or "web_search_2025_08_26"`25052506 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.25072508 - `"web_search"`25092510 - `"web_search_2025_08_26"`25112512 - `external_web_access: optional boolean`25132514 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.25152516 - `filters: optional object { allowed_domains } or null`25172518 Filters for the search.25192520 - `allowed_domains: optional array of string or null`25212522 Allowed domains for the search. If not provided, all domains are allowed.2523 Subdomains of the provided domains are allowed as well.25242525 Example: `["pubmed.ncbi.nlm.nih.gov"]`25262527 - `search_context_size: optional "low" or "medium" or "high"`25282529 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.25302531 - `"low"`25322533 - `"medium"`25342535 - `"high"`25362537 - `user_location: optional object { city, country, region, 2 more } or null`25382539 The approximate location of the user.25402541 - `city: optional string or null`25422543 Free text input for the city of the user, e.g. `San Francisco`.25442545 - `country: optional string or null`25462547 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.25482549 - `region: optional string or null`25502551 Free text input for the region of the user, e.g. `California`.25522553 - `timezone: optional string or null`25542555 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.25562557 - `type: optional "approximate"`25582559 The type of location approximation. Always `approximate`.25602561 - `"approximate"`25622563 - `Mcp object { server_label, type, allowed_callers, 9 more }`25642565 Give the model access to additional tools via remote Model Context Protocol2566 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).25672568 - `server_label: string`25692570 A label for this MCP server, used to identify it in tool calls.25712572 - `type: "mcp"`25732574 The type of the MCP tool. Always `mcp`.25752576 - `"mcp"`25772578 - `allowed_callers: optional array of "direct" or "programmatic" or null`25792580 The tool invocation context(s).25812582 - `"direct"`25832584 - `"programmatic"`25852586 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`25872588 List of allowed tool names or a filter object.25892590 - `McpAllowedTools = array of string`25912592 A string array of allowed tool names25932594 - `McpToolFilter object { read_only, tool_names }`25952596 A filter object to specify which tools are allowed.25972598 - `read_only: optional boolean`25992600 Indicates whether or not a tool modifies data or is read-only. If an2601 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2602 it will match this filter.26032604 - `tool_names: optional array of string`26052606 List of allowed tool names.26072608 - `authorization: optional string`26092610 An OAuth access token that can be used with a remote MCP server, either2611 with a custom MCP server URL or a service connector. Your application2612 must handle the OAuth authorization flow and provide the token here.26132614 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`26152616 Identifier for service connectors, like those available in ChatGPT. One of2617 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more2618 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).26192620 This field is deprecated for models released after September 1, 2026.2621 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to2622 connect through a Secure MCP Tunnel.26232624 Currently supported `connector_id` values are:26252626 - Dropbox: `connector_dropbox`2627 - Gmail: `connector_gmail`2628 - Google Calendar: `connector_googlecalendar`2629 - Google Drive: `connector_googledrive`2630 - Microsoft Teams: `connector_microsoftteams`2631 - Outlook Calendar: `connector_outlookcalendar`2632 - Outlook Email: `connector_outlookemail`2633 - SharePoint: `connector_sharepoint`26342635 - `"connector_dropbox"`26362637 - `"connector_gmail"`26382639 - `"connector_googlecalendar"`26402641 - `"connector_googledrive"`26422643 - `"connector_microsoftteams"`26442645 - `"connector_outlookcalendar"`26462647 - `"connector_outlookemail"`26482649 - `"connector_sharepoint"`26502651 - `defer_loading: optional boolean`26522653 Whether this MCP tool is deferred and discovered via tool search.26542655 - `headers: optional map[string] or null`26562657 Optional HTTP headers to send to the MCP server. Use for authentication2658 or other purposes.26592660 - `require_approval: optional object { always, never } or "always" or "never" or null`26612662 Specify which of the MCP server's tools require approval.26632664 - `McpToolApprovalFilter object { always, never }`26652666 Specify which of the MCP server's tools require approval. Can be2667 `always`, `never`, or a filter object associated with tools2668 that require approval.26692670 - `always: optional object { read_only, tool_names }`26712672 A filter object to specify which tools are allowed.26732674 - `read_only: optional boolean`26752676 Indicates whether or not a tool modifies data or is read-only. If an2677 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2678 it will match this filter.26792680 - `tool_names: optional array of string`26812682 List of allowed tool names.26832684 - `never: optional object { read_only, tool_names }`26852686 A filter object to specify which tools are allowed.26872688 - `read_only: optional boolean`26892690 Indicates whether or not a tool modifies data or is read-only. If an2691 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2692 it will match this filter.26932694 - `tool_names: optional array of string`26952696 List of allowed tool names.26972698 - `McpToolApprovalSetting = "always" or "never"`26992700 Specify a single approval policy for all tools. One of `always` or2701 `never`. When set to `always`, all tools will require approval. When2702 set to `never`, all tools will not require approval.27032704 - `"always"`27052706 - `"never"`27072708 - `server_description: optional string`27092710 Optional description of the MCP server, used to provide more context.27112712 - `server_url: optional string`27132714 The URL for the MCP server. One of `server_url`, `connector_id`, or2715 `tunnel_id` must be provided.27162717 - `tunnel_id: optional string`27182719 The Secure MCP Tunnel ID to use instead of a direct server URL. One of2720 `server_url`, `connector_id`, or `tunnel_id` must be provided.27212722 - `CodeInterpreter object { container, type, allowed_callers }`27232724 A tool that runs Python code to help generate a response to a prompt.27252726 - `container: string or object { type, file_ids, memory_limit, network_policy }`27272728 The code interpreter container. Can be a container ID or an object that2729 specifies uploaded file IDs to make available to your code, along with an2730 optional `memory_limit` setting.27312732 - `string`27332734 The container ID.27352736 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`27372738 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.27392740 - `type: "auto"`27412742 Always `auto`.27432744 - `"auto"`27452746 - `file_ids: optional array of string`27472748 An optional list of uploaded files to make available to your code.27492750 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`27512752 The memory limit for the code interpreter container.27532754 - `"1g"`27552756 - `"4g"`27572758 - `"16g"`27592760 - `"64g"`27612762 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`27632764 Network access policy for the container.27652766 - `ContainerNetworkPolicyDisabled object { type }`27672768 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`27692770 - `type: "code_interpreter"`27712772 The type of the code interpreter tool. Always `code_interpreter`.27732774 - `"code_interpreter"`27752776 - `allowed_callers: optional array of "direct" or "programmatic" or null`27772778 The tool invocation context(s).27792780 - `"direct"`27812782 - `"programmatic"`27832784 - `ProgrammaticToolCalling object { type }`27852786 - `type: "programmatic_tool_calling"`27872788 The type of the tool. Always `programmatic_tool_calling`.27892790 - `"programmatic_tool_calling"`27912792 - `ImageGeneration object { type, action, background, 9 more }`27932794 A tool that generates images using the GPT image models.27952796 - `type: "image_generation"`27972798 The type of the image generation tool. Always `image_generation`.27992800 - `"image_generation"`28012802 - `action: optional "generate" or "edit" or "auto"`28032804 Whether to generate a new image or edit an existing image. Default: `auto`.28052806 - `"generate"`28072808 - `"edit"`28092810 - `"auto"`28112812 - `background: optional "transparent" or "opaque" or "auto"`28132814 Set the background of the generated image. One of `transparent`, `opaque`,2815 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including2816 their `2026-09-08` snapshots, support `opaque` and `transparent`2817 backgrounds. Transparent backgrounds are available for supported GPT Image2818 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in2819 preview. When using `transparent`, set the output format to `png` or `webp`.2820 Default: `auto`.28212822 - `"transparent"`28232824 - `"opaque"`28252826 - `"auto"`28272828 - `input_fidelity: optional "high" or "low" or null`28292830 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`.28312832 - `"high"`28332834 - `"low"`28352836 - `input_image_mask: optional object { file_id, image_url }`28372838 Optional mask for inpainting. Contains `image_url`2839 (string, optional) and `file_id` (string, optional).28402841 - `file_id: optional string`28422843 File ID for the mask image.28442845 - `image_url: optional string`28462847 Base64-encoded mask image.28482849 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`28502851 The image generation model to use. One of `gpt-image-1`,2852 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2853 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2854 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2855 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2856 `gpt-image-1`.28572858 - `string`28592860 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`28612862 The image generation model to use. One of `gpt-image-1`,2863 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2864 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2865 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2866 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2867 `gpt-image-1`.28682869 - `"gpt-image-1"`28702871 - `"gpt-image-1-mini"`28722873 - `"gpt-image-1.5"`28742875 - `"gpt-image-2"`28762877 - `"gpt-image-2-2026-04-21"`28782879 - `"gpt-image-2.5-sunburst"`28802881 - `"gpt-image-2.5-sunburst-2026-09-08"`28822883 - `"gpt-image-2.5-flare"`28842885 - `"gpt-image-2.5-flare-2026-09-08"`28862887 - `moderation: optional "auto" or "low"`28882889 Moderation level for the generated image. Default: `auto`.28902891 - `"auto"`28922893 - `"low"`28942895 - `output_compression: optional number`28962897 Compression level for the output image. Default: 100.28982899 - `output_format: optional "png" or "webp" or "jpeg"`29002901 The output format of the generated image. One of `png`, `webp`, or2902 `jpeg`. Default: `png`.29032904 - `"png"`29052906 - `"webp"`29072908 - `"jpeg"`29092910 - `partial_images: optional number`29112912 Number of partial images to generate in streaming mode, from 0 (default value) to 3.29132914 - `quality: optional "low" or "medium" or "high" or 3 more`29152916 The quality of the generated image. The GPT image models support `low`,2917 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,2918 including their `2026-09-08` snapshots, also support `xhigh` and `max`.2919 Default: `auto`.29202921 - `"low"`29222923 - `"medium"`29242925 - `"high"`29262927 - `"xhigh"`29282929 - `"max"`29302931 - `"auto"`29322933 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`29342935 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`.29362937 - `string`29382939 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`29402941 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`.29422943 - `"1024x1024"`29442945 - `"1024x1536"`29462947 - `"1536x1024"`29482949 - `"auto"`29502951 - `LocalShell object { type }`29522953 A tool that allows the model to execute shell commands in a local environment.29542955 - `type: "local_shell"`29562957 The type of the local shell tool. Always `local_shell`.29582959 - `"local_shell"`29602961 - `Shell object { type, allowed_callers, environment }`29622963 A tool that allows the model to execute shell commands.29642965 - `type: "shell"`29662967 The type of the shell tool. Always `shell`.29682969 - `"shell"`29702971 - `allowed_callers: optional array of "direct" or "programmatic" or null`29722973 The tool invocation context(s).29742975 - `"direct"`29762977 - `"programmatic"`29782979 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`29802981 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`29822983 - `LocalEnvironment object { type, skills }`29842985 - `ContainerReference object { container_id, type }`29862987 - `Custom object { name, type, allowed_callers, 4 more }`29882989 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)29902991 - `name: string`29922993 The name of the custom tool, used to identify it in tool calls.29942995 - `type: "custom"`29962997 The type of the custom tool. Always `custom`.29982999 - `"custom"`30003001 - `allowed_callers: optional array of "direct" or "programmatic" or null`30023003 The tool invocation context(s).30043005 - `"direct"`30063007 - `"programmatic"`30083009 - `async: optional boolean`30103011 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.30123013 - `defer_loading: optional boolean`30143015 Whether this tool should be deferred and discovered via tool search.30163017 - `description: optional string`30183019 Optional description of the custom tool, used to provide more context.30203021 - `format: optional CustomToolInputFormat`30223023 The input format for the custom tool. Default is unconstrained text.30243025 - `Namespace object { description, name, tools, type }`30263027 Groups function/custom tools under a shared namespace.30283029 - `description: string`30303031 A description of the namespace shown to the model.30323033 - `name: string`30343035 The namespace name used in tool calls (for example, `crm`).30363037 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`30383039 The function/custom tools available inside this namespace.30403041 - `Function object { name, type, allowed_callers, 6 more }`30423043 - `name: string`30443045 - `type: "function"`30463047 - `"function"`30483049 - `allowed_callers: optional array of "direct" or "programmatic" or null`30503051 The tool invocation context(s).30523053 - `"direct"`30543055 - `"programmatic"`30563057 - `async: optional boolean`30583059 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.30603061 - `defer_loading: optional boolean`30623063 Whether this function should be deferred and discovered via tool search.30643065 - `description: optional string or null`30663067 - `output_schema: optional map[unknown] or null`30683069 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.30703071 - `parameters: optional unknown or null`30723073 - `strict: optional boolean or null`30743075 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.30763077 - `Custom object { name, type, allowed_callers, 4 more }`30783079 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)30803081 - `name: string`30823083 The name of the custom tool, used to identify it in tool calls.30843085 - `type: "custom"`30863087 The type of the custom tool. Always `custom`.30883089 - `"custom"`30903091 - `allowed_callers: optional array of "direct" or "programmatic" or null`30923093 The tool invocation context(s).30943095 - `"direct"`30963097 - `"programmatic"`30983099 - `async: optional boolean`31003101 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.31023103 - `defer_loading: optional boolean`31043105 Whether this tool should be deferred and discovered via tool search.31063107 - `description: optional string`31083109 Optional description of the custom tool, used to provide more context.31103111 - `format: optional CustomToolInputFormat`31123113 The input format for the custom tool. Default is unconstrained text.31143115 - `type: "namespace"`31163117 The type of the tool. Always `namespace`.31183119 - `"namespace"`31203121 - `ToolSearch object { type, description, execution, parameters }`31223123 Hosted or BYOT tool search configuration for deferred tools.31243125 - `type: "tool_search"`31263127 The type of the tool. Always `tool_search`.31283129 - `"tool_search"`31303131 - `description: optional string or null`31323133 Description shown to the model for a client-executed tool search tool.31343135 - `execution: optional "server" or "client"`31363137 Whether tool search is executed by the server or by the client.31383139 - `"server"`31403141 - `"client"`31423143 - `parameters: optional unknown or null`31443145 Parameter schema for a client-executed tool search tool.31463147 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`31483149 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).31503151 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`31523153 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.31543155 - `"web_search_preview"`31563157 - `"web_search_preview_2025_03_11"`31583159 - `search_content_types: optional array of "text" or "image"`31603161 - `"text"`31623163 - `"image"`31643165 - `search_context_size: optional "low" or "medium" or "high"`31663167 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.31683169 - `"low"`31703171 - `"medium"`31723173 - `"high"`31743175 - `user_location: optional object { type, city, country, 2 more } or null`31763177 The user's location.31783179 - `type: "approximate"`31803181 The type of location approximation. Always `approximate`.31823183 - `"approximate"`31843185 - `city: optional string or null`31863187 Free text input for the city of the user, e.g. `San Francisco`.31883189 - `country: optional string or null`31903191 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.31923193 - `region: optional string or null`31943195 Free text input for the region of the user, e.g. `California`.31963197 - `timezone: optional string or null`31983199 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.32003201 - `ApplyPatch object { type, allowed_callers }`32023203 Allows the assistant to create, delete, or update files using unified diffs.32043205 - `type: "apply_patch"`32063207 The type of the tool. Always `apply_patch`.32083209 - `"apply_patch"`32103211 - `allowed_callers: optional array of "direct" or "programmatic" or null`32123213 The tool invocation context(s).32143215 - `"direct"`32163217 - `"programmatic"`32183219 - `type: "additional_tools"`32203221 The item type. Always `additional_tools`.32223223 - `"additional_tools"`32243225 - `id: optional string or null`32263227 The unique ID of this additional tools item.32283229 - `ConfigurationUpdate object { type, id, reasoning }`32303231 An update to the conversation's response configuration. The configuration3232 remains in effect for subsequent responses until it is replaced by another3233 configuration update.32343235 - `type: "configuration_update"`32363237 The item type. Always `configuration_update`.32383239 - `"configuration_update"`32403241 - `id: optional string or null`32423243 The unique ID of the configuration update item.32443245 - `reasoning: optional object { effort }`32463247 Updates to reasoning configuration. Only effort is supported.32483249 - `effort: optional ReasoningEffort or null`32503251 The reasoning effort to use for subsequent responses until another3252 configuration update replaces it.32533254 - `"none"`32553256 - `"minimal"`32573258 - `"low"`32593260 - `"medium"`32613262 - `"high"`32633264 - `"xhigh"`32653266 - `"max"`32673268 - `Reasoning object { id, summary, type, 3 more }`32693270 A description of the chain of thought used by a reasoning model while generating3271 a response. Be sure to include these items in your `input` to the Responses API3272 for subsequent turns of a conversation if you are manually3273 [managing context](/api/docs/guides/conversation-state).32743275 - `id: string`32763277 The unique identifier of the reasoning content.32783279 - `summary: array of SummaryTextContent`32803281 Reasoning summary content.32823283 - `text: string`32843285 A summary of the reasoning output from the model so far.32863287 - `type: "summary_text"`32883289 The type of the object. Always `summary_text`.32903291 - `"summary_text"`32923293 - `type: "reasoning"`32943295 The type of the object. Always `reasoning`.32963297 - `"reasoning"`32983299 - `content: optional array of object { text, type }`33003301 Reasoning text content.33023303 - `text: string`33043305 The reasoning text from the model.33063307 - `type: "reasoning_text"`33083309 The type of the reasoning text. Always `reasoning_text`.33103311 - `"reasoning_text"`33123313 - `encrypted_content: optional string or null`33143315 The encrypted content of the reasoning item. This is populated by default3316 for reasoning items returned by `POST /v1/responses` and WebSocket3317 `response.create` requests.33183319 When streaming, use the completed reasoning item and its3320 `encrypted_content` from the `response.output_item.done` event in3321 subsequent requests. The `encrypted_content` in3322 `response.output_item.added` may be incomplete. This is especially3323 important when `store` is `false` or when using Zero Data Retention.33243325 - `status: optional "in_progress" or "completed" or "incomplete"`33263327 The status of the item. One of `in_progress`, `completed`, or3328 `incomplete`. Populated when items are returned via API.33293330 - `"in_progress"`33313332 - `"completed"`33333334 - `"incomplete"`33353336 - `Compaction object { encrypted_content, type, id }`33373338 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).33393340 - `encrypted_content: string`33413342 The encrypted content of the compaction summary.33433344 - `type: "compaction"`33453346 The type of the item. Always `compaction`.33473348 - `"compaction"`33493350 - `id: optional string or null`33513352 The ID of the compaction item.33533354 - `ImageGenerationCall object { id, result, status, 7 more }`33553356 An image generation request made by the model.33573358 - `id: string`33593360 The unique ID of the image generation call.33613362 - `result: string or null`33633364 The generated image encoded in base64.33653366 - `status: "in_progress" or "completed" or "generating" or "failed"`33673368 The status of the image generation call.33693370 - `"in_progress"`33713372 - `"completed"`33733374 - `"generating"`33753376 - `"failed"`33773378 - `type: "image_generation_call"`33793380 The type of the image generation call. Always `image_generation_call`.33813382 - `"image_generation_call"`33833384 - `action: optional "generate" or "edit" or "auto" or null`33853386 The action used for image generation.33873388 - `"generate"`33893390 - `"edit"`33913392 - `"auto"`33933394 - `background: optional "transparent" or "opaque" or "auto" or null`33953396 The background setting used for generation.33973398 - `"transparent"`33993400 - `"opaque"`34013402 - `"auto"`34033404 - `output_format: optional "png" or "webp" or "jpeg" or null`34053406 The output format used for generation.34073408 - `"png"`34093410 - `"webp"`34113412 - `"jpeg"`34133414 - `quality: optional "low" or "medium" or "high" or 3 more or null`34153416 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.34173418 - `"low"`34193420 - `"medium"`34213422 - `"high"`34233424 - `"xhigh"`34253426 - `"max"`34273428 - `"auto"`34293430 - `revised_prompt: optional string or null`34313432 The prompt that was used after any model prompt rewriting.34333434 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`34353436 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.34373438 - `string`34393440 - `"1024x1024" or "1024x1536" or "1536x1024"`34413442 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.34433444 - `"1024x1024"`34453446 - `"1024x1536"`34473448 - `"1536x1024"`34493450 - `CodeInterpreterCall object { id, code, container_id, 3 more }`34513452 A tool call to run code.34533454 - `id: string`34553456 The unique ID of the code interpreter tool call.34573458 - `code: string or null`34593460 The code to run, or null if not available.34613462 - `container_id: string`34633464 The ID of the container used to run the code.34653466 - `outputs: array of object { logs, type } or object { type, url } or null`34673468 The outputs generated by the code interpreter, such as logs or images.3469 Can be null if no outputs are available.34703471 - `Logs object { logs, type }`34723473 The logs output from the code interpreter.34743475 - `logs: string`34763477 The logs output from the code interpreter.34783479 - `type: "logs"`34803481 The type of the output. Always `logs`.34823483 - `"logs"`34843485 - `Image object { type, url }`34863487 The image output from the code interpreter.34883489 - `type: "image"`34903491 The type of the output. Always `image`.34923493 - `"image"`34943495 - `url: string`34963497 The URL of the image output from the code interpreter.34983499 - `status: "in_progress" or "completed" or "incomplete" or 2 more`35003501 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.35023503 - `"in_progress"`35043505 - `"completed"`35063507 - `"incomplete"`35083509 - `"interpreting"`35103511 - `"failed"`35123513 - `type: "code_interpreter_call"`35143515 The type of the code interpreter tool call. Always `code_interpreter_call`.35163517 - `"code_interpreter_call"`35183519 - `LocalShellCall object { id, action, call_id, 2 more }`35203521 A tool call to run a command on the local shell.35223523 - `id: string`35243525 The unique ID of the local shell call.35263527 - `action: object { command, env, type, 3 more }`35283529 Execute a shell command on the server.35303531 - `command: array of string`35323533 The command to run.35343535 - `env: map[string]`35363537 Environment variables to set for the command.35383539 - `type: "exec"`35403541 The type of the local shell action. Always `exec`.35423543 - `"exec"`35443545 - `timeout_ms: optional number or null`35463547 Optional timeout in milliseconds for the command.35483549 - `user: optional string or null`35503551 Optional user to run the command as.35523553 - `working_directory: optional string or null`35543555 Optional working directory to run the command in.35563557 - `call_id: string`35583559 The unique ID of the local shell tool call generated by the model.35603561 - `status: "in_progress" or "completed" or "incomplete"`35623563 The status of the local shell call.35643565 - `"in_progress"`35663567 - `"completed"`35683569 - `"incomplete"`35703571 - `type: "local_shell_call"`35723573 The type of the local shell call. Always `local_shell_call`.35743575 - `"local_shell_call"`35763577 - `LocalShellCallOutput object { id, output, type, status }`35783579 The output of a local shell tool call.35803581 - `id: string`35823583 The unique ID of the local shell tool call generated by the model.35843585 - `output: string`35863587 A JSON string of the output of the local shell tool call.35883589 - `type: "local_shell_call_output"`35903591 The type of the local shell tool call output. Always `local_shell_call_output`.35923593 - `"local_shell_call_output"`35943595 - `status: optional "in_progress" or "completed" or "incomplete" or null`35963597 The status of the item. One of `in_progress`, `completed`, or `incomplete`.35983599 - `"in_progress"`36003601 - `"completed"`36023603 - `"incomplete"`36043605 - `ShellCall object { action, call_id, type, 4 more }`36063607 A tool representing a request to execute one or more shell commands.36083609 - `action: object { commands, max_output_length, timeout_ms }`36103611 The shell commands and limits that describe how to run the tool call.36123613 - `commands: array of string`36143615 Ordered shell commands for the execution environment to run.36163617 - `max_output_length: optional number or null`36183619 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.36203621 - `timeout_ms: optional number or null`36223623 Maximum wall-clock time in milliseconds to allow the shell commands to run.36243625 - `call_id: string`36263627 The unique ID of the shell tool call generated by the model.36283629 - `type: "shell_call"`36303631 The type of the item. Always `shell_call`.36323633 - `"shell_call"`36343635 - `id: optional string or null`36363637 The unique ID of the shell tool call. Populated when this item is returned via API.36383639 - `caller: optional object { type } or object { caller_id, type } or null`36403641 The execution context that produced this tool call.36423643 - `Direct object { type }`36443645 - `type: "direct"`36463647 The caller type. Always `direct`.36483649 - `"direct"`36503651 - `Program object { caller_id, type }`36523653 - `caller_id: string`36543655 The call ID of the program item that produced this tool call.36563657 - `type: "program"`36583659 The caller type. Always `program`.36603661 - `"program"`36623663 - `environment: optional LocalEnvironment or ContainerReference or null`36643665 The environment to execute the shell commands in.36663667 - `LocalEnvironment object { type, skills }`36683669 - `ContainerReference object { container_id, type }`36703671 - `status: optional "in_progress" or "completed" or "incomplete" or null`36723673 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.36743675 - `"in_progress"`36763677 - `"completed"`36783679 - `"incomplete"`36803681 - `ShellCallOutput object { call_id, output, type, 4 more }`36823683 The streamed output items emitted by a shell tool call.36843685 - `call_id: string`36863687 The unique ID of the shell tool call generated by the model.36883689 - `output: array of ResponseFunctionShellCallOutputContent`36903691 Captured chunks of stdout and stderr output, along with their associated outcomes.36923693 - `outcome: object { type } or object { exit_code, type }`36943695 The exit or timeout outcome associated with this shell call.36963697 - `Timeout object { type }`36983699 Indicates that the shell call exceeded its configured time limit.37003701 - `type: "timeout"`37023703 The outcome type. Always `timeout`.37043705 - `"timeout"`37063707 - `Exit object { exit_code, type }`37083709 Indicates that the shell commands finished and returned an exit code.37103711 - `exit_code: number`37123713 The exit code returned by the shell process.37143715 - `type: "exit"`37163717 The outcome type. Always `exit`.37183719 - `"exit"`37203721 - `stderr: string`37223723 Captured stderr output for the shell call.37243725 - `stdout: string`37263727 Captured stdout output for the shell call.37283729 - `type: "shell_call_output"`37303731 The type of the item. Always `shell_call_output`.37323733 - `"shell_call_output"`37343735 - `id: optional string or null`37363737 The unique ID of the shell tool call output. Populated when this item is returned via API.37383739 - `caller: optional object { type } or object { caller_id, type } or null`37403741 The execution context that produced this tool call.37423743 - `Direct object { type }`37443745 - `type: "direct"`37463747 The caller type. Always `direct`.37483749 - `"direct"`37503751 - `Program object { caller_id, type }`37523753 - `caller_id: string`37543755 The call ID of the program item that produced this tool call.37563757 - `type: "program"`37583759 The caller type. Always `program`.37603761 - `"program"`37623763 - `max_output_length: optional number or null`37643765 The maximum number of UTF-8 characters captured for this shell call's combined output.37663767 - `status: optional "in_progress" or "completed" or "incomplete" or null`37683769 The status of the shell call output.37703771 - `"in_progress"`37723773 - `"completed"`37743775 - `"incomplete"`37763777 - `ApplyPatchCall object { call_id, operation, status, 3 more }`37783779 A tool call representing a request to create, delete, or update files using diff patches.37803781 - `call_id: string`37823783 The unique ID of the apply patch tool call generated by the model.37843785 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`37863787 The specific create, delete, or update instruction for the apply_patch tool call.37883789 - `CreateFile object { diff, path, type }`37903791 Instruction for creating a new file via the apply_patch tool.37923793 - `diff: string`37943795 Unified diff content to apply when creating the file.37963797 - `path: string`37983799 Path of the file to create relative to the workspace root.38003801 - `type: "create_file"`38023803 The operation type. Always `create_file`.38043805 - `"create_file"`38063807 - `DeleteFile object { path, type }`38083809 Instruction for deleting an existing file via the apply_patch tool.38103811 - `path: string`38123813 Path of the file to delete relative to the workspace root.38143815 - `type: "delete_file"`38163817 The operation type. Always `delete_file`.38183819 - `"delete_file"`38203821 - `UpdateFile object { diff, path, type }`38223823 Instruction for updating an existing file via the apply_patch tool.38243825 - `diff: string`38263827 Unified diff content to apply to the existing file.38283829 - `path: string`38303831 Path of the file to update relative to the workspace root.38323833 - `type: "update_file"`38343835 The operation type. Always `update_file`.38363837 - `"update_file"`38383839 - `status: "in_progress" or "completed"`38403841 The status of the apply patch tool call. One of `in_progress` or `completed`.38423843 - `"in_progress"`38443845 - `"completed"`38463847 - `type: "apply_patch_call"`38483849 The type of the item. Always `apply_patch_call`.38503851 - `"apply_patch_call"`38523853 - `id: optional string or null`38543855 The unique ID of the apply patch tool call. Populated when this item is returned via API.38563857 - `caller: optional object { type } or object { caller_id, type } or null`38583859 The execution context that produced this tool call.38603861 - `Direct object { type }`38623863 - `type: "direct"`38643865 The caller type. Always `direct`.38663867 - `"direct"`38683869 - `Program object { caller_id, type }`38703871 - `caller_id: string`38723873 The call ID of the program item that produced this tool call.38743875 - `type: "program"`38763877 The caller type. Always `program`.38783879 - `"program"`38803881 - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`38823883 The streamed output emitted by an apply patch tool call.38843885 - `call_id: string`38863887 The unique ID of the apply patch tool call generated by the model.38883889 - `status: "completed" or "failed"`38903891 The status of the apply patch tool call output. One of `completed` or `failed`.38923893 - `"completed"`38943895 - `"failed"`38963897 - `type: "apply_patch_call_output"`38983899 The type of the item. Always `apply_patch_call_output`.39003901 - `"apply_patch_call_output"`39023903 - `id: optional string or null`39043905 The unique ID of the apply patch tool call output. Populated when this item is returned via API.39063907 - `caller: optional object { type } or object { caller_id, type } or null`39083909 The execution context that produced this tool call.39103911 - `Direct object { type }`39123913 - `type: "direct"`39143915 The caller type. Always `direct`.39163917 - `"direct"`39183919 - `Program object { caller_id, type }`39203921 - `caller_id: string`39223923 The call ID of the program item that produced this tool call.39243925 - `type: "program"`39263927 The caller type. Always `program`.39283929 - `"program"`39303931 - `output: optional string or null`39323933 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).39343935 - `McpListTools object { id, server_label, tools, 2 more }`39363937 A list of tools available on an MCP server.39383939 - `id: string`39403941 The unique ID of the list.39423943 - `server_label: string`39443945 The label of the MCP server.39463947 - `tools: array of object { input_schema, name, annotations, description }`39483949 The tools available on the server.39503951 - `input_schema: unknown`39523953 The JSON schema describing the tool's input.39543955 - `name: string`39563957 The name of the tool.39583959 - `annotations: optional unknown or null`39603961 Additional annotations about the tool.39623963 - `description: optional string or null`39643965 The description of the tool.39663967 - `type: "mcp_list_tools"`39683969 The type of the item. Always `mcp_list_tools`.39703971 - `"mcp_list_tools"`39723973 - `error: optional string or null`39743975 Error message if the server could not list tools.39763977 - `McpApprovalRequest object { id, arguments, name, 2 more }`39783979 A request for human approval of a tool invocation.39803981 - `id: string`39823983 The unique ID of the approval request.39843985 - `arguments: string`39863987 A JSON string of arguments for the tool.39883989 - `name: string`39903991 The name of the tool to run.39923993 - `server_label: string`39943995 The label of the MCP server making the request.39963997 - `type: "mcp_approval_request"`39983999 The type of the item. Always `mcp_approval_request`.40004001 - `"mcp_approval_request"`40024003 - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`40044005 A response to an MCP approval request.40064007 - `approval_request_id: string`40084009 The ID of the approval request being answered.40104011 - `approve: boolean`40124013 Whether the request was approved.40144015 - `type: "mcp_approval_response"`40164017 The type of the item. Always `mcp_approval_response`.40184019 - `"mcp_approval_response"`40204021 - `id: optional string or null`40224023 The unique ID of the approval response40244025 - `reason: optional string or null`40264027 Optional reason for the decision.40284029 - `McpCall object { id, arguments, name, 6 more }`40304031 An invocation of a tool on an MCP server.40324033 - `id: string`40344035 The unique ID of the tool call.40364037 - `arguments: string`40384039 A JSON string of the arguments passed to the tool.40404041 - `name: string`40424043 The name of the tool that was run.40444045 - `server_label: string`40464047 The label of the MCP server running the tool.40484049 - `type: "mcp_call"`40504051 The type of the item. Always `mcp_call`.40524053 - `"mcp_call"`40544055 - `approval_request_id: optional string or null`40564057 Unique identifier for the MCP tool call approval request.4058 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.40594060 - `error: optional McpToolCallError or null`40614062 The error from the tool call, if any.40634064 - `McpProtocolError object { code, message, type }`40654066 - `code: number`40674068 - `message: string`40694070 - `type: "mcp_protocol_error"`40714072 - `"mcp_protocol_error"`40734074 - `McpToolExecutionError object { content, type }`40754076 - `content: unknown`40774078 - `type: "mcp_tool_execution_error"`40794080 - `"mcp_tool_execution_error"`40814082 - `HTTPError object { code, message, type }`40834084 - `code: number`40854086 - `message: string`40874088 - `type: "http_error"`40894090 - `"http_error"`40914092 - `output: optional string or null`40934094 The output from the tool call.40954096 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`40974098 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.40994100 - `"in_progress"`41014102 - `"completed"`41034104 - `"incomplete"`41054106 - `"calling"`41074108 - `"failed"`41094110 - `CustomToolCallOutput object { call_id, output, type, 2 more }`41114112 The output of a custom tool call from your code, being sent back to the model.41134114 - `call_id: string`41154116 The call ID, used to map this custom tool call output to a custom tool call.41174118 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`41194120 The output from the custom tool call generated by your code.4121 Can be a string or an list of output content.41224123 - `StringOutput = string`41244125 A string of the output of the custom tool call.41264127 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`41284129 Text, image, or file output of the custom tool call.41304131 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`41324133 A text input to the model.41344135 - `ResponseInputImage object { detail, type, file_id, 2 more }`41364137 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).41384139 - `ResponseInputFile object { type, detail, file_data, 4 more }`41404141 A file input to the model.41424143 - `type: "custom_tool_call_output"`41444145 The type of the custom tool call output. Always `custom_tool_call_output`.41464147 - `"custom_tool_call_output"`41484149 - `id: optional string`41504151 The unique ID of the custom tool call output in the OpenAI platform.41524153 - `caller: optional object { type } or object { caller_id, type } or null`41544155 The execution context that produced this tool call.41564157 - `Direct object { type }`41584159 - `type: "direct"`41604161 The caller type. Always `direct`.41624163 - `"direct"`41644165 - `Program object { caller_id, type }`41664167 - `caller_id: string`41684169 The call ID of the program item that produced this tool call.41704171 - `type: "program"`41724173 The caller type. Always `program`.41744175 - `"program"`41764177 - `CustomToolCall object { call_id, input, name, 5 more }`41784179 A call to a custom tool created by the model.41804181 - `call_id: string`41824183 An identifier used to map this custom tool call to a tool call output.41844185 - `input: string`41864187 The input for the custom tool call generated by the model.41884189 - `name: string`41904191 The name of the custom tool being called.41924193 - `type: "custom_tool_call"`41944195 The type of the custom tool call. Always `custom_tool_call`.41964197 - `"custom_tool_call"`41984199 - `id: optional string`42004201 The unique ID of the custom tool call in the OpenAI platform.42024203 - `async: optional boolean`42044205 Whether the custom tool call runs asynchronously.42064207 - `caller: optional object { type } or object { caller_id, type } or null`42084209 The execution context that produced this tool call.42104211 - `Direct object { type }`42124213 - `type: "direct"`42144215 - `"direct"`42164217 - `Program object { caller_id, type }`42184219 - `caller_id: string`42204221 The call ID of the program item that produced this tool call.42224223 - `type: "program"`42244225 - `"program"`42264227 - `namespace: optional string`42284229 The namespace of the custom tool being called.42304231 - `CompactionTrigger object { type, id }`42324233 Compacts the current context. Must be the final input item.42344235 - `type: "compaction_trigger"`42364237 The type of the item. Always `compaction_trigger`.42384239 - `"compaction_trigger"`42404241 - `id: optional string or null`42424243 The unique ID of this compaction trigger.42444245 - `ItemReference object { id, type }`42464247 An internal identifier for an item to reference.42484249 - `id: string`42504251 The ID of the item to reference.42524253 - `type: optional "item_reference" or null`42544255 The type of item to reference. Always `item_reference`.42564257 - `"item_reference"`42584259 - `Program object { id, call_id, code, 2 more }`42604261 - `id: string`42624263 The unique ID of this program item.42644265 - `call_id: string`42664267 The stable call ID of the program item.42684269 - `code: string`42704271 The JavaScript source executed by programmatic tool calling.42724273 - `fingerprint: string`42744275 Opaque program replay fingerprint that must be round-tripped.42764277 - `type: "program"`42784279 The item type. Always `program`.42804281 - `"program"`42824283 - `ProgramOutput object { id, call_id, result, 2 more }`42844285 - `id: string`42864287 The unique ID of this program output item.42884289 - `call_id: string`42904291 The call ID of the program item.42924293 - `result: string`42944295 The result produced by the program item.42964297 - `status: "completed" or "incomplete"`42984299 The terminal status of the program output.43004301 - `"completed"`43024303 - `"incomplete"`43044305 - `type: "program_output"`43064307 The item type. Always `program_output`.43084309 - `"program_output"`43104311- `metadata: optional Metadata or null`43124313 Set of 16 key-value pairs that can be attached to an object. This can be4314 useful for storing additional information about the object in a structured4315 format, and querying for objects via API or the dashboard.43164317 Keys are strings with a maximum length of 64 characters. Values are strings4318 with a maximum length of 512 characters.43194320### Returns43214322- `Conversation object { id, created_at, metadata, object }`43234324 - `id: string`43254326 The unique ID of the conversation.43274328 - `created_at: number`43294330 The time at which the conversation was created, measured in seconds since the Unix epoch.43314332 - `metadata: unknown`43334334 Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.4335 Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.43364337 - `object: "conversation"`43384339 The object type, which is always `conversation`.43404341 - `"conversation"`43424343### Example43444345```http4346curl https://api.openai.com/v1/conversations \4347 -X POST \4348 -H "Authorization: Bearer $OPENAI_API_KEY"4349```43504351#### Response43524353```json4354{4355 "id": "id",4356 "created_at": 0,4357 "metadata": {},4358 "object": "conversation"4359}4360```43614362### Example43634364```http4365curl https://api.openai.com/v1/conversations \4366 -H "Content-Type: application/json" \4367 -H "Authorization: Bearer $OPENAI_API_KEY" \4368 -d '{4369 "metadata": {"topic": "demo"},4370 "items": [4371 {4372 "type": "message",4373 "role": "user",4374 "content": "Hello!"4375 }4376 ]4377 }'4378```43794380#### Response43814382```json4383{4384 "id": "conv_123",4385 "object": "conversation",4386 "created_at": 1741900000,4387 "metadata": {"topic": "demo"}4388}4389```4390