resources/conversations/subresources/items/methods/retrieve/index.md +0 −4313 deleted
File Deleted View Diff
1## Retrieve an item
2
3**get** `/conversations/{conversation_id}/items/{item_id}`
4
5Get a single item from a conversation with the given IDs.
6
7### Path Parameters
8
9- `conversation_id: string`
10
11- `item_id: string`
12
13### Query Parameters
14
15- `include: optional array of ResponseIncludable`
16
17 Additional fields to include in the response. See the `include`
18 parameter for [listing Conversation items above](/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information.
19
20 - `"file_search_call.results"`
21
22 - `"web_search_call.results"`
23
24 - `"web_search_call.action.sources"`
25
26 - `"message.input_image.image_url"`
27
28 - `"computer_call_output.output.image_url"`
29
30 - `"code_interpreter_call.outputs"`
31
32 - `"reasoning.encrypted_content"`
33
34 - `"message.output_text.logprobs"`
35
36### Returns
37
38- `ConversationItem = Message or object { id, arguments, call_id, 7 more } or object { id, output, status, 6 more } or 26 more`
39
40 A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output).
41
42 - `Message object { id, content, role, 3 more }`
43
44 A message to or from the model.
45
46 - `id: string`
47
48 The unique ID of the message.
49
50 - `content: array of ResponseInputText or ResponseOutputText or TextContent or 6 more`
51
52 The content of the message
53
54 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`
55
56 A text input to the model.
57
58 - `text: string`
59
60 The text input to the model.
61
62 - `type: "input_text"`
63
64 The type of the input item. Always `input_text`.
65
66 - `"input_text"`
67
68 - `prompt_cache_breakpoint: optional object { mode }`
69
70 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.
71
72 - `mode: "explicit"`
73
74 The breakpoint mode. Always `explicit`.
75
76 - `"explicit"`
77
78 - `ResponseOutputText object { annotations, logprobs, text, type }`
79
80 A text output from the model.
81
82 - `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 }`
83
84 The annotations of the text output.
85
86 - `FileCitation object { file_id, filename, index, type }`
87
88 A citation to a file.
89
90 - `file_id: string`
91
92 The ID of the file.
93
94 - `filename: string`
95
96 The filename of the file cited.
97
98 - `index: number`
99
100 The index of the file in the list of files.
101
102 - `type: "file_citation"`
103
104 The type of the file citation. Always `file_citation`.
105
106 - `"file_citation"`
107
108 - `URLCitation object { end_index, start_index, title, 2 more }`
109
110 A citation for a web resource used to generate a model response.
111
112 - `end_index: number`
113
114 The index of the last character of the URL citation in the message.
115
116 - `start_index: number`
117
118 The index of the first character of the URL citation in the message.
119
120 - `title: string`
121
122 The title of the web resource.
123
124 - `type: "url_citation"`
125
126 The type of the URL citation. Always `url_citation`.
127
128 - `"url_citation"`
129
130 - `url: string`
131
132 The URL of the web resource.
133
134 - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`
135
136 A citation for a container file used to generate a model response.
137
138 - `container_id: string`
139
140 The ID of the container file.
141
142 - `end_index: number`
143
144 The index of the last character of the container file citation in the message.
145
146 - `file_id: string`
147
148 The ID of the file.
149
150 - `filename: string`
151
152 The filename of the container file cited.
153
154 - `start_index: number`
155
156 The index of the first character of the container file citation in the message.
157
158 - `type: "container_file_citation"`
159
160 The type of the container file citation. Always `container_file_citation`.
161
162 - `"container_file_citation"`
163
164 - `FilePath object { file_id, index, type }`
165
166 A path to a file.
167
168 - `file_id: string`
169
170 The ID of the file.
171
172 - `index: number`
173
174 The index of the file in the list of files.
175
176 - `type: "file_path"`
177
178 The type of the file path. Always `file_path`.
179
180 - `"file_path"`
181
182 - `logprobs: array of object { token, bytes, logprob, top_logprobs }`
183
184 - `token: string`
185
186 - `bytes: array of number`
187
188 - `logprob: number`
189
190 - `top_logprobs: array of object { token, bytes, logprob }`
191
192 - `token: string`
193
194 - `bytes: array of number`
195
196 - `logprob: number`
197
198 - `text: string`
199
200 The text output from the model.
201
202 - `type: "output_text"`
203
204 The type of the output text. Always `output_text`.
205
206 - `"output_text"`
207
208 - `TextContent object { text, type }`
209
210 A text content.
211
212 - `text: string`
213
214 - `type: "text"`
215
216 - `"text"`
217
218 - `SummaryTextContent object { text, type }`
219
220 A summary text from the model.
221
222 - `text: string`
223
224 A summary of the reasoning output from the model so far.
225
226 - `type: "summary_text"`
227
228 The type of the object. Always `summary_text`.
229
230 - `"summary_text"`
231
232 - `ReasoningText object { text, type }`
233
234 Reasoning text from the model.
235
236 - `text: string`
237
238 The reasoning text from the model.
239
240 - `type: "reasoning_text"`
241
242 The type of the reasoning text. Always `reasoning_text`.
243
244 - `"reasoning_text"`
245
246 - `ResponseOutputRefusal object { refusal, type }`
247
248 A refusal from the model.
249
250 - `refusal: string`
251
252 The refusal explanation from the model.
253
254 - `type: "refusal"`
255
256 The type of the refusal. Always `refusal`.
257
258 - `"refusal"`
259
260 - `ResponseInputImage object { detail, type, file_id, 2 more }`
261
262 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).
263
264 - `detail: ImageDetail`
265
266 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
267
268 - `"low"`
269
270 - `"high"`
271
272 - `"auto"`
273
274 - `"original"`
275
276 - `type: "input_image"`
277
278 The type of the input item. Always `input_image`.
279
280 - `"input_image"`
281
282 - `file_id: optional string or null`
283
284 The ID of the file to be sent to the model.
285
286 - `image_url: optional string or null`
287
288 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
289
290 - `prompt_cache_breakpoint: optional object { mode }`
291
292 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.
293
294 - `mode: "explicit"`
295
296 The breakpoint mode. Always `explicit`.
297
298 - `"explicit"`
299
300 - `ComputerScreenshotContent object { detail, file_id, image_url, 2 more }`
301
302 A screenshot of a computer.
303
304 - `detail: ImageDetail`
305
306 The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
307
308 - `file_id: string or null`
309
310 The identifier of an uploaded file that contains the screenshot.
311
312 - `image_url: string or null`
313
314 The URL of the screenshot image.
315
316 - `type: "computer_screenshot"`
317
318 Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
319
320 - `"computer_screenshot"`
321
322 - `prompt_cache_breakpoint: optional object { mode }`
323
324 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.
325
326 - `mode: "explicit"`
327
328 The breakpoint mode. Always `explicit`.
329
330 - `"explicit"`
331
332 - `ResponseInputFile object { type, detail, file_data, 4 more }`
333
334 A file input to the model.
335
336 - `type: "input_file"`
337
338 The type of the input item. Always `input_file`.
339
340 - `"input_file"`
341
342 - `detail: optional "auto" or "low" or "high"`
343
344 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`.
345
346 - `"auto"`
347
348 - `"low"`
349
350 - `"high"`
351
352 - `file_data: optional string`
353
354 The content of the file to be sent to the model.
355
356 - `file_id: optional string or null`
357
358 The ID of the file to be sent to the model.
359
360 - `file_url: optional string`
361
362 The URL of the file to be sent to the model.
363
364 - `filename: optional string`
365
366 The name of the file to be sent to the model.
367
368 - `prompt_cache_breakpoint: optional object { mode }`
369
370 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.
371
372 - `mode: "explicit"`
373
374 The breakpoint mode. Always `explicit`.
375
376 - `"explicit"`
377
378 - `role: "unknown" or "user" or "assistant" or 5 more`
379
380 The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.
381
382 - `"unknown"`
383
384 - `"user"`
385
386 - `"assistant"`
387
388 - `"system"`
389
390 - `"critic"`
391
392 - `"discriminator"`
393
394 - `"developer"`
395
396 - `"tool"`
397
398 - `status: "in_progress" or "completed" or "incomplete"`
399
400 The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
401
402 - `"in_progress"`
403
404 - `"completed"`
405
406 - `"incomplete"`
407
408 - `type: "message"`
409
410 The type of the message. Always set to `message`.
411
412 - `"message"`
413
414 - `phase: optional "commentary" or "final_answer" or null`
415
416 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
417
418 - `"commentary"`
419
420 - `"final_answer"`
421
422 - `FunctionCall object { id, arguments, call_id, 7 more }`
423
424 - `id: string`
425
426 The unique ID of the function tool call.
427
428 - `arguments: string`
429
430 A JSON string of the arguments to pass to the function.
431
432 - `call_id: string`
433
434 The unique ID of the function tool call generated by the model.
435
436 - `name: string`
437
438 The name of the function to run.
439
440 - `status: "in_progress" or "completed" or "incomplete"`
441
442 The status of the item. One of `in_progress`, `completed`, or
443 `incomplete`. Populated when items are returned via API.
444
445 - `"in_progress"`
446
447 - `"completed"`
448
449 - `"incomplete"`
450
451 - `type: "function_call"`
452
453 The type of the function tool call. Always `function_call`.
454
455 - `"function_call"`
456
457 - `async: optional boolean`
458
459 Whether the function tool call runs asynchronously.
460
461 - `caller: optional object { type } or object { caller_id, type } or null`
462
463 The execution context that produced this tool call.
464
465 - `Direct object { type }`
466
467 - `type: "direct"`
468
469 - `"direct"`
470
471 - `Program object { caller_id, type }`
472
473 - `caller_id: string`
474
475 The call ID of the program item that produced this tool call.
476
477 - `type: "program"`
478
479 - `"program"`
480
481 - `created_by: optional string`
482
483 The identifier of the actor that created the item.
484
485 - `namespace: optional string`
486
487 The namespace of the function to run.
488
489 - `FunctionCallOutput object { id, output, status, 6 more }`
490
491 - `id: string`
492
493 The unique ID of the function call tool output.
494
495 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`
496
497 The output from the function call generated by your code.
498 Can be a string or an list of output content.
499
500 - `StringOutput = string`
501
502 A string of the output of the function call.
503
504 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`
505
506 Text, image, or file output of the function call.
507
508 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`
509
510 A text input to the model.
511
512 - `ResponseInputImage object { detail, type, file_id, 2 more }`
513
514 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).
515
516 - `ResponseInputFile object { type, detail, file_data, 4 more }`
517
518 A file input to the model.
519
520 - `status: "in_progress" or "completed" or "incomplete"`
521
522 The status of the item. One of `in_progress`, `completed`, or
523 `incomplete`. Populated when items are returned via API.
524
525 - `"in_progress"`
526
527 - `"completed"`
528
529 - `"incomplete"`
530
531 - `type: "function_call_output"`
532
533 The type of the function tool call output. Always `function_call_output`.
534
535 - `"function_call_output"`
536
537 - `call_id: optional string`
538
539 The unique ID of the function tool call generated by the model.
540
541 - `caller: optional object { type } or object { caller_id, type } or null`
542
543 The execution context that produced this tool call.
544
545 - `Direct object { type }`
546
547 - `type: "direct"`
548
549 The caller type. Always `direct`.
550
551 - `"direct"`
552
553 - `Program object { caller_id, type }`
554
555 - `caller_id: string`
556
557 The call ID of the program item that produced this tool call.
558
559 - `type: "program"`
560
561 The caller type. Always `program`.
562
563 - `"program"`
564
565 - `created_by: optional string`
566
567 The identifier of the actor that created the item.
568
569 - `name: optional string`
570
571 The name of the tool that produced the output.
572
573 - `namespace: optional string`
574
575 The namespace of the tool that produced the output.
576
577 - `FileSearchCall object { id, queries, status, 2 more }`
578
579 The results of a file search tool call. See the
580 [file search guide](/api/docs/guides/tools-file-search) for more information.
581
582 - `id: string`
583
584 The unique ID of the file search tool call.
585
586 - `queries: array of string`
587
588 The queries used to search for files.
589
590 - `status: "in_progress" or "searching" or "completed" or 2 more`
591
592 The status of the file search tool call. One of `in_progress`,
593 `searching`, `incomplete` or `failed`,
594
595 - `"in_progress"`
596
597 - `"searching"`
598
599 - `"completed"`
600
601 - `"incomplete"`
602
603 - `"failed"`
604
605 - `type: "file_search_call"`
606
607 The type of the file search tool call. Always `file_search_call`.
608
609 - `"file_search_call"`
610
611 - `results: optional array of object { attributes, file_id, filename, 2 more } or null`
612
613 The results of the file search tool call.
614
615 - `attributes: optional map[string or number or boolean] or null`
616
617 Set of 16 key-value pairs that can be attached to an object. This can be
618 useful for storing additional information about the object in a structured
619 format, and querying for objects via API or the dashboard. Keys are strings
620 with a maximum length of 64 characters. Values are strings with a maximum
621 length of 512 characters, booleans, or numbers.
622
623 - `string`
624
625 - `number`
626
627 - `boolean`
628
629 - `file_id: optional string`
630
631 The unique ID of the file.
632
633 - `filename: optional string`
634
635 The name of the file.
636
637 - `score: optional number`
638
639 The relevance score of the file - a value between 0 and 1.
640
641 - `text: optional string`
642
643 The text that was retrieved from the file.
644
645 - `WebSearchCall object { id, action, status, type }`
646
647 The results of a web search tool call. See the
648 [web search guide](/api/docs/guides/tools-web-search) for more information.
649
650 - `id: string`
651
652 The unique ID of the web search tool call.
653
654 - `action: object { type, queries, query, sources } or object { type, url } or object { pattern, type, url }`
655
656 An object describing the specific action taken in this web search call.
657 Includes details on how the model used the web (search, open_page, find_in_page).
658
659 - `Search object { type, queries, query, sources }`
660
661 Action type "search" - Performs a web search query.
662
663 - `type: "search"`
664
665 The action type.
666
667 - `"search"`
668
669 - `queries: optional array of string`
670
671 The search queries.
672
673 - `query: optional string`
674
675 The search query.
676
677 - `sources: optional array of object { type, url }`
678
679 The sources used in the search.
680
681 - `type: "url"`
682
683 The type of source. Always `url`.
684
685 - `"url"`
686
687 - `url: string`
688
689 The URL of the source.
690
691 - `OpenPage object { type, url }`
692
693 Action type "open_page" - Opens a specific URL from search results.
694
695 - `type: "open_page"`
696
697 The action type.
698
699 - `"open_page"`
700
701 - `url: optional string or null`
702
703 The URL opened by the model.
704
705 - `FindInPage object { pattern, type, url }`
706
707 Action type "find_in_page": Searches for a pattern within a loaded page.
708
709 - `pattern: string`
710
711 The pattern or text to search for within the page.
712
713 - `type: "find_in_page"`
714
715 The action type.
716
717 - `"find_in_page"`
718
719 - `url: string`
720
721 The URL of the page searched for the pattern.
722
723 - `status: "in_progress" or "searching" or "completed" or 2 more`
724
725 The status of the web search tool call.
726
727 - `"in_progress"`
728
729 - `"searching"`
730
731 - `"completed"`
732
733 - `"failed"`
734
735 - `"incomplete"`
736
737 - `type: "web_search_call"`
738
739 The type of the web search tool call. Always `web_search_call`.
740
741 - `"web_search_call"`
742
743 - `ImageGenerationCall object { id, result, status, 7 more }`
744
745 An image generation request made by the model.
746
747 - `id: string`
748
749 The unique ID of the image generation call.
750
751 - `result: string or null`
752
753 The generated image encoded in base64.
754
755 - `status: "in_progress" or "completed" or "generating" or "failed"`
756
757 The status of the image generation call.
758
759 - `"in_progress"`
760
761 - `"completed"`
762
763 - `"generating"`
764
765 - `"failed"`
766
767 - `type: "image_generation_call"`
768
769 The type of the image generation call. Always `image_generation_call`.
770
771 - `"image_generation_call"`
772
773 - `action: optional "generate" or "edit" or "auto" or null`
774
775 The action used for image generation.
776
777 - `"generate"`
778
779 - `"edit"`
780
781 - `"auto"`
782
783 - `background: optional "transparent" or "opaque" or "auto" or null`
784
785 The background setting used for generation.
786
787 - `"transparent"`
788
789 - `"opaque"`
790
791 - `"auto"`
792
793 - `output_format: optional "png" or "webp" or "jpeg" or null`
794
795 The output format used for generation.
796
797 - `"png"`
798
799 - `"webp"`
800
801 - `"jpeg"`
802
803 - `quality: optional "low" or "medium" or "high" or 3 more or null`
804
805 The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
806
807 - `"low"`
808
809 - `"medium"`
810
811 - `"high"`
812
813 - `"xhigh"`
814
815 - `"max"`
816
817 - `"auto"`
818
819 - `revised_prompt: optional string or null`
820
821 The prompt that was used after any model prompt rewriting.
822
823 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`
824
825 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
826
827 - `string`
828
829 - `"1024x1024" or "1024x1536" or "1536x1024"`
830
831 The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
832
833 - `"1024x1024"`
834
835 - `"1024x1536"`
836
837 - `"1536x1024"`
838
839 - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`
840
841 A tool call to a computer use tool. See the
842 [computer use guide](/api/docs/guides/tools-computer-use) for more information.
843
844 - `id: string`
845
846 The unique ID of the computer call.
847
848 - `call_id: string`
849
850 An identifier used when responding to the tool call with output.
851
852 - `pending_safety_checks: array of object { id, code, message }`
853
854 The pending safety checks for the computer call.
855
856 - `id: string`
857
858 The ID of the pending safety check.
859
860 - `code: optional string or null`
861
862 The type of the pending safety check.
863
864 - `message: optional string or null`
865
866 Details about the pending safety check.
867
868 - `status: "in_progress" or "completed" or "incomplete"`
869
870 The status of the item. One of `in_progress`, `completed`, or
871 `incomplete`. Populated when items are returned via API.
872
873 - `"in_progress"`
874
875 - `"completed"`
876
877 - `"incomplete"`
878
879 - `type: "computer_call"`
880
881 The type of the computer call. Always `computer_call`.
882
883 - `"computer_call"`
884
885 - `action: optional ComputerAction`
886
887 A click action.
888
889 - `Click object { button, type, x, 2 more }`
890
891 A click action.
892
893 - `button: "left" or "right" or "wheel" or 2 more`
894
895 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
896
897 - `"left"`
898
899 - `"right"`
900
901 - `"wheel"`
902
903 - `"back"`
904
905 - `"forward"`
906
907 - `type: "click"`
908
909 Specifies the event type. For a click action, this property is always `click`.
910
911 - `"click"`
912
913 - `x: number`
914
915 The x-coordinate where the click occurred.
916
917 - `y: number`
918
919 The y-coordinate where the click occurred.
920
921 - `keys: optional array of string or null`
922
923 The keys being held while clicking.
924
925 - `DoubleClick object { keys, type, x, y }`
926
927 A double click action.
928
929 - `keys: array of string or null`
930
931 The keys being held while double-clicking.
932
933 - `type: "double_click"`
934
935 Specifies the event type. For a double click action, this property is always set to `double_click`.
936
937 - `"double_click"`
938
939 - `x: number`
940
941 The x-coordinate where the double click occurred.
942
943 - `y: number`
944
945 The y-coordinate where the double click occurred.
946
947 - `Drag object { path, type, keys }`
948
949 A drag action.
950
951 - `path: array of object { x, y }`
952
953 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
954
955 ```
956 [
957 { x: 100, y: 200 },
958 { x: 200, y: 300 }
959 ]
960 ```
961
962 - `x: number`
963
964 The x-coordinate.
965
966 - `y: number`
967
968 The y-coordinate.
969
970 - `type: "drag"`
971
972 Specifies the event type. For a drag action, this property is always set to `drag`.
973
974 - `"drag"`
975
976 - `keys: optional array of string or null`
977
978 The keys being held while dragging the mouse.
979
980 - `Keypress object { keys, type }`
981
982 A collection of keypresses the model would like to perform.
983
984 - `keys: array of string`
985
986 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
987
988 - `type: "keypress"`
989
990 Specifies the event type. For a keypress action, this property is always set to `keypress`.
991
992 - `"keypress"`
993
994 - `Move object { type, x, y, keys }`
995
996 A mouse move action.
997
998 - `type: "move"`
999
1000 Specifies the event type. For a move action, this property is always set to `move`.
1001
1002 - `"move"`
1003
1004 - `x: number`
1005
1006 The x-coordinate to move to.
1007
1008 - `y: number`
1009
1010 The y-coordinate to move to.
1011
1012 - `keys: optional array of string or null`
1013
1014 The keys being held while moving the mouse.
1015
1016 - `Screenshot object { type }`
1017
1018 A screenshot action.
1019
1020 - `type: "screenshot"`
1021
1022 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
1023
1024 - `"screenshot"`
1025
1026 - `Scroll object { scroll_x, scroll_y, type, 3 more }`
1027
1028 A scroll action.
1029
1030 - `scroll_x: number`
1031
1032 The horizontal scroll distance.
1033
1034 - `scroll_y: number`
1035
1036 The vertical scroll distance.
1037
1038 - `type: "scroll"`
1039
1040 Specifies the event type. For a scroll action, this property is always set to `scroll`.
1041
1042 - `"scroll"`
1043
1044 - `x: number`
1045
1046 The x-coordinate where the scroll occurred.
1047
1048 - `y: number`
1049
1050 The y-coordinate where the scroll occurred.
1051
1052 - `keys: optional array of string or null`
1053
1054 The keys being held while scrolling.
1055
1056 - `Type object { text, type }`
1057
1058 An action to type in text.
1059
1060 - `text: string`
1061
1062 The text to type.
1063
1064 - `type: "type"`
1065
1066 Specifies the event type. For a type action, this property is always set to `type`.
1067
1068 - `"type"`
1069
1070 - `Wait object { type }`
1071
1072 A wait action.
1073
1074 - `type: "wait"`
1075
1076 Specifies the event type. For a wait action, this property is always set to `wait`.
1077
1078 - `"wait"`
1079
1080 - `actions: optional ComputerActionList`
1081
1082 Flattened batched actions for `computer_use`. Each action includes an
1083 `type` discriminator and action-specific fields.
1084
1085 - `Click object { button, type, x, 2 more }`
1086
1087 A click action.
1088
1089 - `DoubleClick object { keys, type, x, y }`
1090
1091 A double click action.
1092
1093 - `Drag object { path, type, keys }`
1094
1095 A drag action.
1096
1097 - `Keypress object { keys, type }`
1098
1099 A collection of keypresses the model would like to perform.
1100
1101 - `Move object { type, x, y, keys }`
1102
1103 A mouse move action.
1104
1105 - `Screenshot object { type }`
1106
1107 A screenshot action.
1108
1109 - `Scroll object { scroll_x, scroll_y, type, 3 more }`
1110
1111 A scroll action.
1112
1113 - `Type object { text, type }`
1114
1115 An action to type in text.
1116
1117 - `Wait object { type }`
1118
1119 A wait action.
1120
1121 - `ComputerCallOutput object { id, call_id, output, 4 more }`
1122
1123 - `id: string`
1124
1125 The unique ID of the computer call tool output.
1126
1127 - `call_id: string`
1128
1129 The ID of the computer tool call that produced the output.
1130
1131 - `output: ResponseComputerToolCallOutputScreenshot`
1132
1133 A computer screenshot image used with the computer use tool.
1134
1135 - `type: "computer_screenshot"`
1136
1137 Specifies the event type. For a computer screenshot, this property is
1138 always set to `computer_screenshot`.
1139
1140 - `"computer_screenshot"`
1141
1142 - `file_id: optional string`
1143
1144 The identifier of an uploaded file that contains the screenshot.
1145
1146 - `image_url: optional string`
1147
1148 The URL of the screenshot image.
1149
1150 - `status: "completed" or "incomplete" or "failed" or "in_progress"`
1151
1152 The status of the message input. One of `in_progress`, `completed`, or
1153 `incomplete`. Populated when input items are returned via API.
1154
1155 - `"completed"`
1156
1157 - `"incomplete"`
1158
1159 - `"failed"`
1160
1161 - `"in_progress"`
1162
1163 - `type: "computer_call_output"`
1164
1165 The type of the computer tool call output. Always `computer_call_output`.
1166
1167 - `"computer_call_output"`
1168
1169 - `acknowledged_safety_checks: optional array of object { id, code, message }`
1170
1171 The safety checks reported by the API that have been acknowledged by the
1172 developer.
1173
1174 - `id: string`
1175
1176 The ID of the pending safety check.
1177
1178 - `code: optional string or null`
1179
1180 The type of the pending safety check.
1181
1182 - `message: optional string or null`
1183
1184 Details about the pending safety check.
1185
1186 - `created_by: optional string`
1187
1188 The identifier of the actor that created the item.
1189
1190 - `ToolSearchCall object { id, arguments, call_id, 4 more }`
1191
1192 - `id: string`
1193
1194 The unique ID of the tool search call item.
1195
1196 - `arguments: unknown`
1197
1198 Arguments used for the tool search call.
1199
1200 - `call_id: string or null`
1201
1202 The unique ID of the tool search call generated by the model.
1203
1204 - `execution: "server" or "client"`
1205
1206 Whether tool search was executed by the server or by the client.
1207
1208 - `"server"`
1209
1210 - `"client"`
1211
1212 - `status: "in_progress" or "completed" or "incomplete"`
1213
1214 The status of the tool search call item that was recorded.
1215
1216 - `"in_progress"`
1217
1218 - `"completed"`
1219
1220 - `"incomplete"`
1221
1222 - `type: "tool_search_call"`
1223
1224 The type of the item. Always `tool_search_call`.
1225
1226 - `"tool_search_call"`
1227
1228 - `created_by: optional string`
1229
1230 The identifier of the actor that created the item.
1231
1232 - `ToolSearchOutput object { id, call_id, execution, 4 more }`
1233
1234 - `id: string`
1235
1236 The unique ID of the tool search output item.
1237
1238 - `call_id: string or null`
1239
1240 The unique ID of the tool search call generated by the model.
1241
1242 - `execution: "server" or "client"`
1243
1244 Whether tool search was executed by the server or by the client.
1245
1246 - `"server"`
1247
1248 - `"client"`
1249
1250 - `status: "in_progress" or "completed" or "incomplete"`
1251
1252 The status of the tool search output item that was recorded.
1253
1254 - `"in_progress"`
1255
1256 - `"completed"`
1257
1258 - `"incomplete"`
1259
1260 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`
1261
1262 The loaded tool definitions returned by tool search.
1263
1264 - `Function object { name, parameters, strict, 6 more }`
1265
1266 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).
1267
1268 - `name: string`
1269
1270 The name of the function to call.
1271
1272 - `parameters: map[unknown] or null`
1273
1274 A JSON schema object describing the parameters of the function.
1275
1276 - `strict: boolean or null`
1277
1278 Whether strict parameter validation is enforced for this function tool.
1279
1280 - `type: "function"`
1281
1282 The type of the function tool. Always `function`.
1283
1284 - `"function"`
1285
1286 - `allowed_callers: optional array of "direct" or "programmatic" or null`
1287
1288 The tool invocation context(s).
1289
1290 - `"direct"`
1291
1292 - `"programmatic"`
1293
1294 - `async: optional boolean`
1295
1296 - `defer_loading: optional boolean`
1297
1298 Whether this function is deferred and loaded via tool search.
1299
1300 - `description: optional string or null`
1301
1302 A description of the function. Used by the model to determine whether or not to call the function.
1303
1304 - `output_schema: optional map[unknown] or null`
1305
1306 A JSON schema object describing the JSON value encoded in string outputs for this function.
1307
1308 - `FileSearch object { type, vector_store_ids, filters, 2 more }`
1309
1310 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).
1311
1312 - `type: "file_search"`
1313
1314 The type of the file search tool. Always `file_search`.
1315
1316 - `"file_search"`
1317
1318 - `vector_store_ids: array of string`
1319
1320 The IDs of the vector stores to search.
1321
1322 - `filters: optional ComparisonFilter or CompoundFilter or null`
1323
1324 A filter to apply.
1325
1326 - `ComparisonFilter object { key, type, value }`
1327
1328 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1329
1330 - `key: string`
1331
1332 The key to compare against the value.
1333
1334 - `type: "eq" or "ne" or "gt" or 5 more`
1335
1336 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1337
1338 - `eq`: equals
1339 - `ne`: not equal
1340 - `gt`: greater than
1341 - `gte`: greater than or equal
1342 - `lt`: less than
1343 - `lte`: less than or equal
1344 - `in`: in
1345 - `nin`: not in
1346
1347 - `"eq"`
1348
1349 - `"ne"`
1350
1351 - `"gt"`
1352
1353 - `"gte"`
1354
1355 - `"lt"`
1356
1357 - `"lte"`
1358
1359 - `"in"`
1360
1361 - `"nin"`
1362
1363 - `value: string or number or boolean or array of string or number`
1364
1365 The value to compare against the attribute key; supports string, number, or boolean types.
1366
1367 - `string`
1368
1369 - `number`
1370
1371 - `boolean`
1372
1373 - `array of string or number`
1374
1375 - `string`
1376
1377 - `number`
1378
1379 - `CompoundFilter object { filters, type }`
1380
1381 Combine multiple filters using `and` or `or`.
1382
1383 - `filters: array of ComparisonFilter or unknown`
1384
1385 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1386
1387 - `ComparisonFilter object { key, type, value }`
1388
1389 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1390
1391 - `unknown`
1392
1393 - `type: "and" or "or"`
1394
1395 Type of operation: `and` or `or`.
1396
1397 - `"and"`
1398
1399 - `"or"`
1400
1401 - `max_num_results: optional number`
1402
1403 The maximum number of results to return. This number should be between 1 and 50 inclusive.
1404
1405 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
1406
1407 Ranking options for search.
1408
1409 - `hybrid_search: optional object { embedding_weight, text_weight }`
1410
1411 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
1412
1413 - `embedding_weight: number`
1414
1415 The weight of the embedding in the reciprocal ranking fusion.
1416
1417 - `text_weight: number`
1418
1419 The weight of the text in the reciprocal ranking fusion.
1420
1421 - `ranker: optional "auto" or "default-2024-11-15"`
1422
1423 The ranker to use for the file search.
1424
1425 - `"auto"`
1426
1427 - `"default-2024-11-15"`
1428
1429 - `score_threshold: optional number`
1430
1431 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.
1432
1433 - `Computer object { type }`
1434
1435 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).
1436
1437 - `type: "computer"`
1438
1439 The type of the computer tool. Always `computer`.
1440
1441 - `"computer"`
1442
1443 - `ComputerUsePreview object { display_height, display_width, environment, type }`
1444
1445 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).
1446
1447 - `display_height: number`
1448
1449 The height of the computer display.
1450
1451 - `display_width: number`
1452
1453 The width of the computer display.
1454
1455 - `environment: "windows" or "mac" or "linux" or 2 more`
1456
1457 The type of computer environment to control.
1458
1459 - `"windows"`
1460
1461 - `"mac"`
1462
1463 - `"linux"`
1464
1465 - `"ubuntu"`
1466
1467 - `"browser"`
1468
1469 - `type: "computer_use_preview"`
1470
1471 The type of the computer use tool. Always `computer_use_preview`.
1472
1473 - `"computer_use_preview"`
1474
1475 - `WebSearch object { type, external_web_access, filters, 2 more }`
1476
1477 Search the Internet for sources related to the prompt. Learn more about the
1478 [web search tool](/api/docs/guides/tools-web-search).
1479
1480 - `type: "web_search" or "web_search_2025_08_26"`
1481
1482 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
1483
1484 - `"web_search"`
1485
1486 - `"web_search_2025_08_26"`
1487
1488 - `external_web_access: optional boolean`
1489
1490 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.
1491
1492 - `filters: optional object { allowed_domains } or null`
1493
1494 Filters for the search.
1495
1496 - `allowed_domains: optional array of string or null`
1497
1498 Allowed domains for the search. If not provided, all domains are allowed.
1499 Subdomains of the provided domains are allowed as well.
1500
1501 Example: `["pubmed.ncbi.nlm.nih.gov"]`
1502
1503 - `search_context_size: optional "low" or "medium" or "high"`
1504
1505 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.
1506
1507 - `"low"`
1508
1509 - `"medium"`
1510
1511 - `"high"`
1512
1513 - `user_location: optional object { city, country, region, 2 more } or null`
1514
1515 The approximate location of the user.
1516
1517 - `city: optional string or null`
1518
1519 Free text input for the city of the user, e.g. `San Francisco`.
1520
1521 - `country: optional string or null`
1522
1523 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
1524
1525 - `region: optional string or null`
1526
1527 Free text input for the region of the user, e.g. `California`.
1528
1529 - `timezone: optional string or null`
1530
1531 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
1532
1533 - `type: optional "approximate"`
1534
1535 The type of location approximation. Always `approximate`.
1536
1537 - `"approximate"`
1538
1539 - `Mcp object { server_label, type, allowed_callers, 9 more }`
1540
1541 Give the model access to additional tools via remote Model Context Protocol
1542 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).
1543
1544 - `server_label: string`
1545
1546 A label for this MCP server, used to identify it in tool calls.
1547
1548 - `type: "mcp"`
1549
1550 The type of the MCP tool. Always `mcp`.
1551
1552 - `"mcp"`
1553
1554 - `allowed_callers: optional array of "direct" or "programmatic" or null`
1555
1556 The tool invocation context(s).
1557
1558 - `"direct"`
1559
1560 - `"programmatic"`
1561
1562 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`
1563
1564 List of allowed tool names or a filter object.
1565
1566 - `McpAllowedTools = array of string`
1567
1568 A string array of allowed tool names
1569
1570 - `McpToolFilter object { read_only, tool_names }`
1571
1572 A filter object to specify which tools are allowed.
1573
1574 - `read_only: optional boolean`
1575
1576 Indicates whether or not a tool modifies data or is read-only. If an
1577 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1578 it will match this filter.
1579
1580 - `tool_names: optional array of string`
1581
1582 List of allowed tool names.
1583
1584 - `authorization: optional string`
1585
1586 An OAuth access token that can be used with a remote MCP server, either
1587 with a custom MCP server URL or a service connector. Your application
1588 must handle the OAuth authorization flow and provide the token here.
1589
1590 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`
1591
1592 Identifier for service connectors, like those available in ChatGPT. One of
1593 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
1594 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).
1595
1596 This field is deprecated for models released after September 1, 2026.
1597 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to
1598 connect through a Secure MCP Tunnel.
1599
1600 Currently supported `connector_id` values are:
1601
1602 - Dropbox: `connector_dropbox`
1603 - Gmail: `connector_gmail`
1604 - Google Calendar: `connector_googlecalendar`
1605 - Google Drive: `connector_googledrive`
1606 - Microsoft Teams: `connector_microsoftteams`
1607 - Outlook Calendar: `connector_outlookcalendar`
1608 - Outlook Email: `connector_outlookemail`
1609 - SharePoint: `connector_sharepoint`
1610
1611 - `"connector_dropbox"`
1612
1613 - `"connector_gmail"`
1614
1615 - `"connector_googlecalendar"`
1616
1617 - `"connector_googledrive"`
1618
1619 - `"connector_microsoftteams"`
1620
1621 - `"connector_outlookcalendar"`
1622
1623 - `"connector_outlookemail"`
1624
1625 - `"connector_sharepoint"`
1626
1627 - `defer_loading: optional boolean`
1628
1629 Whether this MCP tool is deferred and discovered via tool search.
1630
1631 - `headers: optional map[string] or null`
1632
1633 Optional HTTP headers to send to the MCP server. Use for authentication
1634 or other purposes.
1635
1636 - `require_approval: optional object { always, never } or "always" or "never" or null`
1637
1638 Specify which of the MCP server's tools require approval.
1639
1640 - `McpToolApprovalFilter object { always, never }`
1641
1642 Specify which of the MCP server's tools require approval. Can be
1643 `always`, `never`, or a filter object associated with tools
1644 that require approval.
1645
1646 - `always: optional object { read_only, tool_names }`
1647
1648 A filter object to specify which tools are allowed.
1649
1650 - `read_only: optional boolean`
1651
1652 Indicates whether or not a tool modifies data or is read-only. If an
1653 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1654 it will match this filter.
1655
1656 - `tool_names: optional array of string`
1657
1658 List of allowed tool names.
1659
1660 - `never: optional object { read_only, tool_names }`
1661
1662 A filter object to specify which tools are allowed.
1663
1664 - `read_only: optional boolean`
1665
1666 Indicates whether or not a tool modifies data or is read-only. If an
1667 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1668 it will match this filter.
1669
1670 - `tool_names: optional array of string`
1671
1672 List of allowed tool names.
1673
1674 - `McpToolApprovalSetting = "always" or "never"`
1675
1676 Specify a single approval policy for all tools. One of `always` or
1677 `never`. When set to `always`, all tools will require approval. When
1678 set to `never`, all tools will not require approval.
1679
1680 - `"always"`
1681
1682 - `"never"`
1683
1684 - `server_description: optional string`
1685
1686 Optional description of the MCP server, used to provide more context.
1687
1688 - `server_url: optional string`
1689
1690 The URL for the MCP server. One of `server_url`, `connector_id`, or
1691 `tunnel_id` must be provided.
1692
1693 - `tunnel_id: optional string`
1694
1695 The Secure MCP Tunnel ID to use instead of a direct server URL. One of
1696 `server_url`, `connector_id`, or `tunnel_id` must be provided.
1697
1698 - `CodeInterpreter object { container, type, allowed_callers }`
1699
1700 A tool that runs Python code to help generate a response to a prompt.
1701
1702 - `container: string or object { type, file_ids, memory_limit, network_policy }`
1703
1704 The code interpreter container. Can be a container ID or an object that
1705 specifies uploaded file IDs to make available to your code, along with an
1706 optional `memory_limit` setting.
1707
1708 - `string`
1709
1710 The container ID.
1711
1712 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
1713
1714 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1715
1716 - `type: "auto"`
1717
1718 Always `auto`.
1719
1720 - `"auto"`
1721
1722 - `file_ids: optional array of string`
1723
1724 An optional list of uploaded files to make available to your code.
1725
1726 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`
1727
1728 The memory limit for the code interpreter container.
1729
1730 - `"1g"`
1731
1732 - `"4g"`
1733
1734 - `"16g"`
1735
1736 - `"64g"`
1737
1738 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
1739
1740 Network access policy for the container.
1741
1742 - `ContainerNetworkPolicyDisabled object { type }`
1743
1744 - `type: "disabled"`
1745
1746 Disable outbound network access. Always `disabled`.
1747
1748 - `"disabled"`
1749
1750 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
1751
1752 - `allowed_domains: array of string`
1753
1754 A list of allowed domains when type is `allowlist`.
1755
1756 - `type: "allowlist"`
1757
1758 Allow outbound network access only to specified domains. Always `allowlist`.
1759
1760 - `"allowlist"`
1761
1762 - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`
1763
1764 Optional domain-scoped secrets for allowlisted domains.
1765
1766 - `domain: string`
1767
1768 The domain associated with the secret.
1769
1770 - `name: string`
1771
1772 The name of the secret to inject for the domain.
1773
1774 - `value: string`
1775
1776 The secret value to inject for the domain.
1777
1778 - `type: "code_interpreter"`
1779
1780 The type of the code interpreter tool. Always `code_interpreter`.
1781
1782 - `"code_interpreter"`
1783
1784 - `allowed_callers: optional array of "direct" or "programmatic" or null`
1785
1786 The tool invocation context(s).
1787
1788 - `"direct"`
1789
1790 - `"programmatic"`
1791
1792 - `ProgrammaticToolCalling object { type }`
1793
1794 - `type: "programmatic_tool_calling"`
1795
1796 The type of the tool. Always `programmatic_tool_calling`.
1797
1798 - `"programmatic_tool_calling"`
1799
1800 - `ImageGeneration object { type, action, background, 9 more }`
1801
1802 A tool that generates images using the GPT image models.
1803
1804 - `type: "image_generation"`
1805
1806 The type of the image generation tool. Always `image_generation`.
1807
1808 - `"image_generation"`
1809
1810 - `action: optional "generate" or "edit" or "auto"`
1811
1812 Whether to generate a new image or edit an existing image. Default: `auto`.
1813
1814 - `"generate"`
1815
1816 - `"edit"`
1817
1818 - `"auto"`
1819
1820 - `background: optional "transparent" or "opaque" or "auto"`
1821
1822 Set the background of the generated image. One of `transparent`, `opaque`,
1823 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including
1824 their `2026-09-08` snapshots, support `opaque` and `transparent`
1825 backgrounds. Transparent backgrounds are available for supported GPT Image
1826 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in
1827 preview. When using `transparent`, set the output format to `png` or `webp`.
1828 Default: `auto`.
1829
1830 - `"transparent"`
1831
1832 - `"opaque"`
1833
1834 - `"auto"`
1835
1836 - `input_fidelity: optional "high" or "low" or null`
1837
1838 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`.
1839
1840 - `"high"`
1841
1842 - `"low"`
1843
1844 - `input_image_mask: optional object { file_id, image_url }`
1845
1846 Optional mask for inpainting. Contains `image_url`
1847 (string, optional) and `file_id` (string, optional).
1848
1849 - `file_id: optional string`
1850
1851 File ID for the mask image.
1852
1853 - `image_url: optional string`
1854
1855 Base64-encoded mask image.
1856
1857 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`
1858
1859 The image generation model to use. One of `gpt-image-1`,
1860 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
1861 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
1862 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
1863 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
1864 `gpt-image-1`.
1865
1866 - `string`
1867
1868 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`
1869
1870 The image generation model to use. One of `gpt-image-1`,
1871 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
1872 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
1873 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
1874 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
1875 `gpt-image-1`.
1876
1877 - `"gpt-image-1"`
1878
1879 - `"gpt-image-1-mini"`
1880
1881 - `"gpt-image-1.5"`
1882
1883 - `"gpt-image-2"`
1884
1885 - `"gpt-image-2-2026-04-21"`
1886
1887 - `"gpt-image-2.5-sunburst"`
1888
1889 - `"gpt-image-2.5-sunburst-2026-09-08"`
1890
1891 - `"gpt-image-2.5-flare"`
1892
1893 - `"gpt-image-2.5-flare-2026-09-08"`
1894
1895 - `moderation: optional "auto" or "low"`
1896
1897 Moderation level for the generated image. Default: `auto`.
1898
1899 - `"auto"`
1900
1901 - `"low"`
1902
1903 - `output_compression: optional number`
1904
1905 Compression level for the output image. Default: 100.
1906
1907 - `output_format: optional "png" or "webp" or "jpeg"`
1908
1909 The output format of the generated image. One of `png`, `webp`, or
1910 `jpeg`. Default: `png`.
1911
1912 - `"png"`
1913
1914 - `"webp"`
1915
1916 - `"jpeg"`
1917
1918 - `partial_images: optional number`
1919
1920 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
1921
1922 - `quality: optional "low" or "medium" or "high" or 3 more`
1923
1924 The quality of the generated image. The GPT image models support `low`,
1925 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
1926 including their `2026-09-08` snapshots, also support `xhigh` and `max`.
1927 Default: `auto`.
1928
1929 - `"low"`
1930
1931 - `"medium"`
1932
1933 - `"high"`
1934
1935 - `"xhigh"`
1936
1937 - `"max"`
1938
1939 - `"auto"`
1940
1941 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
1942
1943 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`.
1944
1945 - `string`
1946
1947 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`
1948
1949 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`.
1950
1951 - `"1024x1024"`
1952
1953 - `"1024x1536"`
1954
1955 - `"1536x1024"`
1956
1957 - `"auto"`
1958
1959 - `LocalShell object { type }`
1960
1961 A tool that allows the model to execute shell commands in a local environment.
1962
1963 - `type: "local_shell"`
1964
1965 The type of the local shell tool. Always `local_shell`.
1966
1967 - `"local_shell"`
1968
1969 - `Shell object { type, allowed_callers, environment }`
1970
1971 A tool that allows the model to execute shell commands.
1972
1973 - `type: "shell"`
1974
1975 The type of the shell tool. Always `shell`.
1976
1977 - `"shell"`
1978
1979 - `allowed_callers: optional array of "direct" or "programmatic" or null`
1980
1981 The tool invocation context(s).
1982
1983 - `"direct"`
1984
1985 - `"programmatic"`
1986
1987 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`
1988
1989 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
1990
1991 - `type: "container_auto"`
1992
1993 Automatically creates a container for this request
1994
1995 - `"container_auto"`
1996
1997 - `file_ids: optional array of string`
1998
1999 An optional list of uploaded files to make available to your code.
2000
2001 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`
2002
2003 The memory limit for the container.
2004
2005 - `"1g"`
2006
2007 - `"4g"`
2008
2009 - `"16g"`
2010
2011 - `"64g"`
2012
2013 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
2014
2015 Network access policy for the container.
2016
2017 - `ContainerNetworkPolicyDisabled object { type }`
2018
2019 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2020
2021 - `skills: optional array of SkillReference or InlineSkill`
2022
2023 An optional list of skills referenced by id or inline data.
2024
2025 - `SkillReference object { skill_id, type, version }`
2026
2027 - `skill_id: string`
2028
2029 The ID of the referenced skill.
2030
2031 - `type: "skill_reference"`
2032
2033 References a skill created with the /v1/skills endpoint.
2034
2035 - `"skill_reference"`
2036
2037 - `version: optional string`
2038
2039 Optional skill version. Use a positive integer or 'latest'. Omit for default.
2040
2041 - `InlineSkill object { description, name, source, type }`
2042
2043 - `description: string`
2044
2045 The description of the skill.
2046
2047 - `name: string`
2048
2049 The name of the skill.
2050
2051 - `source: InlineSkillSource`
2052
2053 Inline skill payload
2054
2055 - `data: string`
2056
2057 Base64-encoded skill zip bundle.
2058
2059 - `media_type: "application/zip"`
2060
2061 The media type of the inline skill payload. Must be `application/zip`.
2062
2063 - `"application/zip"`
2064
2065 - `type: "base64"`
2066
2067 The type of the inline skill source. Must be `base64`.
2068
2069 - `"base64"`
2070
2071 - `type: "inline"`
2072
2073 Defines an inline skill for this request.
2074
2075 - `"inline"`
2076
2077 - `LocalEnvironment object { type, skills }`
2078
2079 - `type: "local"`
2080
2081 Use a local computer environment.
2082
2083 - `"local"`
2084
2085 - `skills: optional array of LocalSkill`
2086
2087 An optional list of skills.
2088
2089 - `description: string`
2090
2091 The description of the skill.
2092
2093 - `name: string`
2094
2095 The name of the skill.
2096
2097 - `path: string`
2098
2099 The path to the directory containing the skill.
2100
2101 - `ContainerReference object { container_id, type }`
2102
2103 - `container_id: string`
2104
2105 The ID of the referenced container.
2106
2107 - `type: "container_reference"`
2108
2109 References a container created with the /v1/containers endpoint
2110
2111 - `"container_reference"`
2112
2113 - `Custom object { name, type, allowed_callers, 4 more }`
2114
2115 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)
2116
2117 - `name: string`
2118
2119 The name of the custom tool, used to identify it in tool calls.
2120
2121 - `type: "custom"`
2122
2123 The type of the custom tool. Always `custom`.
2124
2125 - `"custom"`
2126
2127 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2128
2129 The tool invocation context(s).
2130
2131 - `"direct"`
2132
2133 - `"programmatic"`
2134
2135 - `async: optional boolean`
2136
2137 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.
2138
2139 - `defer_loading: optional boolean`
2140
2141 Whether this tool should be deferred and discovered via tool search.
2142
2143 - `description: optional string`
2144
2145 Optional description of the custom tool, used to provide more context.
2146
2147 - `format: optional CustomToolInputFormat`
2148
2149 The input format for the custom tool. Default is unconstrained text.
2150
2151 - `Text object { type }`
2152
2153 Unconstrained free-form text.
2154
2155 - `type: "text"`
2156
2157 Unconstrained text format. Always `text`.
2158
2159 - `"text"`
2160
2161 - `Grammar object { definition, syntax, type }`
2162
2163 A grammar defined by the user.
2164
2165 - `definition: string`
2166
2167 The grammar definition.
2168
2169 - `syntax: "lark" or "regex"`
2170
2171 The syntax of the grammar definition. One of `lark` or `regex`.
2172
2173 - `"lark"`
2174
2175 - `"regex"`
2176
2177 - `type: "grammar"`
2178
2179 Grammar format. Always `grammar`.
2180
2181 - `"grammar"`
2182
2183 - `Namespace object { description, name, tools, type }`
2184
2185 Groups function/custom tools under a shared namespace.
2186
2187 - `description: string`
2188
2189 A description of the namespace shown to the model.
2190
2191 - `name: string`
2192
2193 The namespace name used in tool calls (for example, `crm`).
2194
2195 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`
2196
2197 The function/custom tools available inside this namespace.
2198
2199 - `Function object { name, type, allowed_callers, 6 more }`
2200
2201 - `name: string`
2202
2203 - `type: "function"`
2204
2205 - `"function"`
2206
2207 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2208
2209 The tool invocation context(s).
2210
2211 - `"direct"`
2212
2213 - `"programmatic"`
2214
2215 - `async: optional boolean`
2216
2217 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.
2218
2219 - `defer_loading: optional boolean`
2220
2221 Whether this function should be deferred and discovered via tool search.
2222
2223 - `description: optional string or null`
2224
2225 - `output_schema: optional map[unknown] or null`
2226
2227 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.
2228
2229 - `parameters: optional unknown or null`
2230
2231 - `strict: optional boolean or null`
2232
2233 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.
2234
2235 - `Custom object { name, type, allowed_callers, 4 more }`
2236
2237 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)
2238
2239 - `name: string`
2240
2241 The name of the custom tool, used to identify it in tool calls.
2242
2243 - `type: "custom"`
2244
2245 The type of the custom tool. Always `custom`.
2246
2247 - `"custom"`
2248
2249 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2250
2251 The tool invocation context(s).
2252
2253 - `"direct"`
2254
2255 - `"programmatic"`
2256
2257 - `async: optional boolean`
2258
2259 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.
2260
2261 - `defer_loading: optional boolean`
2262
2263 Whether this tool should be deferred and discovered via tool search.
2264
2265 - `description: optional string`
2266
2267 Optional description of the custom tool, used to provide more context.
2268
2269 - `format: optional CustomToolInputFormat`
2270
2271 The input format for the custom tool. Default is unconstrained text.
2272
2273 - `type: "namespace"`
2274
2275 The type of the tool. Always `namespace`.
2276
2277 - `"namespace"`
2278
2279 - `ToolSearch object { type, description, execution, parameters }`
2280
2281 Hosted or BYOT tool search configuration for deferred tools.
2282
2283 - `type: "tool_search"`
2284
2285 The type of the tool. Always `tool_search`.
2286
2287 - `"tool_search"`
2288
2289 - `description: optional string or null`
2290
2291 Description shown to the model for a client-executed tool search tool.
2292
2293 - `execution: optional "server" or "client"`
2294
2295 Whether tool search is executed by the server or by the client.
2296
2297 - `"server"`
2298
2299 - `"client"`
2300
2301 - `parameters: optional unknown or null`
2302
2303 Parameter schema for a client-executed tool search tool.
2304
2305 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
2306
2307 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).
2308
2309 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`
2310
2311 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
2312
2313 - `"web_search_preview"`
2314
2315 - `"web_search_preview_2025_03_11"`
2316
2317 - `search_content_types: optional array of "text" or "image"`
2318
2319 - `"text"`
2320
2321 - `"image"`
2322
2323 - `search_context_size: optional "low" or "medium" or "high"`
2324
2325 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.
2326
2327 - `"low"`
2328
2329 - `"medium"`
2330
2331 - `"high"`
2332
2333 - `user_location: optional object { type, city, country, 2 more } or null`
2334
2335 The user's location.
2336
2337 - `type: "approximate"`
2338
2339 The type of location approximation. Always `approximate`.
2340
2341 - `"approximate"`
2342
2343 - `city: optional string or null`
2344
2345 Free text input for the city of the user, e.g. `San Francisco`.
2346
2347 - `country: optional string or null`
2348
2349 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
2350
2351 - `region: optional string or null`
2352
2353 Free text input for the region of the user, e.g. `California`.
2354
2355 - `timezone: optional string or null`
2356
2357 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2358
2359 - `ApplyPatch object { type, allowed_callers }`
2360
2361 Allows the assistant to create, delete, or update files using unified diffs.
2362
2363 - `type: "apply_patch"`
2364
2365 The type of the tool. Always `apply_patch`.
2366
2367 - `"apply_patch"`
2368
2369 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2370
2371 The tool invocation context(s).
2372
2373 - `"direct"`
2374
2375 - `"programmatic"`
2376
2377 - `type: "tool_search_output"`
2378
2379 The type of the item. Always `tool_search_output`.
2380
2381 - `"tool_search_output"`
2382
2383 - `created_by: optional string`
2384
2385 The identifier of the actor that created the item.
2386
2387 - `AdditionalTools object { id, role, tools, type }`
2388
2389 - `id: string`
2390
2391 The unique ID of the additional tools item.
2392
2393 - `role: "unknown" or "user" or "assistant" or 5 more`
2394
2395 The role that provided the additional tools.
2396
2397 - `"unknown"`
2398
2399 - `"user"`
2400
2401 - `"assistant"`
2402
2403 - `"system"`
2404
2405 - `"critic"`
2406
2407 - `"discriminator"`
2408
2409 - `"developer"`
2410
2411 - `"tool"`
2412
2413 - `tools: array of object { name, parameters, strict, 6 more } or object { type, vector_store_ids, filters, 2 more } or object { type } or 13 more`
2414
2415 The additional tool definitions made available at this item.
2416
2417 - `Function object { name, parameters, strict, 6 more }`
2418
2419 Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).
2420
2421 - `name: string`
2422
2423 The name of the function to call.
2424
2425 - `parameters: map[unknown] or null`
2426
2427 A JSON schema object describing the parameters of the function.
2428
2429 - `strict: boolean or null`
2430
2431 Whether strict parameter validation is enforced for this function tool.
2432
2433 - `type: "function"`
2434
2435 The type of the function tool. Always `function`.
2436
2437 - `"function"`
2438
2439 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2440
2441 The tool invocation context(s).
2442
2443 - `"direct"`
2444
2445 - `"programmatic"`
2446
2447 - `async: optional boolean`
2448
2449 - `defer_loading: optional boolean`
2450
2451 Whether this function is deferred and loaded via tool search.
2452
2453 - `description: optional string or null`
2454
2455 A description of the function. Used by the model to determine whether or not to call the function.
2456
2457 - `output_schema: optional map[unknown] or null`
2458
2459 A JSON schema object describing the JSON value encoded in string outputs for this function.
2460
2461 - `FileSearch object { type, vector_store_ids, filters, 2 more }`
2462
2463 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).
2464
2465 - `type: "file_search"`
2466
2467 The type of the file search tool. Always `file_search`.
2468
2469 - `"file_search"`
2470
2471 - `vector_store_ids: array of string`
2472
2473 The IDs of the vector stores to search.
2474
2475 - `filters: optional ComparisonFilter or CompoundFilter or null`
2476
2477 A filter to apply.
2478
2479 - `ComparisonFilter object { key, type, value }`
2480
2481 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
2482
2483 - `CompoundFilter object { filters, type }`
2484
2485 Combine multiple filters using `and` or `or`.
2486
2487 - `max_num_results: optional number`
2488
2489 The maximum number of results to return. This number should be between 1 and 50 inclusive.
2490
2491 - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`
2492
2493 Ranking options for search.
2494
2495 - `hybrid_search: optional object { embedding_weight, text_weight }`
2496
2497 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
2498
2499 - `embedding_weight: number`
2500
2501 The weight of the embedding in the reciprocal ranking fusion.
2502
2503 - `text_weight: number`
2504
2505 The weight of the text in the reciprocal ranking fusion.
2506
2507 - `ranker: optional "auto" or "default-2024-11-15"`
2508
2509 The ranker to use for the file search.
2510
2511 - `"auto"`
2512
2513 - `"default-2024-11-15"`
2514
2515 - `score_threshold: optional number`
2516
2517 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.
2518
2519 - `Computer object { type }`
2520
2521 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).
2522
2523 - `type: "computer"`
2524
2525 The type of the computer tool. Always `computer`.
2526
2527 - `"computer"`
2528
2529 - `ComputerUsePreview object { display_height, display_width, environment, type }`
2530
2531 A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).
2532
2533 - `display_height: number`
2534
2535 The height of the computer display.
2536
2537 - `display_width: number`
2538
2539 The width of the computer display.
2540
2541 - `environment: "windows" or "mac" or "linux" or 2 more`
2542
2543 The type of computer environment to control.
2544
2545 - `"windows"`
2546
2547 - `"mac"`
2548
2549 - `"linux"`
2550
2551 - `"ubuntu"`
2552
2553 - `"browser"`
2554
2555 - `type: "computer_use_preview"`
2556
2557 The type of the computer use tool. Always `computer_use_preview`.
2558
2559 - `"computer_use_preview"`
2560
2561 - `WebSearch object { type, external_web_access, filters, 2 more }`
2562
2563 Search the Internet for sources related to the prompt. Learn more about the
2564 [web search tool](/api/docs/guides/tools-web-search).
2565
2566 - `type: "web_search" or "web_search_2025_08_26"`
2567
2568 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
2569
2570 - `"web_search"`
2571
2572 - `"web_search_2025_08_26"`
2573
2574 - `external_web_access: optional boolean`
2575
2576 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.
2577
2578 - `filters: optional object { allowed_domains } or null`
2579
2580 Filters for the search.
2581
2582 - `allowed_domains: optional array of string or null`
2583
2584 Allowed domains for the search. If not provided, all domains are allowed.
2585 Subdomains of the provided domains are allowed as well.
2586
2587 Example: `["pubmed.ncbi.nlm.nih.gov"]`
2588
2589 - `search_context_size: optional "low" or "medium" or "high"`
2590
2591 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.
2592
2593 - `"low"`
2594
2595 - `"medium"`
2596
2597 - `"high"`
2598
2599 - `user_location: optional object { city, country, region, 2 more } or null`
2600
2601 The approximate location of the user.
2602
2603 - `city: optional string or null`
2604
2605 Free text input for the city of the user, e.g. `San Francisco`.
2606
2607 - `country: optional string or null`
2608
2609 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
2610
2611 - `region: optional string or null`
2612
2613 Free text input for the region of the user, e.g. `California`.
2614
2615 - `timezone: optional string or null`
2616
2617 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2618
2619 - `type: optional "approximate"`
2620
2621 The type of location approximation. Always `approximate`.
2622
2623 - `"approximate"`
2624
2625 - `Mcp object { server_label, type, allowed_callers, 9 more }`
2626
2627 Give the model access to additional tools via remote Model Context Protocol
2628 (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).
2629
2630 - `server_label: string`
2631
2632 A label for this MCP server, used to identify it in tool calls.
2633
2634 - `type: "mcp"`
2635
2636 The type of the MCP tool. Always `mcp`.
2637
2638 - `"mcp"`
2639
2640 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2641
2642 The tool invocation context(s).
2643
2644 - `"direct"`
2645
2646 - `"programmatic"`
2647
2648 - `allowed_tools: optional array of string or object { read_only, tool_names } or null`
2649
2650 List of allowed tool names or a filter object.
2651
2652 - `McpAllowedTools = array of string`
2653
2654 A string array of allowed tool names
2655
2656 - `McpToolFilter object { read_only, tool_names }`
2657
2658 A filter object to specify which tools are allowed.
2659
2660 - `read_only: optional boolean`
2661
2662 Indicates whether or not a tool modifies data or is read-only. If an
2663 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2664 it will match this filter.
2665
2666 - `tool_names: optional array of string`
2667
2668 List of allowed tool names.
2669
2670 - `authorization: optional string`
2671
2672 An OAuth access token that can be used with a remote MCP server, either
2673 with a custom MCP server URL or a service connector. Your application
2674 must handle the OAuth authorization flow and provide the token here.
2675
2676 - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`
2677
2678 Identifier for service connectors, like those available in ChatGPT. One of
2679 `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more
2680 about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).
2681
2682 This field is deprecated for models released after September 1, 2026.
2683 Use `server_url` to connect to a remote MCP server, or `tunnel_id` to
2684 connect through a Secure MCP Tunnel.
2685
2686 Currently supported `connector_id` values are:
2687
2688 - Dropbox: `connector_dropbox`
2689 - Gmail: `connector_gmail`
2690 - Google Calendar: `connector_googlecalendar`
2691 - Google Drive: `connector_googledrive`
2692 - Microsoft Teams: `connector_microsoftteams`
2693 - Outlook Calendar: `connector_outlookcalendar`
2694 - Outlook Email: `connector_outlookemail`
2695 - SharePoint: `connector_sharepoint`
2696
2697 - `"connector_dropbox"`
2698
2699 - `"connector_gmail"`
2700
2701 - `"connector_googlecalendar"`
2702
2703 - `"connector_googledrive"`
2704
2705 - `"connector_microsoftteams"`
2706
2707 - `"connector_outlookcalendar"`
2708
2709 - `"connector_outlookemail"`
2710
2711 - `"connector_sharepoint"`
2712
2713 - `defer_loading: optional boolean`
2714
2715 Whether this MCP tool is deferred and discovered via tool search.
2716
2717 - `headers: optional map[string] or null`
2718
2719 Optional HTTP headers to send to the MCP server. Use for authentication
2720 or other purposes.
2721
2722 - `require_approval: optional object { always, never } or "always" or "never" or null`
2723
2724 Specify which of the MCP server's tools require approval.
2725
2726 - `McpToolApprovalFilter object { always, never }`
2727
2728 Specify which of the MCP server's tools require approval. Can be
2729 `always`, `never`, or a filter object associated with tools
2730 that require approval.
2731
2732 - `always: optional object { read_only, tool_names }`
2733
2734 A filter object to specify which tools are allowed.
2735
2736 - `read_only: optional boolean`
2737
2738 Indicates whether or not a tool modifies data or is read-only. If an
2739 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2740 it will match this filter.
2741
2742 - `tool_names: optional array of string`
2743
2744 List of allowed tool names.
2745
2746 - `never: optional object { read_only, tool_names }`
2747
2748 A filter object to specify which tools are allowed.
2749
2750 - `read_only: optional boolean`
2751
2752 Indicates whether or not a tool modifies data or is read-only. If an
2753 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2754 it will match this filter.
2755
2756 - `tool_names: optional array of string`
2757
2758 List of allowed tool names.
2759
2760 - `McpToolApprovalSetting = "always" or "never"`
2761
2762 Specify a single approval policy for all tools. One of `always` or
2763 `never`. When set to `always`, all tools will require approval. When
2764 set to `never`, all tools will not require approval.
2765
2766 - `"always"`
2767
2768 - `"never"`
2769
2770 - `server_description: optional string`
2771
2772 Optional description of the MCP server, used to provide more context.
2773
2774 - `server_url: optional string`
2775
2776 The URL for the MCP server. One of `server_url`, `connector_id`, or
2777 `tunnel_id` must be provided.
2778
2779 - `tunnel_id: optional string`
2780
2781 The Secure MCP Tunnel ID to use instead of a direct server URL. One of
2782 `server_url`, `connector_id`, or `tunnel_id` must be provided.
2783
2784 - `CodeInterpreter object { container, type, allowed_callers }`
2785
2786 A tool that runs Python code to help generate a response to a prompt.
2787
2788 - `container: string or object { type, file_ids, memory_limit, network_policy }`
2789
2790 The code interpreter container. Can be a container ID or an object that
2791 specifies uploaded file IDs to make available to your code, along with an
2792 optional `memory_limit` setting.
2793
2794 - `string`
2795
2796 The container ID.
2797
2798 - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`
2799
2800 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
2801
2802 - `type: "auto"`
2803
2804 Always `auto`.
2805
2806 - `"auto"`
2807
2808 - `file_ids: optional array of string`
2809
2810 An optional list of uploaded files to make available to your code.
2811
2812 - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`
2813
2814 The memory limit for the code interpreter container.
2815
2816 - `"1g"`
2817
2818 - `"4g"`
2819
2820 - `"16g"`
2821
2822 - `"64g"`
2823
2824 - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
2825
2826 Network access policy for the container.
2827
2828 - `ContainerNetworkPolicyDisabled object { type }`
2829
2830 - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`
2831
2832 - `type: "code_interpreter"`
2833
2834 The type of the code interpreter tool. Always `code_interpreter`.
2835
2836 - `"code_interpreter"`
2837
2838 - `allowed_callers: optional array of "direct" or "programmatic" or null`
2839
2840 The tool invocation context(s).
2841
2842 - `"direct"`
2843
2844 - `"programmatic"`
2845
2846 - `ProgrammaticToolCalling object { type }`
2847
2848 - `type: "programmatic_tool_calling"`
2849
2850 The type of the tool. Always `programmatic_tool_calling`.
2851
2852 - `"programmatic_tool_calling"`
2853
2854 - `ImageGeneration object { type, action, background, 9 more }`
2855
2856 A tool that generates images using the GPT image models.
2857
2858 - `type: "image_generation"`
2859
2860 The type of the image generation tool. Always `image_generation`.
2861
2862 - `"image_generation"`
2863
2864 - `action: optional "generate" or "edit" or "auto"`
2865
2866 Whether to generate a new image or edit an existing image. Default: `auto`.
2867
2868 - `"generate"`
2869
2870 - `"edit"`
2871
2872 - `"auto"`
2873
2874 - `background: optional "transparent" or "opaque" or "auto"`
2875
2876 Set the background of the generated image. One of `transparent`, `opaque`,
2877 or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including
2878 their `2026-09-08` snapshots, support `opaque` and `transparent`
2879 backgrounds. Transparent backgrounds are available for supported GPT Image
2880 models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in
2881 preview. When using `transparent`, set the output format to `png` or `webp`.
2882 Default: `auto`.
2883
2884 - `"transparent"`
2885
2886 - `"opaque"`
2887
2888 - `"auto"`
2889
2890 - `input_fidelity: optional "high" or "low" or null`
2891
2892 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`.
2893
2894 - `"high"`
2895
2896 - `"low"`
2897
2898 - `input_image_mask: optional object { file_id, image_url }`
2899
2900 Optional mask for inpainting. Contains `image_url`
2901 (string, optional) and `file_id` (string, optional).
2902
2903 - `file_id: optional string`
2904
2905 File ID for the mask image.
2906
2907 - `image_url: optional string`
2908
2909 Base64-encoded mask image.
2910
2911 - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`
2912
2913 The image generation model to use. One of `gpt-image-1`,
2914 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
2915 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
2916 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
2917 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
2918 `gpt-image-1`.
2919
2920 - `string`
2921
2922 - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`
2923
2924 The image generation model to use. One of `gpt-image-1`,
2925 `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
2926 `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
2927 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
2928 `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
2929 `gpt-image-1`.
2930
2931 - `"gpt-image-1"`
2932
2933 - `"gpt-image-1-mini"`
2934
2935 - `"gpt-image-1.5"`
2936
2937 - `"gpt-image-2"`
2938
2939 - `"gpt-image-2-2026-04-21"`
2940
2941 - `"gpt-image-2.5-sunburst"`
2942
2943 - `"gpt-image-2.5-sunburst-2026-09-08"`
2944
2945 - `"gpt-image-2.5-flare"`
2946
2947 - `"gpt-image-2.5-flare-2026-09-08"`
2948
2949 - `moderation: optional "auto" or "low"`
2950
2951 Moderation level for the generated image. Default: `auto`.
2952
2953 - `"auto"`
2954
2955 - `"low"`
2956
2957 - `output_compression: optional number`
2958
2959 Compression level for the output image. Default: 100.
2960
2961 - `output_format: optional "png" or "webp" or "jpeg"`
2962
2963 The output format of the generated image. One of `png`, `webp`, or
2964 `jpeg`. Default: `png`.
2965
2966 - `"png"`
2967
2968 - `"webp"`
2969
2970 - `"jpeg"`
2971
2972 - `partial_images: optional number`
2973
2974 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
2975
2976 - `quality: optional "low" or "medium" or "high" or 3 more`
2977
2978 The quality of the generated image. The GPT image models support `low`,
2979 `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
2980 including their `2026-09-08` snapshots, also support `xhigh` and `max`.
2981 Default: `auto`.
2982
2983 - `"low"`
2984
2985 - `"medium"`
2986
2987 - `"high"`
2988
2989 - `"xhigh"`
2990
2991 - `"max"`
2992
2993 - `"auto"`
2994
2995 - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`
2996
2997 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`.
2998
2999 - `string`
3000
3001 - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`
3002
3003 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`.
3004
3005 - `"1024x1024"`
3006
3007 - `"1024x1536"`
3008
3009 - `"1536x1024"`
3010
3011 - `"auto"`
3012
3013 - `LocalShell object { type }`
3014
3015 A tool that allows the model to execute shell commands in a local environment.
3016
3017 - `type: "local_shell"`
3018
3019 The type of the local shell tool. Always `local_shell`.
3020
3021 - `"local_shell"`
3022
3023 - `Shell object { type, allowed_callers, environment }`
3024
3025 A tool that allows the model to execute shell commands.
3026
3027 - `type: "shell"`
3028
3029 The type of the shell tool. Always `shell`.
3030
3031 - `"shell"`
3032
3033 - `allowed_callers: optional array of "direct" or "programmatic" or null`
3034
3035 The tool invocation context(s).
3036
3037 - `"direct"`
3038
3039 - `"programmatic"`
3040
3041 - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`
3042
3043 - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`
3044
3045 - `LocalEnvironment object { type, skills }`
3046
3047 - `ContainerReference object { container_id, type }`
3048
3049 - `Custom object { name, type, allowed_callers, 4 more }`
3050
3051 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)
3052
3053 - `name: string`
3054
3055 The name of the custom tool, used to identify it in tool calls.
3056
3057 - `type: "custom"`
3058
3059 The type of the custom tool. Always `custom`.
3060
3061 - `"custom"`
3062
3063 - `allowed_callers: optional array of "direct" or "programmatic" or null`
3064
3065 The tool invocation context(s).
3066
3067 - `"direct"`
3068
3069 - `"programmatic"`
3070
3071 - `async: optional boolean`
3072
3073 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.
3074
3075 - `defer_loading: optional boolean`
3076
3077 Whether this tool should be deferred and discovered via tool search.
3078
3079 - `description: optional string`
3080
3081 Optional description of the custom tool, used to provide more context.
3082
3083 - `format: optional CustomToolInputFormat`
3084
3085 The input format for the custom tool. Default is unconstrained text.
3086
3087 - `Namespace object { description, name, tools, type }`
3088
3089 Groups function/custom tools under a shared namespace.
3090
3091 - `description: string`
3092
3093 A description of the namespace shown to the model.
3094
3095 - `name: string`
3096
3097 The namespace name used in tool calls (for example, `crm`).
3098
3099 - `tools: array of object { name, type, allowed_callers, 6 more } or object { name, type, allowed_callers, 4 more }`
3100
3101 The function/custom tools available inside this namespace.
3102
3103 - `Function object { name, type, allowed_callers, 6 more }`
3104
3105 - `name: string`
3106
3107 - `type: "function"`
3108
3109 - `"function"`
3110
3111 - `allowed_callers: optional array of "direct" or "programmatic" or null`
3112
3113 The tool invocation context(s).
3114
3115 - `"direct"`
3116
3117 - `"programmatic"`
3118
3119 - `async: optional boolean`
3120
3121 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.
3122
3123 - `defer_loading: optional boolean`
3124
3125 Whether this function should be deferred and discovered via tool search.
3126
3127 - `description: optional string or null`
3128
3129 - `output_schema: optional map[unknown] or null`
3130
3131 A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.
3132
3133 - `parameters: optional unknown or null`
3134
3135 - `strict: optional boolean or null`
3136
3137 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.
3138
3139 - `Custom object { name, type, allowed_callers, 4 more }`
3140
3141 A custom tool that processes input using a specified format. Learn more about [custom tools](/api/docs/guides/function-calling#custom-tools)
3142
3143 - `name: string`
3144
3145 The name of the custom tool, used to identify it in tool calls.
3146
3147 - `type: "custom"`
3148
3149 The type of the custom tool. Always `custom`.
3150
3151 - `"custom"`
3152
3153 - `allowed_callers: optional array of "direct" or "programmatic" or null`
3154
3155 The tool invocation context(s).
3156
3157 - `"direct"`
3158
3159 - `"programmatic"`
3160
3161 - `async: optional boolean`
3162
3163 Whether the tool response can be returned asynchronously versus immediately returned on next response creation.
3164
3165 - `defer_loading: optional boolean`
3166
3167 Whether this tool should be deferred and discovered via tool search.
3168
3169 - `description: optional string`
3170
3171 Optional description of the custom tool, used to provide more context.
3172
3173 - `format: optional CustomToolInputFormat`
3174
3175 The input format for the custom tool. Default is unconstrained text.
3176
3177 - `type: "namespace"`
3178
3179 The type of the tool. Always `namespace`.
3180
3181 - `"namespace"`
3182
3183 - `ToolSearch object { type, description, execution, parameters }`
3184
3185 Hosted or BYOT tool search configuration for deferred tools.
3186
3187 - `type: "tool_search"`
3188
3189 The type of the tool. Always `tool_search`.
3190
3191 - `"tool_search"`
3192
3193 - `description: optional string or null`
3194
3195 Description shown to the model for a client-executed tool search tool.
3196
3197 - `execution: optional "server" or "client"`
3198
3199 Whether tool search is executed by the server or by the client.
3200
3201 - `"server"`
3202
3203 - `"client"`
3204
3205 - `parameters: optional unknown or null`
3206
3207 Parameter schema for a client-executed tool search tool.
3208
3209 - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`
3210
3211 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).
3212
3213 - `type: "web_search_preview" or "web_search_preview_2025_03_11"`
3214
3215 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
3216
3217 - `"web_search_preview"`
3218
3219 - `"web_search_preview_2025_03_11"`
3220
3221 - `search_content_types: optional array of "text" or "image"`
3222
3223 - `"text"`
3224
3225 - `"image"`
3226
3227 - `search_context_size: optional "low" or "medium" or "high"`
3228
3229 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.
3230
3231 - `"low"`
3232
3233 - `"medium"`
3234
3235 - `"high"`
3236
3237 - `user_location: optional object { type, city, country, 2 more } or null`
3238
3239 The user's location.
3240
3241 - `type: "approximate"`
3242
3243 The type of location approximation. Always `approximate`.
3244
3245 - `"approximate"`
3246
3247 - `city: optional string or null`
3248
3249 Free text input for the city of the user, e.g. `San Francisco`.
3250
3251 - `country: optional string or null`
3252
3253 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
3254
3255 - `region: optional string or null`
3256
3257 Free text input for the region of the user, e.g. `California`.
3258
3259 - `timezone: optional string or null`
3260
3261 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
3262
3263 - `ApplyPatch object { type, allowed_callers }`
3264
3265 Allows the assistant to create, delete, or update files using unified diffs.
3266
3267 - `type: "apply_patch"`
3268
3269 The type of the tool. Always `apply_patch`.
3270
3271 - `"apply_patch"`
3272
3273 - `allowed_callers: optional array of "direct" or "programmatic" or null`
3274
3275 The tool invocation context(s).
3276
3277 - `"direct"`
3278
3279 - `"programmatic"`
3280
3281 - `type: "additional_tools"`
3282
3283 The type of the item. Always `additional_tools`.
3284
3285 - `"additional_tools"`
3286
3287 - `ConfigurationUpdate object { id, type, reasoning }`
3288
3289 A configuration update that applies to subsequent responses until it is
3290 replaced by another configuration update.
3291
3292 - `id: string`
3293
3294 The unique ID of the configuration update item.
3295
3296 - `type: "configuration_update"`
3297
3298 The item type. Always `configuration_update`.
3299
3300 - `"configuration_update"`
3301
3302 - `reasoning: optional object { effort }`
3303
3304 The reasoning configuration applied by this update.
3305
3306 - `effort: optional ReasoningEffort or null`
3307
3308 The reasoning effort used for subsequent responses until another
3309 configuration update replaces it.
3310
3311 - `"none"`
3312
3313 - `"minimal"`
3314
3315 - `"low"`
3316
3317 - `"medium"`
3318
3319 - `"high"`
3320
3321 - `"xhigh"`
3322
3323 - `"max"`
3324
3325 - `Reasoning object { id, summary, type, 3 more }`
3326
3327 A description of the chain of thought used by a reasoning model while generating
3328 a response. Be sure to include these items in your `input` to the Responses API
3329 for subsequent turns of a conversation if you are manually
3330 [managing context](/api/docs/guides/conversation-state).
3331
3332 - `id: string`
3333
3334 The unique identifier of the reasoning content.
3335
3336 - `summary: array of SummaryTextContent`
3337
3338 Reasoning summary content.
3339
3340 - `text: string`
3341
3342 A summary of the reasoning output from the model so far.
3343
3344 - `type: "summary_text"`
3345
3346 The type of the object. Always `summary_text`.
3347
3348 - `type: "reasoning"`
3349
3350 The type of the object. Always `reasoning`.
3351
3352 - `"reasoning"`
3353
3354 - `content: optional array of object { text, type }`
3355
3356 Reasoning text content.
3357
3358 - `text: string`
3359
3360 The reasoning text from the model.
3361
3362 - `type: "reasoning_text"`
3363
3364 The type of the reasoning text. Always `reasoning_text`.
3365
3366 - `"reasoning_text"`
3367
3368 - `encrypted_content: optional string or null`
3369
3370 The encrypted content of the reasoning item. This is populated by default
3371 for reasoning items returned by `POST /v1/responses` and WebSocket
3372 `response.create` requests.
3373
3374 When streaming, use the completed reasoning item and its
3375 `encrypted_content` from the `response.output_item.done` event in
3376 subsequent requests. The `encrypted_content` in
3377 `response.output_item.added` may be incomplete. This is especially
3378 important when `store` is `false` or when using Zero Data Retention.
3379
3380 - `status: optional "in_progress" or "completed" or "incomplete"`
3381
3382 The status of the item. One of `in_progress`, `completed`, or
3383 `incomplete`. Populated when items are returned via API.
3384
3385 - `"in_progress"`
3386
3387 - `"completed"`
3388
3389 - `"incomplete"`
3390
3391 - `Program object { id, call_id, code, 2 more }`
3392
3393 - `id: string`
3394
3395 The unique ID of the program item.
3396
3397 - `call_id: string`
3398
3399 The stable call ID of the program item.
3400
3401 - `code: string`
3402
3403 The JavaScript source executed by programmatic tool calling.
3404
3405 - `fingerprint: string`
3406
3407 Opaque program replay fingerprint that must be round-tripped.
3408
3409 - `type: "program"`
3410
3411 The type of the item. Always `program`.
3412
3413 - `"program"`
3414
3415 - `ProgramOutput object { id, call_id, result, 2 more }`
3416
3417 - `id: string`
3418
3419 The unique ID of the program output item.
3420
3421 - `call_id: string`
3422
3423 The call ID of the program item.
3424
3425 - `result: string`
3426
3427 The result produced by the program item.
3428
3429 - `status: "completed" or "incomplete"`
3430
3431 The terminal status of the program output item.
3432
3433 - `"completed"`
3434
3435 - `"incomplete"`
3436
3437 - `type: "program_output"`
3438
3439 The type of the item. Always `program_output`.
3440
3441 - `"program_output"`
3442
3443 - `Compaction object { id, encrypted_content, type, created_by }`
3444
3445 A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).
3446
3447 - `id: string`
3448
3449 The unique ID of the compaction item.
3450
3451 - `encrypted_content: string`
3452
3453 The encrypted content that was produced by compaction.
3454
3455 - `type: "compaction"`
3456
3457 The type of the item. Always `compaction`.
3458
3459 - `"compaction"`
3460
3461 - `created_by: optional string`
3462
3463 The identifier of the actor that created the item.
3464
3465 - `CodeInterpreterCall object { id, code, container_id, 3 more }`
3466
3467 A tool call to run code.
3468
3469 - `id: string`
3470
3471 The unique ID of the code interpreter tool call.
3472
3473 - `code: string or null`
3474
3475 The code to run, or null if not available.
3476
3477 - `container_id: string`
3478
3479 The ID of the container used to run the code.
3480
3481 - `outputs: array of object { logs, type } or object { type, url } or null`
3482
3483 The outputs generated by the code interpreter, such as logs or images.
3484 Can be null if no outputs are available.
3485
3486 - `Logs object { logs, type }`
3487
3488 The logs output from the code interpreter.
3489
3490 - `logs: string`
3491
3492 The logs output from the code interpreter.
3493
3494 - `type: "logs"`
3495
3496 The type of the output. Always `logs`.
3497
3498 - `"logs"`
3499
3500 - `Image object { type, url }`
3501
3502 The image output from the code interpreter.
3503
3504 - `type: "image"`
3505
3506 The type of the output. Always `image`.
3507
3508 - `"image"`
3509
3510 - `url: string`
3511
3512 The URL of the image output from the code interpreter.
3513
3514 - `status: "in_progress" or "completed" or "incomplete" or 2 more`
3515
3516 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.
3517
3518 - `"in_progress"`
3519
3520 - `"completed"`
3521
3522 - `"incomplete"`
3523
3524 - `"interpreting"`
3525
3526 - `"failed"`
3527
3528 - `type: "code_interpreter_call"`
3529
3530 The type of the code interpreter tool call. Always `code_interpreter_call`.
3531
3532 - `"code_interpreter_call"`
3533
3534 - `LocalShellCall object { id, action, call_id, 2 more }`
3535
3536 A tool call to run a command on the local shell.
3537
3538 - `id: string`
3539
3540 The unique ID of the local shell call.
3541
3542 - `action: object { command, env, type, 3 more }`
3543
3544 Execute a shell command on the server.
3545
3546 - `command: array of string`
3547
3548 The command to run.
3549
3550 - `env: map[string]`
3551
3552 Environment variables to set for the command.
3553
3554 - `type: "exec"`
3555
3556 The type of the local shell action. Always `exec`.
3557
3558 - `"exec"`
3559
3560 - `timeout_ms: optional number or null`
3561
3562 Optional timeout in milliseconds for the command.
3563
3564 - `user: optional string or null`
3565
3566 Optional user to run the command as.
3567
3568 - `working_directory: optional string or null`
3569
3570 Optional working directory to run the command in.
3571
3572 - `call_id: string`
3573
3574 The unique ID of the local shell tool call generated by the model.
3575
3576 - `status: "in_progress" or "completed" or "incomplete"`
3577
3578 The status of the local shell call.
3579
3580 - `"in_progress"`
3581
3582 - `"completed"`
3583
3584 - `"incomplete"`
3585
3586 - `type: "local_shell_call"`
3587
3588 The type of the local shell call. Always `local_shell_call`.
3589
3590 - `"local_shell_call"`
3591
3592 - `LocalShellCallOutput object { id, output, type, status }`
3593
3594 The output of a local shell tool call.
3595
3596 - `id: string`
3597
3598 The unique ID of the local shell tool call generated by the model.
3599
3600 - `output: string`
3601
3602 A JSON string of the output of the local shell tool call.
3603
3604 - `type: "local_shell_call_output"`
3605
3606 The type of the local shell tool call output. Always `local_shell_call_output`.
3607
3608 - `"local_shell_call_output"`
3609
3610 - `status: optional "in_progress" or "completed" or "incomplete" or null`
3611
3612 The status of the item. One of `in_progress`, `completed`, or `incomplete`.
3613
3614 - `"in_progress"`
3615
3616 - `"completed"`
3617
3618 - `"incomplete"`
3619
3620 - `ShellCall object { id, action, call_id, 5 more }`
3621
3622 A tool call that executes one or more shell commands in a managed environment.
3623
3624 - `id: string`
3625
3626 The unique ID of the shell tool call. Populated when this item is returned via API.
3627
3628 - `action: object { commands, max_output_length, timeout_ms }`
3629
3630 The shell commands and limits that describe how to run the tool call.
3631
3632 - `commands: array of string`
3633
3634 - `max_output_length: number or null`
3635
3636 Optional maximum number of characters to return from each command.
3637
3638 - `timeout_ms: number or null`
3639
3640 Optional timeout in milliseconds for the commands.
3641
3642 - `call_id: string`
3643
3644 The unique ID of the shell tool call generated by the model.
3645
3646 - `environment: ResponseLocalEnvironment or ResponseContainerReference or null`
3647
3648 Represents the use of a local environment to perform shell actions.
3649
3650 - `ResponseLocalEnvironment object { type }`
3651
3652 Represents the use of a local environment to perform shell actions.
3653
3654 - `type: "local"`
3655
3656 The environment type. Always `local`.
3657
3658 - `"local"`
3659
3660 - `ResponseContainerReference object { container_id, type }`
3661
3662 Represents a container created with /v1/containers.
3663
3664 - `container_id: string`
3665
3666 - `type: "container_reference"`
3667
3668 The environment type. Always `container_reference`.
3669
3670 - `"container_reference"`
3671
3672 - `status: "in_progress" or "completed" or "incomplete"`
3673
3674 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.
3675
3676 - `"in_progress"`
3677
3678 - `"completed"`
3679
3680 - `"incomplete"`
3681
3682 - `type: "shell_call"`
3683
3684 The type of the item. Always `shell_call`.
3685
3686 - `"shell_call"`
3687
3688 - `caller: optional object { type } or object { caller_id, type } or null`
3689
3690 The execution context that produced this tool call.
3691
3692 - `Direct object { type }`
3693
3694 - `type: "direct"`
3695
3696 - `"direct"`
3697
3698 - `Program object { caller_id, type }`
3699
3700 - `caller_id: string`
3701
3702 The call ID of the program item that produced this tool call.
3703
3704 - `type: "program"`
3705
3706 - `"program"`
3707
3708 - `created_by: optional string`
3709
3710 The ID of the entity that created this tool call.
3711
3712 - `ShellCallOutput object { id, call_id, max_output_length, 5 more }`
3713
3714 The output of a shell tool call that was emitted.
3715
3716 - `id: string`
3717
3718 The unique ID of the shell call output. Populated when this item is returned via API.
3719
3720 - `call_id: string`
3721
3722 The unique ID of the shell tool call generated by the model.
3723
3724 - `max_output_length: number or null`
3725
3726 The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.
3727
3728 - `output: array of object { outcome, stderr, stdout, created_by }`
3729
3730 An array of shell call output contents
3731
3732 - `outcome: object { type } or object { exit_code, type }`
3733
3734 Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.
3735
3736 - `Timeout object { type }`
3737
3738 Indicates that the shell call exceeded its configured time limit.
3739
3740 - `type: "timeout"`
3741
3742 The outcome type. Always `timeout`.
3743
3744 - `"timeout"`
3745
3746 - `Exit object { exit_code, type }`
3747
3748 Indicates that the shell commands finished and returned an exit code.
3749
3750 - `exit_code: number`
3751
3752 Exit code from the shell process.
3753
3754 - `type: "exit"`
3755
3756 The outcome type. Always `exit`.
3757
3758 - `"exit"`
3759
3760 - `stderr: string`
3761
3762 The standard error output that was captured.
3763
3764 - `stdout: string`
3765
3766 The standard output that was captured.
3767
3768 - `created_by: optional string`
3769
3770 The identifier of the actor that created the item.
3771
3772 - `status: "in_progress" or "completed" or "incomplete"`
3773
3774 The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`.
3775
3776 - `"in_progress"`
3777
3778 - `"completed"`
3779
3780 - `"incomplete"`
3781
3782 - `type: "shell_call_output"`
3783
3784 The type of the shell call output. Always `shell_call_output`.
3785
3786 - `"shell_call_output"`
3787
3788 - `caller: optional object { type } or object { caller_id, type } or null`
3789
3790 The execution context that produced this tool call.
3791
3792 - `Direct object { type }`
3793
3794 - `type: "direct"`
3795
3796 - `"direct"`
3797
3798 - `Program object { caller_id, type }`
3799
3800 - `caller_id: string`
3801
3802 The call ID of the program item that produced this tool call.
3803
3804 - `type: "program"`
3805
3806 - `"program"`
3807
3808 - `created_by: optional string`
3809
3810 The identifier of the actor that created the item.
3811
3812 - `ApplyPatchCall object { id, call_id, operation, 4 more }`
3813
3814 A tool call that applies file diffs by creating, deleting, or updating files.
3815
3816 - `id: string`
3817
3818 The unique ID of the apply patch tool call. Populated when this item is returned via API.
3819
3820 - `call_id: string`
3821
3822 The unique ID of the apply patch tool call generated by the model.
3823
3824 - `operation: object { diff, path, type } or object { path, type } or object { diff, path, type }`
3825
3826 One of the create_file, delete_file, or update_file operations applied via apply_patch.
3827
3828 - `CreateFile object { diff, path, type }`
3829
3830 Instruction describing how to create a file via the apply_patch tool.
3831
3832 - `diff: string`
3833
3834 Diff to apply.
3835
3836 - `path: string`
3837
3838 Path of the file to create.
3839
3840 - `type: "create_file"`
3841
3842 Create a new file with the provided diff.
3843
3844 - `"create_file"`
3845
3846 - `DeleteFile object { path, type }`
3847
3848 Instruction describing how to delete a file via the apply_patch tool.
3849
3850 - `path: string`
3851
3852 Path of the file to delete.
3853
3854 - `type: "delete_file"`
3855
3856 Delete the specified file.
3857
3858 - `"delete_file"`
3859
3860 - `UpdateFile object { diff, path, type }`
3861
3862 Instruction describing how to update a file via the apply_patch tool.
3863
3864 - `diff: string`
3865
3866 Diff to apply.
3867
3868 - `path: string`
3869
3870 Path of the file to update.
3871
3872 - `type: "update_file"`
3873
3874 Update an existing file with the provided diff.
3875
3876 - `"update_file"`
3877
3878 - `status: "in_progress" or "completed"`
3879
3880 The status of the apply patch tool call. One of `in_progress` or `completed`.
3881
3882 - `"in_progress"`
3883
3884 - `"completed"`
3885
3886 - `type: "apply_patch_call"`
3887
3888 The type of the item. Always `apply_patch_call`.
3889
3890 - `"apply_patch_call"`
3891
3892 - `caller: optional object { type } or object { caller_id, type } or null`
3893
3894 The execution context that produced this tool call.
3895
3896 - `Direct object { type }`
3897
3898 - `type: "direct"`
3899
3900 - `"direct"`
3901
3902 - `Program object { caller_id, type }`
3903
3904 - `caller_id: string`
3905
3906 The call ID of the program item that produced this tool call.
3907
3908 - `type: "program"`
3909
3910 - `"program"`
3911
3912 - `created_by: optional string`
3913
3914 The ID of the entity that created this tool call.
3915
3916 - `ApplyPatchCallOutput object { id, call_id, status, 4 more }`
3917
3918 The output emitted by an apply patch tool call.
3919
3920 - `id: string`
3921
3922 The unique ID of the apply patch tool call output. Populated when this item is returned via API.
3923
3924 - `call_id: string`
3925
3926 The unique ID of the apply patch tool call generated by the model.
3927
3928 - `status: "completed" or "failed"`
3929
3930 The status of the apply patch tool call output. One of `completed` or `failed`.
3931
3932 - `"completed"`
3933
3934 - `"failed"`
3935
3936 - `type: "apply_patch_call_output"`
3937
3938 The type of the item. Always `apply_patch_call_output`.
3939
3940 - `"apply_patch_call_output"`
3941
3942 - `caller: optional object { type } or object { caller_id, type } or null`
3943
3944 The execution context that produced this tool call.
3945
3946 - `Direct object { type }`
3947
3948 - `type: "direct"`
3949
3950 - `"direct"`
3951
3952 - `Program object { caller_id, type }`
3953
3954 - `caller_id: string`
3955
3956 The call ID of the program item that produced this tool call.
3957
3958 - `type: "program"`
3959
3960 - `"program"`
3961
3962 - `created_by: optional string`
3963
3964 The ID of the entity that created this tool call output.
3965
3966 - `output: optional string or null`
3967
3968 Optional textual output returned by the apply patch tool.
3969
3970 - `McpListTools object { id, server_label, tools, 2 more }`
3971
3972 A list of tools available on an MCP server.
3973
3974 - `id: string`
3975
3976 The unique ID of the list.
3977
3978 - `server_label: string`
3979
3980 The label of the MCP server.
3981
3982 - `tools: array of object { input_schema, name, annotations, description }`
3983
3984 The tools available on the server.
3985
3986 - `input_schema: unknown`
3987
3988 The JSON schema describing the tool's input.
3989
3990 - `name: string`
3991
3992 The name of the tool.
3993
3994 - `annotations: optional unknown or null`
3995
3996 Additional annotations about the tool.
3997
3998 - `description: optional string or null`
3999
4000 The description of the tool.
4001
4002 - `type: "mcp_list_tools"`
4003
4004 The type of the item. Always `mcp_list_tools`.
4005
4006 - `"mcp_list_tools"`
4007
4008 - `error: optional string or null`
4009
4010 Error message if the server could not list tools.
4011
4012 - `McpApprovalRequest object { id, arguments, name, 2 more }`
4013
4014 A request for human approval of a tool invocation.
4015
4016 - `id: string`
4017
4018 The unique ID of the approval request.
4019
4020 - `arguments: string`
4021
4022 A JSON string of arguments for the tool.
4023
4024 - `name: string`
4025
4026 The name of the tool to run.
4027
4028 - `server_label: string`
4029
4030 The label of the MCP server making the request.
4031
4032 - `type: "mcp_approval_request"`
4033
4034 The type of the item. Always `mcp_approval_request`.
4035
4036 - `"mcp_approval_request"`
4037
4038 - `McpApprovalResponse object { id, approval_request_id, approve, 2 more }`
4039
4040 A response to an MCP approval request.
4041
4042 - `id: string`
4043
4044 The unique ID of the approval response
4045
4046 - `approval_request_id: string`
4047
4048 The ID of the approval request being answered.
4049
4050 - `approve: boolean`
4051
4052 Whether the request was approved.
4053
4054 - `type: "mcp_approval_response"`
4055
4056 The type of the item. Always `mcp_approval_response`.
4057
4058 - `"mcp_approval_response"`
4059
4060 - `reason: optional string or null`
4061
4062 Optional reason for the decision.
4063
4064 - `McpCall object { id, arguments, name, 6 more }`
4065
4066 An invocation of a tool on an MCP server.
4067
4068 - `id: string`
4069
4070 The unique ID of the tool call.
4071
4072 - `arguments: string`
4073
4074 A JSON string of the arguments passed to the tool.
4075
4076 - `name: string`
4077
4078 The name of the tool that was run.
4079
4080 - `server_label: string`
4081
4082 The label of the MCP server running the tool.
4083
4084 - `type: "mcp_call"`
4085
4086 The type of the item. Always `mcp_call`.
4087
4088 - `"mcp_call"`
4089
4090 - `approval_request_id: optional string or null`
4091
4092 Unique identifier for the MCP tool call approval request.
4093 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.
4094
4095 - `error: optional McpToolCallError or null`
4096
4097 The error from the tool call, if any.
4098
4099 - `McpProtocolError object { code, message, type }`
4100
4101 - `code: number`
4102
4103 - `message: string`
4104
4105 - `type: "mcp_protocol_error"`
4106
4107 - `"mcp_protocol_error"`
4108
4109 - `McpToolExecutionError object { content, type }`
4110
4111 - `content: unknown`
4112
4113 - `type: "mcp_tool_execution_error"`
4114
4115 - `"mcp_tool_execution_error"`
4116
4117 - `HTTPError object { code, message, type }`
4118
4119 - `code: number`
4120
4121 - `message: string`
4122
4123 - `type: "http_error"`
4124
4125 - `"http_error"`
4126
4127 - `output: optional string or null`
4128
4129 The output from the tool call.
4130
4131 - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`
4132
4133 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
4134
4135 - `"in_progress"`
4136
4137 - `"completed"`
4138
4139 - `"incomplete"`
4140
4141 - `"calling"`
4142
4143 - `"failed"`
4144
4145 - `CustomToolCall object { call_id, input, name, 5 more }`
4146
4147 A call to a custom tool created by the model.
4148
4149 - `call_id: string`
4150
4151 An identifier used to map this custom tool call to a tool call output.
4152
4153 - `input: string`
4154
4155 The input for the custom tool call generated by the model.
4156
4157 - `name: string`
4158
4159 The name of the custom tool being called.
4160
4161 - `type: "custom_tool_call"`
4162
4163 The type of the custom tool call. Always `custom_tool_call`.
4164
4165 - `"custom_tool_call"`
4166
4167 - `id: optional string`
4168
4169 The unique ID of the custom tool call in the OpenAI platform.
4170
4171 - `async: optional boolean`
4172
4173 Whether the custom tool call runs asynchronously.
4174
4175 - `caller: optional object { type } or object { caller_id, type } or null`
4176
4177 The execution context that produced this tool call.
4178
4179 - `Direct object { type }`
4180
4181 - `type: "direct"`
4182
4183 - `"direct"`
4184
4185 - `Program object { caller_id, type }`
4186
4187 - `caller_id: string`
4188
4189 The call ID of the program item that produced this tool call.
4190
4191 - `type: "program"`
4192
4193 - `"program"`
4194
4195 - `namespace: optional string`
4196
4197 The namespace of the custom tool being called.
4198
4199 - `CustomToolCallOutput object { call_id, output, type, 2 more }`
4200
4201 The output of a custom tool call from your code, being sent back to the model.
4202
4203 - `call_id: string`
4204
4205 The call ID, used to map this custom tool call output to a custom tool call.
4206
4207 - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`
4208
4209 The output from the custom tool call generated by your code.
4210 Can be a string or an list of output content.
4211
4212 - `StringOutput = string`
4213
4214 A string of the output of the custom tool call.
4215
4216 - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`
4217
4218 Text, image, or file output of the custom tool call.
4219
4220 - `ResponseInputText object { text, type, prompt_cache_breakpoint }`
4221
4222 A text input to the model.
4223
4224 - `ResponseInputImage object { detail, type, file_id, 2 more }`
4225
4226 An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).
4227
4228 - `ResponseInputFile object { type, detail, file_data, 4 more }`
4229
4230 A file input to the model.
4231
4232 - `type: "custom_tool_call_output"`
4233
4234 The type of the custom tool call output. Always `custom_tool_call_output`.
4235
4236 - `"custom_tool_call_output"`
4237
4238 - `id: optional string`
4239
4240 The unique ID of the custom tool call output in the OpenAI platform.
4241
4242 - `caller: optional object { type } or object { caller_id, type } or null`
4243
4244 The execution context that produced this tool call.
4245
4246 - `Direct object { type }`
4247
4248 - `type: "direct"`
4249
4250 The caller type. Always `direct`.
4251
4252 - `"direct"`
4253
4254 - `Program object { caller_id, type }`
4255
4256 - `caller_id: string`
4257
4258 The call ID of the program item that produced this tool call.
4259
4260 - `type: "program"`
4261
4262 The caller type. Always `program`.
4263
4264 - `"program"`
4265
4266### Example
4267
4268```http
4269curl https://api.openai.com/v1/conversations/$CONVERSATION_ID/items/$ITEM_ID \
4270 -H "Authorization: Bearer $OPENAI_API_KEY"
4271```
4272
4273#### Response
4274
4275```json
4276{
4277 "id": "id",
4278 "content": [
4279 {
4280 "text": "text",
4281 "type": "input_text",
4282 "prompt_cache_breakpoint": {
4283 "mode": "explicit"
4284 }
4285 }
4286 ],
4287 "role": "unknown",
4288 "status": "in_progress",
4289 "type": "message",
4290 "phase": "commentary"
4291}
4292```
4293
4294### Example
4295
4296```http
4297curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \
4298 -H "Authorization: Bearer $OPENAI_API_KEY"
4299```
4300
4301#### Response
4302
4303```json
4304{
4305 "type": "message",
4306 "id": "msg_abc",
4307 "status": "completed",
4308 "role": "user",
4309 "content": [
4310 {"type": "input_text", "text": "Hello!"}
4311 ]
4312}
4313```