java/resources/conversations/methods/create/index.md +0 −2955 deleted
File Deleted View Diff
1## Create a conversation
2
3`Conversation conversations().create(ConversationCreateParamsparams = ConversationCreateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`
4
5**post** `/conversations`
6
7Create a conversation.
8
9### Parameters
10
11- `ConversationCreateParams params`
12
13 - `Optional<List<ResponseInputItem>> items`
14
15 Initial items to include in the conversation context. You may add up to 20 items at a time.
16
17 - `class EasyInputMessage:`
18
19 A message input to the model with a role indicating instruction following
20 hierarchy. Instructions given with the `developer` or `system` role take
21 precedence over instructions given with the `user` role. Messages with the
22 `assistant` role are presumed to have been generated by the model in previous
23 interactions.
24
25 - `Content content`
26
27 Text, image, or audio input to the model, used to generate a response.
28 Can also contain previous assistant responses.
29
30 - `String`
31
32 - `List<ResponseInputContent>`
33
34 - `class ResponseInputText:`
35
36 A text input to the model.
37
38 - `String text`
39
40 The text input to the model.
41
42 - `JsonValue; type "input_text"constant`
43
44 The type of the input item. Always `input_text`.
45
46 - `INPUT_TEXT("input_text")`
47
48 - `class ResponseInputImage:`
49
50 An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).
51
52 - `Detail detail`
53
54 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
55
56 - `LOW("low")`
57
58 - `HIGH("high")`
59
60 - `AUTO("auto")`
61
62 - `ORIGINAL("original")`
63
64 - `JsonValue; type "input_image"constant`
65
66 The type of the input item. Always `input_image`.
67
68 - `INPUT_IMAGE("input_image")`
69
70 - `Optional<String> fileId`
71
72 The ID of the file to be sent to the model.
73
74 - `Optional<String> imageUrl`
75
76 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
77
78 - `class ResponseInputFile:`
79
80 A file input to the model.
81
82 - `JsonValue; type "input_file"constant`
83
84 The type of the input item. Always `input_file`.
85
86 - `INPUT_FILE("input_file")`
87
88 - `Optional<Detail> detail`
89
90 The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`.
91
92 - `LOW("low")`
93
94 - `HIGH("high")`
95
96 - `Optional<String> fileData`
97
98 The content of the file to be sent to the model.
99
100 - `Optional<String> fileId`
101
102 The ID of the file to be sent to the model.
103
104 - `Optional<String> fileUrl`
105
106 The URL of the file to be sent to the model.
107
108 - `Optional<String> filename`
109
110 The name of the file to be sent to the model.
111
112 - `Role role`
113
114 The role of the message input. One of `user`, `assistant`, `system`, or
115 `developer`.
116
117 - `USER("user")`
118
119 - `ASSISTANT("assistant")`
120
121 - `SYSTEM("system")`
122
123 - `DEVELOPER("developer")`
124
125 - `Optional<Phase> phase`
126
127 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).
128 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
129 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
130
131 - `COMMENTARY("commentary")`
132
133 - `FINAL_ANSWER("final_answer")`
134
135 - `Optional<Type> type`
136
137 The type of the message input. Always `message`.
138
139 - `MESSAGE("message")`
140
141 - `Message`
142
143 - `List<ResponseInputContent> content`
144
145 A list of one or many input items to the model, containing different content
146 types.
147
148 - `class ResponseInputText:`
149
150 A text input to the model.
151
152 - `class ResponseInputImage:`
153
154 An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).
155
156 - `class ResponseInputFile:`
157
158 A file input to the model.
159
160 - `Role role`
161
162 The role of the message input. One of `user`, `system`, or `developer`.
163
164 - `USER("user")`
165
166 - `SYSTEM("system")`
167
168 - `DEVELOPER("developer")`
169
170 - `Optional<Status> status`
171
172 The status of item. One of `in_progress`, `completed`, or
173 `incomplete`. Populated when items are returned via API.
174
175 - `IN_PROGRESS("in_progress")`
176
177 - `COMPLETED("completed")`
178
179 - `INCOMPLETE("incomplete")`
180
181 - `Optional<Type> type`
182
183 The type of the message input. Always set to `message`.
184
185 - `MESSAGE("message")`
186
187 - `class ResponseOutputMessage:`
188
189 An output message from the model.
190
191 - `String id`
192
193 The unique ID of the output message.
194
195 - `List<Content> content`
196
197 The content of the output message.
198
199 - `class ResponseOutputText:`
200
201 A text output from the model.
202
203 - `List<Annotation> annotations`
204
205 The annotations of the text output.
206
207 - `class FileCitation:`
208
209 A citation to a file.
210
211 - `String fileId`
212
213 The ID of the file.
214
215 - `String filename`
216
217 The filename of the file cited.
218
219 - `long index`
220
221 The index of the file in the list of files.
222
223 - `JsonValue; type "file_citation"constant`
224
225 The type of the file citation. Always `file_citation`.
226
227 - `FILE_CITATION("file_citation")`
228
229 - `class UrlCitation:`
230
231 A citation for a web resource used to generate a model response.
232
233 - `long endIndex`
234
235 The index of the last character of the URL citation in the message.
236
237 - `long startIndex`
238
239 The index of the first character of the URL citation in the message.
240
241 - `String title`
242
243 The title of the web resource.
244
245 - `JsonValue; type "url_citation"constant`
246
247 The type of the URL citation. Always `url_citation`.
248
249 - `URL_CITATION("url_citation")`
250
251 - `String url`
252
253 The URL of the web resource.
254
255 - `class ContainerFileCitation:`
256
257 A citation for a container file used to generate a model response.
258
259 - `String containerId`
260
261 The ID of the container file.
262
263 - `long endIndex`
264
265 The index of the last character of the container file citation in the message.
266
267 - `String fileId`
268
269 The ID of the file.
270
271 - `String filename`
272
273 The filename of the container file cited.
274
275 - `long startIndex`
276
277 The index of the first character of the container file citation in the message.
278
279 - `JsonValue; type "container_file_citation"constant`
280
281 The type of the container file citation. Always `container_file_citation`.
282
283 - `CONTAINER_FILE_CITATION("container_file_citation")`
284
285 - `class FilePath:`
286
287 A path to a file.
288
289 - `String fileId`
290
291 The ID of the file.
292
293 - `long index`
294
295 The index of the file in the list of files.
296
297 - `JsonValue; type "file_path"constant`
298
299 The type of the file path. Always `file_path`.
300
301 - `FILE_PATH("file_path")`
302
303 - `String text`
304
305 The text output from the model.
306
307 - `JsonValue; type "output_text"constant`
308
309 The type of the output text. Always `output_text`.
310
311 - `OUTPUT_TEXT("output_text")`
312
313 - `Optional<List<Logprob>> logprobs`
314
315 - `String token`
316
317 - `List<long> bytes`
318
319 - `double logprob`
320
321 - `List<TopLogprob> topLogprobs`
322
323 - `String token`
324
325 - `List<long> bytes`
326
327 - `double logprob`
328
329 - `class ResponseOutputRefusal:`
330
331 A refusal from the model.
332
333 - `String refusal`
334
335 The refusal explanation from the model.
336
337 - `JsonValue; type "refusal"constant`
338
339 The type of the refusal. Always `refusal`.
340
341 - `REFUSAL("refusal")`
342
343 - `JsonValue; role "assistant"constant`
344
345 The role of the output message. Always `assistant`.
346
347 - `ASSISTANT("assistant")`
348
349 - `Status status`
350
351 The status of the message input. One of `in_progress`, `completed`, or
352 `incomplete`. Populated when input items are returned via API.
353
354 - `IN_PROGRESS("in_progress")`
355
356 - `COMPLETED("completed")`
357
358 - `INCOMPLETE("incomplete")`
359
360 - `JsonValue; type "message"constant`
361
362 The type of the output message. Always `message`.
363
364 - `MESSAGE("message")`
365
366 - `Optional<Phase> phase`
367
368 Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).
369 For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
370 phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
371
372 - `COMMENTARY("commentary")`
373
374 - `FINAL_ANSWER("final_answer")`
375
376 - `class ResponseFileSearchToolCall:`
377
378 The results of a file search tool call. See the
379 [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information.
380
381 - `String id`
382
383 The unique ID of the file search tool call.
384
385 - `List<String> queries`
386
387 The queries used to search for files.
388
389 - `Status status`
390
391 The status of the file search tool call. One of `in_progress`,
392 `searching`, `incomplete` or `failed`,
393
394 - `IN_PROGRESS("in_progress")`
395
396 - `SEARCHING("searching")`
397
398 - `COMPLETED("completed")`
399
400 - `INCOMPLETE("incomplete")`
401
402 - `FAILED("failed")`
403
404 - `JsonValue; type "file_search_call"constant`
405
406 The type of the file search tool call. Always `file_search_call`.
407
408 - `FILE_SEARCH_CALL("file_search_call")`
409
410 - `Optional<List<Result>> results`
411
412 The results of the file search tool call.
413
414 - `Optional<Attributes> attributes`
415
416 Set of 16 key-value pairs that can be attached to an object. This can be
417 useful for storing additional information about the object in a structured
418 format, and querying for objects via API or the dashboard. Keys are strings
419 with a maximum length of 64 characters. Values are strings with a maximum
420 length of 512 characters, booleans, or numbers.
421
422 - `String`
423
424 - `double`
425
426 - `boolean`
427
428 - `Optional<String> fileId`
429
430 The unique ID of the file.
431
432 - `Optional<String> filename`
433
434 The name of the file.
435
436 - `Optional<Double> score`
437
438 The relevance score of the file - a value between 0 and 1.
439
440 - `Optional<String> text`
441
442 The text that was retrieved from the file.
443
444 - `class ResponseComputerToolCall:`
445
446 A tool call to a computer use tool. See the
447 [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information.
448
449 - `String id`
450
451 The unique ID of the computer call.
452
453 - `String callId`
454
455 An identifier used when responding to the tool call with output.
456
457 - `List<PendingSafetyCheck> pendingSafetyChecks`
458
459 The pending safety checks for the computer call.
460
461 - `String id`
462
463 The ID of the pending safety check.
464
465 - `Optional<String> code`
466
467 The type of the pending safety check.
468
469 - `Optional<String> message`
470
471 Details about the pending safety check.
472
473 - `Status status`
474
475 The status of the item. One of `in_progress`, `completed`, or
476 `incomplete`. Populated when items are returned via API.
477
478 - `IN_PROGRESS("in_progress")`
479
480 - `COMPLETED("completed")`
481
482 - `INCOMPLETE("incomplete")`
483
484 - `Type type`
485
486 The type of the computer call. Always `computer_call`.
487
488 - `COMPUTER_CALL("computer_call")`
489
490 - `Optional<Action> action`
491
492 A click action.
493
494 - `class Click:`
495
496 A click action.
497
498 - `Button button`
499
500 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
501
502 - `LEFT("left")`
503
504 - `RIGHT("right")`
505
506 - `WHEEL("wheel")`
507
508 - `BACK("back")`
509
510 - `FORWARD("forward")`
511
512 - `JsonValue; type "click"constant`
513
514 Specifies the event type. For a click action, this property is always `click`.
515
516 - `CLICK("click")`
517
518 - `long x`
519
520 The x-coordinate where the click occurred.
521
522 - `long y`
523
524 The y-coordinate where the click occurred.
525
526 - `Optional<List<String>> keys`
527
528 The keys being held while clicking.
529
530 - `class DoubleClick:`
531
532 A double click action.
533
534 - `Optional<List<String>> keys`
535
536 The keys being held while double-clicking.
537
538 - `JsonValue; type "double_click"constant`
539
540 Specifies the event type. For a double click action, this property is always set to `double_click`.
541
542 - `DOUBLE_CLICK("double_click")`
543
544 - `long x`
545
546 The x-coordinate where the double click occurred.
547
548 - `long y`
549
550 The y-coordinate where the double click occurred.
551
552 - `class Drag:`
553
554 A drag action.
555
556 - `List<Path> path`
557
558 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
559
560 ```
561 [
562 { x: 100, y: 200 },
563 { x: 200, y: 300 }
564 ]
565 ```
566
567 - `long x`
568
569 The x-coordinate.
570
571 - `long y`
572
573 The y-coordinate.
574
575 - `JsonValue; type "drag"constant`
576
577 Specifies the event type. For a drag action, this property is always set to `drag`.
578
579 - `DRAG("drag")`
580
581 - `Optional<List<String>> keys`
582
583 The keys being held while dragging the mouse.
584
585 - `class Keypress:`
586
587 A collection of keypresses the model would like to perform.
588
589 - `List<String> keys`
590
591 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
592
593 - `JsonValue; type "keypress"constant`
594
595 Specifies the event type. For a keypress action, this property is always set to `keypress`.
596
597 - `KEYPRESS("keypress")`
598
599 - `class Move:`
600
601 A mouse move action.
602
603 - `JsonValue; type "move"constant`
604
605 Specifies the event type. For a move action, this property is always set to `move`.
606
607 - `MOVE("move")`
608
609 - `long x`
610
611 The x-coordinate to move to.
612
613 - `long y`
614
615 The y-coordinate to move to.
616
617 - `Optional<List<String>> keys`
618
619 The keys being held while moving the mouse.
620
621 - `JsonValue;`
622
623 - `JsonValue; type "screenshot"constant`
624
625 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
626
627 - `SCREENSHOT("screenshot")`
628
629 - `class Scroll:`
630
631 A scroll action.
632
633 - `long scrollX`
634
635 The horizontal scroll distance.
636
637 - `long scrollY`
638
639 The vertical scroll distance.
640
641 - `JsonValue; type "scroll"constant`
642
643 Specifies the event type. For a scroll action, this property is always set to `scroll`.
644
645 - `SCROLL("scroll")`
646
647 - `long x`
648
649 The x-coordinate where the scroll occurred.
650
651 - `long y`
652
653 The y-coordinate where the scroll occurred.
654
655 - `Optional<List<String>> keys`
656
657 The keys being held while scrolling.
658
659 - `class Type:`
660
661 An action to type in text.
662
663 - `String text`
664
665 The text to type.
666
667 - `JsonValue; type "type"constant`
668
669 Specifies the event type. For a type action, this property is always set to `type`.
670
671 - `TYPE("type")`
672
673 - `JsonValue;`
674
675 - `JsonValue; type "wait"constant`
676
677 Specifies the event type. For a wait action, this property is always set to `wait`.
678
679 - `WAIT("wait")`
680
681 - `Optional<List<ComputerAction>> actions`
682
683 Flattened batched actions for `computer_use`. Each action includes an
684 `type` discriminator and action-specific fields.
685
686 - `Click`
687
688 - `Button button`
689
690 Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.
691
692 - `LEFT("left")`
693
694 - `RIGHT("right")`
695
696 - `WHEEL("wheel")`
697
698 - `BACK("back")`
699
700 - `FORWARD("forward")`
701
702 - `JsonValue; type "click"constant`
703
704 Specifies the event type. For a click action, this property is always `click`.
705
706 - `CLICK("click")`
707
708 - `long x`
709
710 The x-coordinate where the click occurred.
711
712 - `long y`
713
714 The y-coordinate where the click occurred.
715
716 - `Optional<List<String>> keys`
717
718 The keys being held while clicking.
719
720 - `DoubleClick`
721
722 - `Optional<List<String>> keys`
723
724 The keys being held while double-clicking.
725
726 - `JsonValue; type "double_click"constant`
727
728 Specifies the event type. For a double click action, this property is always set to `double_click`.
729
730 - `DOUBLE_CLICK("double_click")`
731
732 - `long x`
733
734 The x-coordinate where the double click occurred.
735
736 - `long y`
737
738 The y-coordinate where the double click occurred.
739
740 - `Drag`
741
742 - `List<Path> path`
743
744 An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
745
746 ```
747 [
748 { x: 100, y: 200 },
749 { x: 200, y: 300 }
750 ]
751 ```
752
753 - `long x`
754
755 The x-coordinate.
756
757 - `long y`
758
759 The y-coordinate.
760
761 - `JsonValue; type "drag"constant`
762
763 Specifies the event type. For a drag action, this property is always set to `drag`.
764
765 - `DRAG("drag")`
766
767 - `Optional<List<String>> keys`
768
769 The keys being held while dragging the mouse.
770
771 - `Keypress`
772
773 - `List<String> keys`
774
775 The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
776
777 - `JsonValue; type "keypress"constant`
778
779 Specifies the event type. For a keypress action, this property is always set to `keypress`.
780
781 - `KEYPRESS("keypress")`
782
783 - `Move`
784
785 - `JsonValue; type "move"constant`
786
787 Specifies the event type. For a move action, this property is always set to `move`.
788
789 - `MOVE("move")`
790
791 - `long x`
792
793 The x-coordinate to move to.
794
795 - `long y`
796
797 The y-coordinate to move to.
798
799 - `Optional<List<String>> keys`
800
801 The keys being held while moving the mouse.
802
803 - `JsonValue;`
804
805 - `JsonValue; type "screenshot"constant`
806
807 Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
808
809 - `SCREENSHOT("screenshot")`
810
811 - `Scroll`
812
813 - `long scrollX`
814
815 The horizontal scroll distance.
816
817 - `long scrollY`
818
819 The vertical scroll distance.
820
821 - `JsonValue; type "scroll"constant`
822
823 Specifies the event type. For a scroll action, this property is always set to `scroll`.
824
825 - `SCROLL("scroll")`
826
827 - `long x`
828
829 The x-coordinate where the scroll occurred.
830
831 - `long y`
832
833 The y-coordinate where the scroll occurred.
834
835 - `Optional<List<String>> keys`
836
837 The keys being held while scrolling.
838
839 - `Type`
840
841 - `String text`
842
843 The text to type.
844
845 - `JsonValue; type "type"constant`
846
847 Specifies the event type. For a type action, this property is always set to `type`.
848
849 - `TYPE("type")`
850
851 - `JsonValue;`
852
853 - `JsonValue; type "wait"constant`
854
855 Specifies the event type. For a wait action, this property is always set to `wait`.
856
857 - `WAIT("wait")`
858
859 - `ComputerCallOutput`
860
861 - `String callId`
862
863 The ID of the computer tool call that produced the output.
864
865 - `ResponseComputerToolCallOutputScreenshot output`
866
867 A computer screenshot image used with the computer use tool.
868
869 - `JsonValue; type "computer_screenshot"constant`
870
871 Specifies the event type. For a computer screenshot, this property is
872 always set to `computer_screenshot`.
873
874 - `COMPUTER_SCREENSHOT("computer_screenshot")`
875
876 - `Optional<String> fileId`
877
878 The identifier of an uploaded file that contains the screenshot.
879
880 - `Optional<String> imageUrl`
881
882 The URL of the screenshot image.
883
884 - `JsonValue; type "computer_call_output"constant`
885
886 The type of the computer tool call output. Always `computer_call_output`.
887
888 - `COMPUTER_CALL_OUTPUT("computer_call_output")`
889
890 - `Optional<String> id`
891
892 The ID of the computer tool call output.
893
894 - `Optional<List<AcknowledgedSafetyCheck>> acknowledgedSafetyChecks`
895
896 The safety checks reported by the API that have been acknowledged by the developer.
897
898 - `String id`
899
900 The ID of the pending safety check.
901
902 - `Optional<String> code`
903
904 The type of the pending safety check.
905
906 - `Optional<String> message`
907
908 Details about the pending safety check.
909
910 - `Optional<Status> status`
911
912 The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.
913
914 - `IN_PROGRESS("in_progress")`
915
916 - `COMPLETED("completed")`
917
918 - `INCOMPLETE("incomplete")`
919
920 - `class ResponseFunctionWebSearch:`
921
922 The results of a web search tool call. See the
923 [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information.
924
925 - `String id`
926
927 The unique ID of the web search tool call.
928
929 - `Action action`
930
931 An object describing the specific action taken in this web search call.
932 Includes details on how the model used the web (search, open_page, find_in_page).
933
934 - `class Search:`
935
936 Action type "search" - Performs a web search query.
937
938 - `String query`
939
940 [DEPRECATED] The search query.
941
942 - `JsonValue; type "search"constant`
943
944 The action type.
945
946 - `SEARCH("search")`
947
948 - `Optional<List<String>> queries`
949
950 The search queries.
951
952 - `Optional<List<Source>> sources`
953
954 The sources used in the search.
955
956 - `JsonValue; type "url"constant`
957
958 The type of source. Always `url`.
959
960 - `URL("url")`
961
962 - `String url`
963
964 The URL of the source.
965
966 - `class OpenPage:`
967
968 Action type "open_page" - Opens a specific URL from search results.
969
970 - `JsonValue; type "open_page"constant`
971
972 The action type.
973
974 - `OPEN_PAGE("open_page")`
975
976 - `Optional<String> url`
977
978 The URL opened by the model.
979
980 - `class FindInPage:`
981
982 Action type "find_in_page": Searches for a pattern within a loaded page.
983
984 - `String pattern`
985
986 The pattern or text to search for within the page.
987
988 - `JsonValue; type "find_in_page"constant`
989
990 The action type.
991
992 - `FIND_IN_PAGE("find_in_page")`
993
994 - `String url`
995
996 The URL of the page searched for the pattern.
997
998 - `Status status`
999
1000 The status of the web search tool call.
1001
1002 - `IN_PROGRESS("in_progress")`
1003
1004 - `SEARCHING("searching")`
1005
1006 - `COMPLETED("completed")`
1007
1008 - `FAILED("failed")`
1009
1010 - `JsonValue; type "web_search_call"constant`
1011
1012 The type of the web search tool call. Always `web_search_call`.
1013
1014 - `WEB_SEARCH_CALL("web_search_call")`
1015
1016 - `class ResponseFunctionToolCall:`
1017
1018 A tool call to run a function. See the
1019 [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.
1020
1021 - `String arguments`
1022
1023 A JSON string of the arguments to pass to the function.
1024
1025 - `String callId`
1026
1027 The unique ID of the function tool call generated by the model.
1028
1029 - `String name`
1030
1031 The name of the function to run.
1032
1033 - `JsonValue; type "function_call"constant`
1034
1035 The type of the function tool call. Always `function_call`.
1036
1037 - `FUNCTION_CALL("function_call")`
1038
1039 - `Optional<String> id`
1040
1041 The unique ID of the function tool call.
1042
1043 - `Optional<String> namespace`
1044
1045 The namespace of the function to run.
1046
1047 - `Optional<Status> status`
1048
1049 The status of the item. One of `in_progress`, `completed`, or
1050 `incomplete`. Populated when items are returned via API.
1051
1052 - `IN_PROGRESS("in_progress")`
1053
1054 - `COMPLETED("completed")`
1055
1056 - `INCOMPLETE("incomplete")`
1057
1058 - `FunctionCallOutput`
1059
1060 - `String callId`
1061
1062 The unique ID of the function tool call generated by the model.
1063
1064 - `Output output`
1065
1066 Text, image, or file output of the function tool call.
1067
1068 - `String`
1069
1070 - `List<ResponseFunctionCallOutputItem>`
1071
1072 - `class ResponseInputTextContent:`
1073
1074 A text input to the model.
1075
1076 - `String text`
1077
1078 The text input to the model.
1079
1080 - `JsonValue; type "input_text"constant`
1081
1082 The type of the input item. Always `input_text`.
1083
1084 - `INPUT_TEXT("input_text")`
1085
1086 - `class ResponseInputImageContent:`
1087
1088 An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision)
1089
1090 - `JsonValue; type "input_image"constant`
1091
1092 The type of the input item. Always `input_image`.
1093
1094 - `INPUT_IMAGE("input_image")`
1095
1096 - `Optional<Detail> detail`
1097
1098 The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
1099
1100 - `LOW("low")`
1101
1102 - `HIGH("high")`
1103
1104 - `AUTO("auto")`
1105
1106 - `ORIGINAL("original")`
1107
1108 - `Optional<String> fileId`
1109
1110 The ID of the file to be sent to the model.
1111
1112 - `Optional<String> imageUrl`
1113
1114 The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.
1115
1116 - `class ResponseInputFileContent:`
1117
1118 A file input to the model.
1119
1120 - `JsonValue; type "input_file"constant`
1121
1122 The type of the input item. Always `input_file`.
1123
1124 - `INPUT_FILE("input_file")`
1125
1126 - `Optional<Detail> detail`
1127
1128 The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`.
1129
1130 - `LOW("low")`
1131
1132 - `HIGH("high")`
1133
1134 - `Optional<String> fileData`
1135
1136 The base64-encoded data of the file to be sent to the model.
1137
1138 - `Optional<String> fileId`
1139
1140 The ID of the file to be sent to the model.
1141
1142 - `Optional<String> fileUrl`
1143
1144 The URL of the file to be sent to the model.
1145
1146 - `Optional<String> filename`
1147
1148 The name of the file to be sent to the model.
1149
1150 - `JsonValue; type "function_call_output"constant`
1151
1152 The type of the function tool call output. Always `function_call_output`.
1153
1154 - `FUNCTION_CALL_OUTPUT("function_call_output")`
1155
1156 - `Optional<String> id`
1157
1158 The unique ID of the function tool call output. Populated when this item is returned via API.
1159
1160 - `Optional<Status> status`
1161
1162 The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.
1163
1164 - `IN_PROGRESS("in_progress")`
1165
1166 - `COMPLETED("completed")`
1167
1168 - `INCOMPLETE("incomplete")`
1169
1170 - `ToolSearchCall`
1171
1172 - `JsonValue arguments`
1173
1174 The arguments supplied to the tool search call.
1175
1176 - `JsonValue; type "tool_search_call"constant`
1177
1178 The item type. Always `tool_search_call`.
1179
1180 - `TOOL_SEARCH_CALL("tool_search_call")`
1181
1182 - `Optional<String> id`
1183
1184 The unique ID of this tool search call.
1185
1186 - `Optional<String> callId`
1187
1188 The unique ID of the tool search call generated by the model.
1189
1190 - `Optional<Execution> execution`
1191
1192 Whether tool search was executed by the server or by the client.
1193
1194 - `SERVER("server")`
1195
1196 - `CLIENT("client")`
1197
1198 - `Optional<Status> status`
1199
1200 The status of the tool search call.
1201
1202 - `IN_PROGRESS("in_progress")`
1203
1204 - `COMPLETED("completed")`
1205
1206 - `INCOMPLETE("incomplete")`
1207
1208 - `class ResponseToolSearchOutputItemParam:`
1209
1210 - `List<Tool> tools`
1211
1212 The loaded tool definitions returned by the tool search output.
1213
1214 - `class FunctionTool:`
1215
1216 Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).
1217
1218 - `String name`
1219
1220 The name of the function to call.
1221
1222 - `Optional<Parameters> parameters`
1223
1224 A JSON schema object describing the parameters of the function.
1225
1226 - `Optional<Boolean> strict`
1227
1228 Whether to enforce strict parameter validation. Default `true`.
1229
1230 - `JsonValue; type "function"constant`
1231
1232 The type of the function tool. Always `function`.
1233
1234 - `FUNCTION("function")`
1235
1236 - `Optional<Boolean> deferLoading`
1237
1238 Whether this function is deferred and loaded via tool search.
1239
1240 - `Optional<String> description`
1241
1242 A description of the function. Used by the model to determine whether or not to call the function.
1243
1244 - `class FileSearchTool:`
1245
1246 A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
1247
1248 - `JsonValue; type "file_search"constant`
1249
1250 The type of the file search tool. Always `file_search`.
1251
1252 - `FILE_SEARCH("file_search")`
1253
1254 - `List<String> vectorStoreIds`
1255
1256 The IDs of the vector stores to search.
1257
1258 - `Optional<Filters> filters`
1259
1260 A filter to apply.
1261
1262 - `class ComparisonFilter:`
1263
1264 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1265
1266 - `String key`
1267
1268 The key to compare against the value.
1269
1270 - `Type type`
1271
1272 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
1273
1274 - `eq`: equals
1275 - `ne`: not equal
1276 - `gt`: greater than
1277 - `gte`: greater than or equal
1278 - `lt`: less than
1279 - `lte`: less than or equal
1280 - `in`: in
1281 - `nin`: not in
1282
1283 - `EQ("eq")`
1284
1285 - `NE("ne")`
1286
1287 - `GT("gt")`
1288
1289 - `GTE("gte")`
1290
1291 - `LT("lt")`
1292
1293 - `LTE("lte")`
1294
1295 - `IN("in")`
1296
1297 - `NIN("nin")`
1298
1299 - `Value value`
1300
1301 The value to compare against the attribute key; supports string, number, or boolean types.
1302
1303 - `String`
1304
1305 - `double`
1306
1307 - `boolean`
1308
1309 - `List<ComparisonFilterValueItem>`
1310
1311 - `String`
1312
1313 - `double`
1314
1315 - `class CompoundFilter:`
1316
1317 Combine multiple filters using `and` or `or`.
1318
1319 - `List<Filter> filters`
1320
1321 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
1322
1323 - `class ComparisonFilter:`
1324
1325 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
1326
1327 - `JsonValue`
1328
1329 - `Type type`
1330
1331 Type of operation: `and` or `or`.
1332
1333 - `AND("and")`
1334
1335 - `OR("or")`
1336
1337 - `Optional<Long> maxNumResults`
1338
1339 The maximum number of results to return. This number should be between 1 and 50 inclusive.
1340
1341 - `Optional<RankingOptions> rankingOptions`
1342
1343 Ranking options for search.
1344
1345 - `Optional<HybridSearch> hybridSearch`
1346
1347 Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
1348
1349 - `double embeddingWeight`
1350
1351 The weight of the embedding in the reciprocal ranking fusion.
1352
1353 - `double textWeight`
1354
1355 The weight of the text in the reciprocal ranking fusion.
1356
1357 - `Optional<Ranker> ranker`
1358
1359 The ranker to use for the file search.
1360
1361 - `AUTO("auto")`
1362
1363 - `DEFAULT_2024_11_15("default-2024-11-15")`
1364
1365 - `Optional<Double> scoreThreshold`
1366
1367 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.
1368
1369 - `class ComputerTool:`
1370
1371 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1372
1373 - `JsonValue; type "computer"constant`
1374
1375 The type of the computer tool. Always `computer`.
1376
1377 - `COMPUTER("computer")`
1378
1379 - `class ComputerUsePreviewTool:`
1380
1381 A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
1382
1383 - `long displayHeight`
1384
1385 The height of the computer display.
1386
1387 - `long displayWidth`
1388
1389 The width of the computer display.
1390
1391 - `Environment environment`
1392
1393 The type of computer environment to control.
1394
1395 - `WINDOWS("windows")`
1396
1397 - `MAC("mac")`
1398
1399 - `LINUX("linux")`
1400
1401 - `UBUNTU("ubuntu")`
1402
1403 - `BROWSER("browser")`
1404
1405 - `JsonValue; type "computer_use_preview"constant`
1406
1407 The type of the computer use tool. Always `computer_use_preview`.
1408
1409 - `COMPUTER_USE_PREVIEW("computer_use_preview")`
1410
1411 - `class WebSearchTool:`
1412
1413 Search the Internet for sources related to the prompt. Learn more about the
1414 [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
1415
1416 - `Type type`
1417
1418 The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
1419
1420 - `WEB_SEARCH("web_search")`
1421
1422 - `WEB_SEARCH_2025_08_26("web_search_2025_08_26")`
1423
1424 - `Optional<Filters> filters`
1425
1426 Filters for the search.
1427
1428 - `Optional<List<String>> allowedDomains`
1429
1430 Allowed domains for the search. If not provided, all domains are allowed.
1431 Subdomains of the provided domains are allowed as well.
1432
1433 Example: `["pubmed.ncbi.nlm.nih.gov"]`
1434
1435 - `Optional<SearchContextSize> searchContextSize`
1436
1437 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.
1438
1439 - `LOW("low")`
1440
1441 - `MEDIUM("medium")`
1442
1443 - `HIGH("high")`
1444
1445 - `Optional<UserLocation> userLocation`
1446
1447 The approximate location of the user.
1448
1449 - `Optional<String> city`
1450
1451 Free text input for the city of the user, e.g. `San Francisco`.
1452
1453 - `Optional<String> country`
1454
1455 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
1456
1457 - `Optional<String> region`
1458
1459 Free text input for the region of the user, e.g. `California`.
1460
1461 - `Optional<String> timezone`
1462
1463 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
1464
1465 - `Optional<Type> type`
1466
1467 The type of location approximation. Always `approximate`.
1468
1469 - `APPROXIMATE("approximate")`
1470
1471 - `Mcp`
1472
1473 - `String serverLabel`
1474
1475 A label for this MCP server, used to identify it in tool calls.
1476
1477 - `JsonValue; type "mcp"constant`
1478
1479 The type of the MCP tool. Always `mcp`.
1480
1481 - `MCP("mcp")`
1482
1483 - `Optional<AllowedTools> allowedTools`
1484
1485 List of allowed tool names or a filter object.
1486
1487 - `List<String>`
1488
1489 - `class McpToolFilter:`
1490
1491 A filter object to specify which tools are allowed.
1492
1493 - `Optional<Boolean> readOnly`
1494
1495 Indicates whether or not a tool modifies data or is read-only. If an
1496 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1497 it will match this filter.
1498
1499 - `Optional<List<String>> toolNames`
1500
1501 List of allowed tool names.
1502
1503 - `Optional<String> authorization`
1504
1505 An OAuth access token that can be used with a remote MCP server, either
1506 with a custom MCP server URL or a service connector. Your application
1507 must handle the OAuth authorization flow and provide the token here.
1508
1509 - `Optional<ConnectorId> connectorId`
1510
1511 Identifier for service connectors, like those available in ChatGPT. One of
1512 `server_url` or `connector_id` must be provided. Learn more about service
1513 connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
1514
1515 Currently supported `connector_id` values are:
1516
1517 - Dropbox: `connector_dropbox`
1518 - Gmail: `connector_gmail`
1519 - Google Calendar: `connector_googlecalendar`
1520 - Google Drive: `connector_googledrive`
1521 - Microsoft Teams: `connector_microsoftteams`
1522 - Outlook Calendar: `connector_outlookcalendar`
1523 - Outlook Email: `connector_outlookemail`
1524 - SharePoint: `connector_sharepoint`
1525
1526 - `CONNECTOR_DROPBOX("connector_dropbox")`
1527
1528 - `CONNECTOR_GMAIL("connector_gmail")`
1529
1530 - `CONNECTOR_GOOGLECALENDAR("connector_googlecalendar")`
1531
1532 - `CONNECTOR_GOOGLEDRIVE("connector_googledrive")`
1533
1534 - `CONNECTOR_MICROSOFTTEAMS("connector_microsoftteams")`
1535
1536 - `CONNECTOR_OUTLOOKCALENDAR("connector_outlookcalendar")`
1537
1538 - `CONNECTOR_OUTLOOKEMAIL("connector_outlookemail")`
1539
1540 - `CONNECTOR_SHAREPOINT("connector_sharepoint")`
1541
1542 - `Optional<Boolean> deferLoading`
1543
1544 Whether this MCP tool is deferred and discovered via tool search.
1545
1546 - `Optional<Headers> headers`
1547
1548 Optional HTTP headers to send to the MCP server. Use for authentication
1549 or other purposes.
1550
1551 - `Optional<RequireApproval> requireApproval`
1552
1553 Specify which of the MCP server's tools require approval.
1554
1555 - `class McpToolApprovalFilter:`
1556
1557 Specify which of the MCP server's tools require approval. Can be
1558 `always`, `never`, or a filter object associated with tools
1559 that require approval.
1560
1561 - `Optional<Always> always`
1562
1563 A filter object to specify which tools are allowed.
1564
1565 - `Optional<Boolean> readOnly`
1566
1567 Indicates whether or not a tool modifies data or is read-only. If an
1568 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1569 it will match this filter.
1570
1571 - `Optional<List<String>> toolNames`
1572
1573 List of allowed tool names.
1574
1575 - `Optional<Never> never`
1576
1577 A filter object to specify which tools are allowed.
1578
1579 - `Optional<Boolean> readOnly`
1580
1581 Indicates whether or not a tool modifies data or is read-only. If an
1582 MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1583 it will match this filter.
1584
1585 - `Optional<List<String>> toolNames`
1586
1587 List of allowed tool names.
1588
1589 - `enum McpToolApprovalSetting:`
1590
1591 Specify a single approval policy for all tools. One of `always` or
1592 `never`. When set to `always`, all tools will require approval. When
1593 set to `never`, all tools will not require approval.
1594
1595 - `ALWAYS("always")`
1596
1597 - `NEVER("never")`
1598
1599 - `Optional<String> serverDescription`
1600
1601 Optional description of the MCP server, used to provide more context.
1602
1603 - `Optional<String> serverUrl`
1604
1605 The URL for the MCP server. One of `server_url` or `connector_id` must be
1606 provided.
1607
1608 - `CodeInterpreter`
1609
1610 - `Container container`
1611
1612 The code interpreter container. Can be a container ID or an object that
1613 specifies uploaded file IDs to make available to your code, along with an
1614 optional `memory_limit` setting.
1615
1616 - `String`
1617
1618 - `class CodeInterpreterToolAuto:`
1619
1620 Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
1621
1622 - `JsonValue; type "auto"constant`
1623
1624 Always `auto`.
1625
1626 - `AUTO("auto")`
1627
1628 - `Optional<List<String>> fileIds`
1629
1630 An optional list of uploaded files to make available to your code.
1631
1632 - `Optional<MemoryLimit> memoryLimit`
1633
1634 The memory limit for the code interpreter container.
1635
1636 - `_1G("1g")`
1637
1638 - `_4G("4g")`
1639
1640 - `_16G("16g")`
1641
1642 - `_64G("64g")`
1643
1644 - `Optional<NetworkPolicy> networkPolicy`
1645
1646 Network access policy for the container.
1647
1648 - `class ContainerNetworkPolicyDisabled:`
1649
1650 - `JsonValue; type "disabled"constant`
1651
1652 Disable outbound network access. Always `disabled`.
1653
1654 - `DISABLED("disabled")`
1655
1656 - `class ContainerNetworkPolicyAllowlist:`
1657
1658 - `List<String> allowedDomains`
1659
1660 A list of allowed domains when type is `allowlist`.
1661
1662 - `JsonValue; type "allowlist"constant`
1663
1664 Allow outbound network access only to specified domains. Always `allowlist`.
1665
1666 - `ALLOWLIST("allowlist")`
1667
1668 - `Optional<List<ContainerNetworkPolicyDomainSecret>> domainSecrets`
1669
1670 Optional domain-scoped secrets for allowlisted domains.
1671
1672 - `String domain`
1673
1674 The domain associated with the secret.
1675
1676 - `String name`
1677
1678 The name of the secret to inject for the domain.
1679
1680 - `String value`
1681
1682 The secret value to inject for the domain.
1683
1684 - `JsonValue; type "code_interpreter"constant`
1685
1686 The type of the code interpreter tool. Always `code_interpreter`.
1687
1688 - `CODE_INTERPRETER("code_interpreter")`
1689
1690 - `ImageGeneration`
1691
1692 - `JsonValue; type "image_generation"constant`
1693
1694 The type of the image generation tool. Always `image_generation`.
1695
1696 - `IMAGE_GENERATION("image_generation")`
1697
1698 - `Optional<Action> action`
1699
1700 Whether to generate a new image or edit an existing image. Default: `auto`.
1701
1702 - `GENERATE("generate")`
1703
1704 - `EDIT("edit")`
1705
1706 - `AUTO("auto")`
1707
1708 - `Optional<Background> background`
1709
1710 Allows to set transparency for the background of the generated image(s).
1711 This parameter is only supported for GPT image models that support
1712 transparent backgrounds. Must be one of `transparent`, `opaque`, or
1713 `auto` (default value). When `auto` is used, the model will
1714 automatically determine the best background for the image.
1715
1716 `gpt-image-2` and `gpt-image-2-2026-04-21` do not support
1717 transparent backgrounds. Requests with `background` set to
1718 `transparent` will return an error for these models; use `opaque` or
1719 `auto` instead.
1720
1721 If `transparent`, the output format needs to support transparency,
1722 so it should be set to either `png` (default value) or `webp`.
1723
1724 - `TRANSPARENT("transparent")`
1725
1726 - `OPAQUE("opaque")`
1727
1728 - `AUTO("auto")`
1729
1730 - `Optional<InputFidelity> inputFidelity`
1731
1732 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`.
1733
1734 - `HIGH("high")`
1735
1736 - `LOW("low")`
1737
1738 - `Optional<InputImageMask> inputImageMask`
1739
1740 Optional mask for inpainting. Contains `image_url`
1741 (string, optional) and `file_id` (string, optional).
1742
1743 - `Optional<String> fileId`
1744
1745 File ID for the mask image.
1746
1747 - `Optional<String> imageUrl`
1748
1749 Base64-encoded mask image.
1750
1751 - `Optional<Model> model`
1752
1753 The image generation model to use. Default: `gpt-image-1`.
1754
1755 - `GPT_IMAGE_1("gpt-image-1")`
1756
1757 - `GPT_IMAGE_1_MINI("gpt-image-1-mini")`
1758
1759 - `GPT_IMAGE_2("gpt-image-2")`
1760
1761 - `GPT_IMAGE_2_2026_04_21("gpt-image-2-2026-04-21")`
1762
1763 - `GPT_IMAGE_1_5("gpt-image-1.5")`
1764
1765 - `CHATGPT_IMAGE_LATEST("chatgpt-image-latest")`
1766
1767 - `Optional<Moderation> moderation`
1768
1769 Moderation level for the generated image. Default: `auto`.
1770
1771 - `AUTO("auto")`
1772
1773 - `LOW("low")`
1774
1775 - `Optional<Long> outputCompression`
1776
1777 Compression level for the output image. Default: 100.
1778
1779 - `Optional<OutputFormat> outputFormat`
1780
1781 The output format of the generated image. One of `png`, `webp`, or
1782 `jpeg`. Default: `png`.
1783
1784 - `PNG("png")`
1785
1786 - `WEBP("webp")`
1787
1788 - `JPEG("jpeg")`
1789
1790 - `Optional<Long> partialImages`
1791
1792 Number of partial images to generate in streaming mode, from 0 (default value) to 3.
1793
1794 - `Optional<Quality> quality`
1795
1796 The quality of the generated image. One of `low`, `medium`, `high`,
1797 or `auto`. Default: `auto`.
1798
1799 - `LOW("low")`
1800
1801 - `MEDIUM("medium")`
1802
1803 - `HIGH("high")`
1804
1805 - `AUTO("auto")`
1806
1807 - `Optional<Size> size`
1808
1809 The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, 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`.
1810
1811 - `_1024X1024("1024x1024")`
1812
1813 - `_1024X1536("1024x1536")`
1814
1815 - `_1536X1024("1536x1024")`
1816
1817 - `AUTO("auto")`
1818
1819 - `JsonValue;`
1820
1821 - `JsonValue; type "local_shell"constant`
1822
1823 The type of the local shell tool. Always `local_shell`.
1824
1825 - `LOCAL_SHELL("local_shell")`
1826
1827 - `class FunctionShellTool:`
1828
1829 A tool that allows the model to execute shell commands.
1830
1831 - `JsonValue; type "shell"constant`
1832
1833 The type of the shell tool. Always `shell`.
1834
1835 - `SHELL("shell")`
1836
1837 - `Optional<Environment> environment`
1838
1839 - `class ContainerAuto:`
1840
1841 - `JsonValue; type "container_auto"constant`
1842
1843 Automatically creates a container for this request
1844
1845 - `CONTAINER_AUTO("container_auto")`
1846
1847 - `Optional<List<String>> fileIds`
1848
1849 An optional list of uploaded files to make available to your code.
1850
1851 - `Optional<MemoryLimit> memoryLimit`
1852
1853 The memory limit for the container.
1854
1855 - `_1G("1g")`
1856
1857 - `_4G("4g")`
1858
1859 - `_16G("16g")`
1860
1861 - `_64G("64g")`
1862
1863 - `Optional<NetworkPolicy> networkPolicy`
1864
1865 Network access policy for the container.
1866
1867 - `class ContainerNetworkPolicyDisabled:`
1868
1869 - `class ContainerNetworkPolicyAllowlist:`
1870
1871 - `Optional<List<Skill>> skills`
1872
1873 An optional list of skills referenced by id or inline data.
1874
1875 - `class SkillReference:`
1876
1877 - `String skillId`
1878
1879 The ID of the referenced skill.
1880
1881 - `JsonValue; type "skill_reference"constant`
1882
1883 References a skill created with the /v1/skills endpoint.
1884
1885 - `SKILL_REFERENCE("skill_reference")`
1886
1887 - `Optional<String> version`
1888
1889 Optional skill version. Use a positive integer or 'latest'. Omit for default.
1890
1891 - `class InlineSkill:`
1892
1893 - `String description`
1894
1895 The description of the skill.
1896
1897 - `String name`
1898
1899 The name of the skill.
1900
1901 - `InlineSkillSource source`
1902
1903 Inline skill payload
1904
1905 - `String data`
1906
1907 Base64-encoded skill zip bundle.
1908
1909 - `JsonValue; mediaType "application/zip"constant`
1910
1911 The media type of the inline skill payload. Must be `application/zip`.
1912
1913 - `APPLICATION_ZIP("application/zip")`
1914
1915 - `JsonValue; type "base64"constant`
1916
1917 The type of the inline skill source. Must be `base64`.
1918
1919 - `BASE64("base64")`
1920
1921 - `JsonValue; type "inline"constant`
1922
1923 Defines an inline skill for this request.
1924
1925 - `INLINE("inline")`
1926
1927 - `class LocalEnvironment:`
1928
1929 - `JsonValue; type "local"constant`
1930
1931 Use a local computer environment.
1932
1933 - `LOCAL("local")`
1934
1935 - `Optional<List<LocalSkill>> skills`
1936
1937 An optional list of skills.
1938
1939 - `String description`
1940
1941 The description of the skill.
1942
1943 - `String name`
1944
1945 The name of the skill.
1946
1947 - `String path`
1948
1949 The path to the directory containing the skill.
1950
1951 - `class ContainerReference:`
1952
1953 - `String containerId`
1954
1955 The ID of the referenced container.
1956
1957 - `JsonValue; type "container_reference"constant`
1958
1959 References a container created with the /v1/containers endpoint
1960
1961 - `CONTAINER_REFERENCE("container_reference")`
1962
1963 - `class CustomTool:`
1964
1965 A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
1966
1967 - `String name`
1968
1969 The name of the custom tool, used to identify it in tool calls.
1970
1971 - `JsonValue; type "custom"constant`
1972
1973 The type of the custom tool. Always `custom`.
1974
1975 - `CUSTOM("custom")`
1976
1977 - `Optional<Boolean> deferLoading`
1978
1979 Whether this tool should be deferred and discovered via tool search.
1980
1981 - `Optional<String> description`
1982
1983 Optional description of the custom tool, used to provide more context.
1984
1985 - `Optional<CustomToolInputFormat> format`
1986
1987 The input format for the custom tool. Default is unconstrained text.
1988
1989 - `JsonValue;`
1990
1991 - `JsonValue; type "text"constant`
1992
1993 Unconstrained text format. Always `text`.
1994
1995 - `TEXT("text")`
1996
1997 - `Grammar`
1998
1999 - `String definition`
2000
2001 The grammar definition.
2002
2003 - `Syntax syntax`
2004
2005 The syntax of the grammar definition. One of `lark` or `regex`.
2006
2007 - `LARK("lark")`
2008
2009 - `REGEX("regex")`
2010
2011 - `JsonValue; type "grammar"constant`
2012
2013 Grammar format. Always `grammar`.
2014
2015 - `GRAMMAR("grammar")`
2016
2017 - `class NamespaceTool:`
2018
2019 Groups function/custom tools under a shared namespace.
2020
2021 - `String description`
2022
2023 A description of the namespace shown to the model.
2024
2025 - `String name`
2026
2027 The namespace name used in tool calls (for example, `crm`).
2028
2029 - `List<Tool> tools`
2030
2031 The function/custom tools available inside this namespace.
2032
2033 - `class Function:`
2034
2035 - `String name`
2036
2037 - `JsonValue; type "function"constant`
2038
2039 - `FUNCTION("function")`
2040
2041 - `Optional<Boolean> deferLoading`
2042
2043 Whether this function should be deferred and discovered via tool search.
2044
2045 - `Optional<String> description`
2046
2047 - `Optional<JsonValue> parameters`
2048
2049 - `Optional<Boolean> strict`
2050
2051 - `class CustomTool:`
2052
2053 A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
2054
2055 - `JsonValue; type "namespace"constant`
2056
2057 The type of the tool. Always `namespace`.
2058
2059 - `NAMESPACE("namespace")`
2060
2061 - `class ToolSearchTool:`
2062
2063 Hosted or BYOT tool search configuration for deferred tools.
2064
2065 - `JsonValue; type "tool_search"constant`
2066
2067 The type of the tool. Always `tool_search`.
2068
2069 - `TOOL_SEARCH("tool_search")`
2070
2071 - `Optional<String> description`
2072
2073 Description shown to the model for a client-executed tool search tool.
2074
2075 - `Optional<Execution> execution`
2076
2077 Whether tool search is executed by the server or by the client.
2078
2079 - `SERVER("server")`
2080
2081 - `CLIENT("client")`
2082
2083 - `Optional<JsonValue> parameters`
2084
2085 Parameter schema for a client-executed tool search tool.
2086
2087 - `class WebSearchPreviewTool:`
2088
2089 This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
2090
2091 - `Type type`
2092
2093 The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
2094
2095 - `WEB_SEARCH_PREVIEW("web_search_preview")`
2096
2097 - `WEB_SEARCH_PREVIEW_2025_03_11("web_search_preview_2025_03_11")`
2098
2099 - `Optional<List<SearchContentType>> searchContentTypes`
2100
2101 - `TEXT("text")`
2102
2103 - `IMAGE("image")`
2104
2105 - `Optional<SearchContextSize> searchContextSize`
2106
2107 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.
2108
2109 - `LOW("low")`
2110
2111 - `MEDIUM("medium")`
2112
2113 - `HIGH("high")`
2114
2115 - `Optional<UserLocation> userLocation`
2116
2117 The user's location.
2118
2119 - `JsonValue; type "approximate"constant`
2120
2121 The type of location approximation. Always `approximate`.
2122
2123 - `APPROXIMATE("approximate")`
2124
2125 - `Optional<String> city`
2126
2127 Free text input for the city of the user, e.g. `San Francisco`.
2128
2129 - `Optional<String> country`
2130
2131 The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
2132
2133 - `Optional<String> region`
2134
2135 Free text input for the region of the user, e.g. `California`.
2136
2137 - `Optional<String> timezone`
2138
2139 The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
2140
2141 - `class ApplyPatchTool:`
2142
2143 Allows the assistant to create, delete, or update files using unified diffs.
2144
2145 - `JsonValue; type "apply_patch"constant`
2146
2147 The type of the tool. Always `apply_patch`.
2148
2149 - `APPLY_PATCH("apply_patch")`
2150
2151 - `JsonValue; type "tool_search_output"constant`
2152
2153 The item type. Always `tool_search_output`.
2154
2155 - `TOOL_SEARCH_OUTPUT("tool_search_output")`
2156
2157 - `Optional<String> id`
2158
2159 The unique ID of this tool search output.
2160
2161 - `Optional<String> callId`
2162
2163 The unique ID of the tool search call generated by the model.
2164
2165 - `Optional<Execution> execution`
2166
2167 Whether tool search was executed by the server or by the client.
2168
2169 - `SERVER("server")`
2170
2171 - `CLIENT("client")`
2172
2173 - `Optional<Status> status`
2174
2175 The status of the tool search output.
2176
2177 - `IN_PROGRESS("in_progress")`
2178
2179 - `COMPLETED("completed")`
2180
2181 - `INCOMPLETE("incomplete")`
2182
2183 - `class ResponseReasoningItem:`
2184
2185 A description of the chain of thought used by a reasoning model while generating
2186 a response. Be sure to include these items in your `input` to the Responses API
2187 for subsequent turns of a conversation if you are manually
2188 [managing context](https://platform.openai.com/docs/guides/conversation-state).
2189
2190 - `String id`
2191
2192 The unique identifier of the reasoning content.
2193
2194 - `List<Summary> summary`
2195
2196 Reasoning summary content.
2197
2198 - `String text`
2199
2200 A summary of the reasoning output from the model so far.
2201
2202 - `JsonValue; type "summary_text"constant`
2203
2204 The type of the object. Always `summary_text`.
2205
2206 - `SUMMARY_TEXT("summary_text")`
2207
2208 - `JsonValue; type "reasoning"constant`
2209
2210 The type of the object. Always `reasoning`.
2211
2212 - `REASONING("reasoning")`
2213
2214 - `Optional<List<Content>> content`
2215
2216 Reasoning text content.
2217
2218 - `String text`
2219
2220 The reasoning text from the model.
2221
2222 - `JsonValue; type "reasoning_text"constant`
2223
2224 The type of the reasoning text. Always `reasoning_text`.
2225
2226 - `REASONING_TEXT("reasoning_text")`
2227
2228 - `Optional<String> encryptedContent`
2229
2230 The encrypted content of the reasoning item - populated when a response is
2231 generated with `reasoning.encrypted_content` in the `include` parameter.
2232
2233 - `Optional<Status> status`
2234
2235 The status of the item. One of `in_progress`, `completed`, or
2236 `incomplete`. Populated when items are returned via API.
2237
2238 - `IN_PROGRESS("in_progress")`
2239
2240 - `COMPLETED("completed")`
2241
2242 - `INCOMPLETE("incomplete")`
2243
2244 - `class ResponseCompactionItemParam:`
2245
2246 A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact).
2247
2248 - `String encryptedContent`
2249
2250 The encrypted content of the compaction summary.
2251
2252 - `JsonValue; type "compaction"constant`
2253
2254 The type of the item. Always `compaction`.
2255
2256 - `COMPACTION("compaction")`
2257
2258 - `Optional<String> id`
2259
2260 The ID of the compaction item.
2261
2262 - `ImageGenerationCall`
2263
2264 - `String id`
2265
2266 The unique ID of the image generation call.
2267
2268 - `Optional<String> result`
2269
2270 The generated image encoded in base64.
2271
2272 - `Status status`
2273
2274 The status of the image generation call.
2275
2276 - `IN_PROGRESS("in_progress")`
2277
2278 - `COMPLETED("completed")`
2279
2280 - `GENERATING("generating")`
2281
2282 - `FAILED("failed")`
2283
2284 - `JsonValue; type "image_generation_call"constant`
2285
2286 The type of the image generation call. Always `image_generation_call`.
2287
2288 - `IMAGE_GENERATION_CALL("image_generation_call")`
2289
2290 - `class ResponseCodeInterpreterToolCall:`
2291
2292 A tool call to run code.
2293
2294 - `String id`
2295
2296 The unique ID of the code interpreter tool call.
2297
2298 - `Optional<String> code`
2299
2300 The code to run, or null if not available.
2301
2302 - `String containerId`
2303
2304 The ID of the container used to run the code.
2305
2306 - `Optional<List<Output>> outputs`
2307
2308 The outputs generated by the code interpreter, such as logs or images.
2309 Can be null if no outputs are available.
2310
2311 - `class Logs:`
2312
2313 The logs output from the code interpreter.
2314
2315 - `String logs`
2316
2317 The logs output from the code interpreter.
2318
2319 - `JsonValue; type "logs"constant`
2320
2321 The type of the output. Always `logs`.
2322
2323 - `LOGS("logs")`
2324
2325 - `class Image:`
2326
2327 The image output from the code interpreter.
2328
2329 - `JsonValue; type "image"constant`
2330
2331 The type of the output. Always `image`.
2332
2333 - `IMAGE("image")`
2334
2335 - `String url`
2336
2337 The URL of the image output from the code interpreter.
2338
2339 - `Status status`
2340
2341 The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.
2342
2343 - `IN_PROGRESS("in_progress")`
2344
2345 - `COMPLETED("completed")`
2346
2347 - `INCOMPLETE("incomplete")`
2348
2349 - `INTERPRETING("interpreting")`
2350
2351 - `FAILED("failed")`
2352
2353 - `JsonValue; type "code_interpreter_call"constant`
2354
2355 The type of the code interpreter tool call. Always `code_interpreter_call`.
2356
2357 - `CODE_INTERPRETER_CALL("code_interpreter_call")`
2358
2359 - `LocalShellCall`
2360
2361 - `String id`
2362
2363 The unique ID of the local shell call.
2364
2365 - `Action action`
2366
2367 Execute a shell command on the server.
2368
2369 - `List<String> command`
2370
2371 The command to run.
2372
2373 - `Env env`
2374
2375 Environment variables to set for the command.
2376
2377 - `JsonValue; type "exec"constant`
2378
2379 The type of the local shell action. Always `exec`.
2380
2381 - `EXEC("exec")`
2382
2383 - `Optional<Long> timeoutMs`
2384
2385 Optional timeout in milliseconds for the command.
2386
2387 - `Optional<String> user`
2388
2389 Optional user to run the command as.
2390
2391 - `Optional<String> workingDirectory`
2392
2393 Optional working directory to run the command in.
2394
2395 - `String callId`
2396
2397 The unique ID of the local shell tool call generated by the model.
2398
2399 - `Status status`
2400
2401 The status of the local shell call.
2402
2403 - `IN_PROGRESS("in_progress")`
2404
2405 - `COMPLETED("completed")`
2406
2407 - `INCOMPLETE("incomplete")`
2408
2409 - `JsonValue; type "local_shell_call"constant`
2410
2411 The type of the local shell call. Always `local_shell_call`.
2412
2413 - `LOCAL_SHELL_CALL("local_shell_call")`
2414
2415 - `LocalShellCallOutput`
2416
2417 - `String id`
2418
2419 The unique ID of the local shell tool call generated by the model.
2420
2421 - `String output`
2422
2423 A JSON string of the output of the local shell tool call.
2424
2425 - `JsonValue; type "local_shell_call_output"constant`
2426
2427 The type of the local shell tool call output. Always `local_shell_call_output`.
2428
2429 - `LOCAL_SHELL_CALL_OUTPUT("local_shell_call_output")`
2430
2431 - `Optional<Status> status`
2432
2433 The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2434
2435 - `IN_PROGRESS("in_progress")`
2436
2437 - `COMPLETED("completed")`
2438
2439 - `INCOMPLETE("incomplete")`
2440
2441 - `ShellCall`
2442
2443 - `Action action`
2444
2445 The shell commands and limits that describe how to run the tool call.
2446
2447 - `List<String> commands`
2448
2449 Ordered shell commands for the execution environment to run.
2450
2451 - `Optional<Long> maxOutputLength`
2452
2453 Maximum number of UTF-8 characters to capture from combined stdout and stderr output.
2454
2455 - `Optional<Long> timeoutMs`
2456
2457 Maximum wall-clock time in milliseconds to allow the shell commands to run.
2458
2459 - `String callId`
2460
2461 The unique ID of the shell tool call generated by the model.
2462
2463 - `JsonValue; type "shell_call"constant`
2464
2465 The type of the item. Always `shell_call`.
2466
2467 - `SHELL_CALL("shell_call")`
2468
2469 - `Optional<String> id`
2470
2471 The unique ID of the shell tool call. Populated when this item is returned via API.
2472
2473 - `Optional<Environment> environment`
2474
2475 The environment to execute the shell commands in.
2476
2477 - `class LocalEnvironment:`
2478
2479 - `class ContainerReference:`
2480
2481 - `Optional<Status> status`
2482
2483 The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.
2484
2485 - `IN_PROGRESS("in_progress")`
2486
2487 - `COMPLETED("completed")`
2488
2489 - `INCOMPLETE("incomplete")`
2490
2491 - `ShellCallOutput`
2492
2493 - `String callId`
2494
2495 The unique ID of the shell tool call generated by the model.
2496
2497 - `List<ResponseFunctionShellCallOutputContent> output`
2498
2499 Captured chunks of stdout and stderr output, along with their associated outcomes.
2500
2501 - `Outcome outcome`
2502
2503 The exit or timeout outcome associated with this shell call.
2504
2505 - `JsonValue;`
2506
2507 - `JsonValue; type "timeout"constant`
2508
2509 The outcome type. Always `timeout`.
2510
2511 - `TIMEOUT("timeout")`
2512
2513 - `class Exit:`
2514
2515 Indicates that the shell commands finished and returned an exit code.
2516
2517 - `long exitCode`
2518
2519 The exit code returned by the shell process.
2520
2521 - `JsonValue; type "exit"constant`
2522
2523 The outcome type. Always `exit`.
2524
2525 - `EXIT("exit")`
2526
2527 - `String stderr`
2528
2529 Captured stderr output for the shell call.
2530
2531 - `String stdout`
2532
2533 Captured stdout output for the shell call.
2534
2535 - `JsonValue; type "shell_call_output"constant`
2536
2537 The type of the item. Always `shell_call_output`.
2538
2539 - `SHELL_CALL_OUTPUT("shell_call_output")`
2540
2541 - `Optional<String> id`
2542
2543 The unique ID of the shell tool call output. Populated when this item is returned via API.
2544
2545 - `Optional<Long> maxOutputLength`
2546
2547 The maximum number of UTF-8 characters captured for this shell call's combined output.
2548
2549 - `Optional<Status> status`
2550
2551 The status of the shell call output.
2552
2553 - `IN_PROGRESS("in_progress")`
2554
2555 - `COMPLETED("completed")`
2556
2557 - `INCOMPLETE("incomplete")`
2558
2559 - `ApplyPatchCall`
2560
2561 - `String callId`
2562
2563 The unique ID of the apply patch tool call generated by the model.
2564
2565 - `Operation operation`
2566
2567 The specific create, delete, or update instruction for the apply_patch tool call.
2568
2569 - `class CreateFile:`
2570
2571 Instruction for creating a new file via the apply_patch tool.
2572
2573 - `String diff`
2574
2575 Unified diff content to apply when creating the file.
2576
2577 - `String path`
2578
2579 Path of the file to create relative to the workspace root.
2580
2581 - `JsonValue; type "create_file"constant`
2582
2583 The operation type. Always `create_file`.
2584
2585 - `CREATE_FILE("create_file")`
2586
2587 - `class DeleteFile:`
2588
2589 Instruction for deleting an existing file via the apply_patch tool.
2590
2591 - `String path`
2592
2593 Path of the file to delete relative to the workspace root.
2594
2595 - `JsonValue; type "delete_file"constant`
2596
2597 The operation type. Always `delete_file`.
2598
2599 - `DELETE_FILE("delete_file")`
2600
2601 - `class UpdateFile:`
2602
2603 Instruction for updating an existing file via the apply_patch tool.
2604
2605 - `String diff`
2606
2607 Unified diff content to apply to the existing file.
2608
2609 - `String path`
2610
2611 Path of the file to update relative to the workspace root.
2612
2613 - `JsonValue; type "update_file"constant`
2614
2615 The operation type. Always `update_file`.
2616
2617 - `UPDATE_FILE("update_file")`
2618
2619 - `Status status`
2620
2621 The status of the apply patch tool call. One of `in_progress` or `completed`.
2622
2623 - `IN_PROGRESS("in_progress")`
2624
2625 - `COMPLETED("completed")`
2626
2627 - `JsonValue; type "apply_patch_call"constant`
2628
2629 The type of the item. Always `apply_patch_call`.
2630
2631 - `APPLY_PATCH_CALL("apply_patch_call")`
2632
2633 - `Optional<String> id`
2634
2635 The unique ID of the apply patch tool call. Populated when this item is returned via API.
2636
2637 - `ApplyPatchCallOutput`
2638
2639 - `String callId`
2640
2641 The unique ID of the apply patch tool call generated by the model.
2642
2643 - `Status status`
2644
2645 The status of the apply patch tool call output. One of `completed` or `failed`.
2646
2647 - `COMPLETED("completed")`
2648
2649 - `FAILED("failed")`
2650
2651 - `JsonValue; type "apply_patch_call_output"constant`
2652
2653 The type of the item. Always `apply_patch_call_output`.
2654
2655 - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")`
2656
2657 - `Optional<String> id`
2658
2659 The unique ID of the apply patch tool call output. Populated when this item is returned via API.
2660
2661 - `Optional<String> output`
2662
2663 Optional human-readable log text from the apply patch tool (e.g., patch results or errors).
2664
2665 - `McpListTools`
2666
2667 - `String id`
2668
2669 The unique ID of the list.
2670
2671 - `String serverLabel`
2672
2673 The label of the MCP server.
2674
2675 - `List<Tool> tools`
2676
2677 The tools available on the server.
2678
2679 - `JsonValue inputSchema`
2680
2681 The JSON schema describing the tool's input.
2682
2683 - `String name`
2684
2685 The name of the tool.
2686
2687 - `Optional<JsonValue> annotations`
2688
2689 Additional annotations about the tool.
2690
2691 - `Optional<String> description`
2692
2693 The description of the tool.
2694
2695 - `JsonValue; type "mcp_list_tools"constant`
2696
2697 The type of the item. Always `mcp_list_tools`.
2698
2699 - `MCP_LIST_TOOLS("mcp_list_tools")`
2700
2701 - `Optional<String> error`
2702
2703 Error message if the server could not list tools.
2704
2705 - `McpApprovalRequest`
2706
2707 - `String id`
2708
2709 The unique ID of the approval request.
2710
2711 - `String arguments`
2712
2713 A JSON string of arguments for the tool.
2714
2715 - `String name`
2716
2717 The name of the tool to run.
2718
2719 - `String serverLabel`
2720
2721 The label of the MCP server making the request.
2722
2723 - `JsonValue; type "mcp_approval_request"constant`
2724
2725 The type of the item. Always `mcp_approval_request`.
2726
2727 - `MCP_APPROVAL_REQUEST("mcp_approval_request")`
2728
2729 - `McpApprovalResponse`
2730
2731 - `String approvalRequestId`
2732
2733 The ID of the approval request being answered.
2734
2735 - `boolean approve`
2736
2737 Whether the request was approved.
2738
2739 - `JsonValue; type "mcp_approval_response"constant`
2740
2741 The type of the item. Always `mcp_approval_response`.
2742
2743 - `MCP_APPROVAL_RESPONSE("mcp_approval_response")`
2744
2745 - `Optional<String> id`
2746
2747 The unique ID of the approval response
2748
2749 - `Optional<String> reason`
2750
2751 Optional reason for the decision.
2752
2753 - `McpCall`
2754
2755 - `String id`
2756
2757 The unique ID of the tool call.
2758
2759 - `String arguments`
2760
2761 A JSON string of the arguments passed to the tool.
2762
2763 - `String name`
2764
2765 The name of the tool that was run.
2766
2767 - `String serverLabel`
2768
2769 The label of the MCP server running the tool.
2770
2771 - `JsonValue; type "mcp_call"constant`
2772
2773 The type of the item. Always `mcp_call`.
2774
2775 - `MCP_CALL("mcp_call")`
2776
2777 - `Optional<String> approvalRequestId`
2778
2779 Unique identifier for the MCP tool call approval request.
2780 Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.
2781
2782 - `Optional<String> error`
2783
2784 The error from the tool call, if any.
2785
2786 - `Optional<String> output`
2787
2788 The output from the tool call.
2789
2790 - `Optional<Status> status`
2791
2792 The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
2793
2794 - `IN_PROGRESS("in_progress")`
2795
2796 - `COMPLETED("completed")`
2797
2798 - `INCOMPLETE("incomplete")`
2799
2800 - `CALLING("calling")`
2801
2802 - `FAILED("failed")`
2803
2804 - `class ResponseCustomToolCallOutput:`
2805
2806 The output of a custom tool call from your code, being sent back to the model.
2807
2808 - `String callId`
2809
2810 The call ID, used to map this custom tool call output to a custom tool call.
2811
2812 - `Output output`
2813
2814 The output from the custom tool call generated by your code.
2815 Can be a string or an list of output content.
2816
2817 - `String`
2818
2819 - `List<FunctionAndCustomToolCallOutput>`
2820
2821 - `class ResponseInputText:`
2822
2823 A text input to the model.
2824
2825 - `class ResponseInputImage:`
2826
2827 An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision).
2828
2829 - `class ResponseInputFile:`
2830
2831 A file input to the model.
2832
2833 - `JsonValue; type "custom_tool_call_output"constant`
2834
2835 The type of the custom tool call output. Always `custom_tool_call_output`.
2836
2837 - `CUSTOM_TOOL_CALL_OUTPUT("custom_tool_call_output")`
2838
2839 - `Optional<String> id`
2840
2841 The unique ID of the custom tool call output in the OpenAI platform.
2842
2843 - `class ResponseCustomToolCall:`
2844
2845 A call to a custom tool created by the model.
2846
2847 - `String callId`
2848
2849 An identifier used to map this custom tool call to a tool call output.
2850
2851 - `String input`
2852
2853 The input for the custom tool call generated by the model.
2854
2855 - `String name`
2856
2857 The name of the custom tool being called.
2858
2859 - `JsonValue; type "custom_tool_call"constant`
2860
2861 The type of the custom tool call. Always `custom_tool_call`.
2862
2863 - `CUSTOM_TOOL_CALL("custom_tool_call")`
2864
2865 - `Optional<String> id`
2866
2867 The unique ID of the custom tool call in the OpenAI platform.
2868
2869 - `Optional<String> namespace`
2870
2871 The namespace of the custom tool being called.
2872
2873 - `JsonValue;`
2874
2875 - `JsonValue; type "compaction_trigger"constant`
2876
2877 The type of the item. Always `compaction_trigger`.
2878
2879 - `COMPACTION_TRIGGER("compaction_trigger")`
2880
2881 - `ItemReference`
2882
2883 - `String id`
2884
2885 The ID of the item to reference.
2886
2887 - `Optional<Type> type`
2888
2889 The type of item to reference. Always `item_reference`.
2890
2891 - `ITEM_REFERENCE("item_reference")`
2892
2893 - `Optional<Metadata> metadata`
2894
2895 Set of 16 key-value pairs that can be attached to an object. This can be
2896 useful for storing additional information about the object in a structured
2897 format, and querying for objects via API or the dashboard.
2898
2899 Keys are strings with a maximum length of 64 characters. Values are strings
2900 with a maximum length of 512 characters.
2901
2902### Returns
2903
2904- `class Conversation:`
2905
2906 - `String id`
2907
2908 The unique ID of the conversation.
2909
2910 - `long createdAt`
2911
2912 The time at which the conversation was created, measured in seconds since the Unix epoch.
2913
2914 - `JsonValue metadata`
2915
2916 Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
2917 Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
2918
2919 - `JsonValue; object_ "conversation"constant`
2920
2921 The object type, which is always `conversation`.
2922
2923 - `CONVERSATION("conversation")`
2924
2925### Example
2926
2927```java
2928package com.openai.example;
2929
2930import com.openai.client.OpenAIClient;
2931import com.openai.client.okhttp.OpenAIOkHttpClient;
2932import com.openai.models.conversations.Conversation;
2933import com.openai.models.conversations.ConversationCreateParams;
2934
2935public final class Main {
2936 private Main() {}
2937
2938 public static void main(String[] args) {
2939 OpenAIClient client = OpenAIOkHttpClient.fromEnv();
2940
2941 Conversation conversation = client.conversations().create();
2942 }
2943}
2944```
2945
2946#### Response
2947
2948```json
2949{
2950 "id": "id",
2951 "created_at": 0,
2952 "metadata": {},
2953 "object": "conversation"
2954}
2955```